Merge branch 'master' of github.com:johnbintz/comicpress-manager-1.4

This commit is contained in:
John Bintz 2009-12-25 13:14:33 -05:00
commit 56205c1722
2 changed files with 6 additions and 5 deletions

View File

@ -17,10 +17,10 @@ function cpm_action_update_cpm_config() {
$validate_function_name = "cpm_validate_cpm_option_" . str_replace("-", "_", $option_info['id']); $validate_function_name = "cpm_validate_cpm_option_" . str_replace("-", "_", $option_info['id']);
$ok = true; $ok = true;
if (function_exists($validate_function_name)) { if (function_exists($validate_function_name)) {
$ok = call_user_func($validate_function_name, $_POST[$option_info['id']]); $ok = call_user_func($validate_function_name, stripslashes($_POST[$option_info['id']]));
} }
if ($ok) { if ($ok) {
$target_update_options[$target_key] = $_POST[$option_info['id']]; $target_update_options[$target_key] = stripslashes($_POST[$option_info['id']]);
} else { } else {
$target_update_options[$target_key] = $option_info['default']; $target_update_options[$target_key] = $option_info['default'];
update_option($target_key, $option_info['default']); update_option($target_key, $option_info['default']);

View File

@ -240,8 +240,9 @@ function generate_post_hash($filename_date, $filename_converted_title) {
$override_title = $_POST['override-title-to-use']; $override_title = $_POST['override-title-to-use'];
$tags = $_POST['tags']; $tags = $_POST['tags'];
if (get_magic_quotes_gpc()) { if (get_magic_quotes_gpc()) {
$override_title = stripslashes($override_title); foreach (array('override_title', 'tags', 'post_content') as $field) {
$tags = stripslashes($tags); ${$field} = stripslashes(${$field});
}
} }
$post_title = !empty($override_title) ? $override_title : $filename_converted_title; $post_title = !empty($override_title) ? $override_title : $filename_converted_title;