diff --git a/adm/config_form_update.php b/adm/config_form_update.php index cfe8e16cb..81186b371 100644 --- a/adm/config_form_update.php +++ b/adm/config_form_update.php @@ -12,7 +12,6 @@ if ($is_admin != 'super') { $cf_title = isset($_POST['cf_title']) ? strip_tags(clean_xss_attributes($_POST['cf_title'])) : ''; $cf_admin = isset($_POST['cf_admin']) ? clean_xss_tags($_POST['cf_admin'], 1, 1) : ''; -$posts = array(); $mb = get_member($cf_admin); @@ -28,11 +27,11 @@ $check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptc foreach ($check_keys as $key) { if (isset($_POST[$key]) && $_POST[$key]) { - $posts[$key] = $_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]); + $_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]); } } -$posts['cf_icode_server_port'] = $_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295'; +$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295'; if (isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']) { $pattern = explode("\n", trim($_POST['cf_intercept_ip'])); @@ -165,12 +164,12 @@ for ($i = 1; $i <= 10; $i++) { foreach ($check_keys as $k => $v) { if ($v === 'int') { - $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0; + $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0; } else { if (in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))) { - $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : ''; + $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : ''; } else { - $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : ''; + $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : ''; } } } @@ -181,9 +180,9 @@ if ($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'] && } if (!$_POST['cf_cert_use']) { - $posts[$key] = $_POST['cf_cert_ipin'] = ''; - $posts[$key] = $_POST['cf_cert_hp'] = ''; - $posts[$key] = $_POST['cf_cert_simple'] = ''; + $_POST['cf_cert_ipin'] = ''; + $_POST['cf_cert_hp'] = ''; + $_POST['cf_cert_simple'] = ''; } $sql = " update {$g5['config_table']} diff --git a/lib/common.lib.php b/lib/common.lib.php index 059f775ca..5d1247e81 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1320,6 +1320,10 @@ function delete_point($mb_id, $rel_table, $rel_id, $rel_action) and po_rel_action = '$rel_action' "; $row = sql_fetch($sql); + if (! (isset($row['po_id']) && $row['po_id'])) { + return true; + } + if(isset($row['po_point']) && $row['po_point'] < 0) { $mb_id = $row['mb_id']; $po_point = abs($row['po_point']);