few bug fixes

This commit is contained in:
John Bintz 2009-10-01 21:24:56 -04:00
parent 6673a22b08
commit 3562210e2e

View File

@ -53,6 +53,14 @@ class WhatDidTheySayAdmin {
$options = get_option('what-did-they-say-options'); $options = get_option('what-did-they-say-options');
if (!is_array($options)) { if (!is_array($options)) {
$this->install(); $this->install();
} else {
$any_changes = false;
foreach ($this->default_options as $key => $value) {
if (!isset($options[$key])) {
$any_changes = true; $options[$key] = $value;
}
}
if ($any_changes) { update_option('what-did-they-say-options', $options); }
} }
add_action('admin_menu', array(&$this, 'admin_menu')); add_action('admin_menu', array(&$this, 'admin_menu'));
@ -363,8 +371,14 @@ class WhatDidTheySayAdmin {
} }
} }
} }
if (!is_admin()) {
header('Location: ' . $_SERVER['HTTP_REFERER']);
exit(0);
} else {
return $updated; return $updated;
} }
}
function handle_update_update_queued_transcript($info) { function handle_update_update_queued_transcript($info) {
$this->is_ajax = true; $this->is_ajax = true;