cpm option setting fixes

This commit is contained in:
John Bintz 2009-08-28 08:43:00 -04:00
parent ef49fe94d5
commit 18d19626b0
1 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,8 @@ function cpm_action_update_cpm_config() {
if ($ok) {
$target_update_options[$target_key] = $_POST[$option_info['id']];
} else {
$target_update_options[$target_key] = $option_info['default'];
update_option($target_key, $option_info['default']);
$all_valid = false;
break 2;
}
@ -52,7 +54,8 @@ function cpm_action_update_cpm_config() {
}
function cpm_validate_cpm_option_cpm_default_post_time($value) {
return (strtotime("2008-01-01 {$value}") !== false);
$result = strtotime("2008-01-01 {$value}");
return ($result !== false) && ($result !== -1);
}
?>