remove unneeded options setting

This commit is contained in:
John Bintz 2009-08-16 12:26:54 -04:00
parent c09cff5056
commit af689daebe
2 changed files with 0 additions and 30 deletions

View File

@ -158,23 +158,6 @@ class WhatDidTheySayAdmin {
return $updated;
}
function handle_update_options($requested_options) {
$updated_options = array(
'only_allowed_users' => false
);
foreach ($requested_options as $option => $value) {
switch ($option) {
case 'only_allowed_users':
$updated_options['only_allowed_users'] = true;
break;
}
}
$options = array_merge(get_option('what-did-they-say-options'), $updated_options);
update_option('what-did-they-say-options', $options);
}
function read_language_file() {
if (file_exists($this->language_file)) {
foreach (file($this->language_file, FILE_IGNORE_NEW_LINES) as $language) {

View File

@ -59,19 +59,6 @@ class WhatDidTheySayAdminTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($expected_results, $options['languages']);
}
function testHandleUpdateOptions() {
$admin = new WhatDidTheySayAdmin();
update_option('what-did-they-say-options', array('only_allowed_users' => false));
$admin->handle_update_options(array(
'only_allowed_users' => 'yes'
));
$options = get_option('what-did-they-say-options');
$this->assertTrue($options['only_allowed_users']);
}
function testBuildFullDefaultLanguageInfo() {
$admin = new WhatDidTheySayAdmin();
$admin->all_languages = array(