//This is a more accurate way of updating to false the checkboxes and radios the settings
//var_dump($settings);exit;
//This is amore accurate way of updating to false the checboxes and radios the settings
/*
foreach ($values as $key => $value) {
if (in_array($key, $settings_to_avoid)) { continue; }
if ($key == 'search_field' or $key == 'submit_fixed_in_bottom') { continue; }
$key = Database::escape_string($key);
$sql = "UPDATE $table_settings_current SET selected_value = 'false' WHERE variable = '".$key."' AND access_url = ".intval($url_id)." AND type IN ('checkbox', 'radio') ";
$res = Database::query($sql);
}*/
foreach ($settings as $item) {
$key = $item['variable'];
if (in_array($key, $settings_to_avoid)) { continue; }
if ($key == 'search_field' or $key == 'submit_fixed_in_bottom') { continue; }
$key = Database::escape_string($key);
$sql = "UPDATE $table_settings_current SET selected_value = 'false' WHERE variable = '".$key."' AND access_url = ".intval($url_id)." AND type IN ('checkbox', 'radio') ";
$res = Database::query($sql);
}
/*foreach($settings_to_avoid as $key => $value) {
@ -236,7 +246,7 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
if (in_array($key, $settings_to_avoid)) { continue; }
// Avoid form elements which have nothing to do with settings
if ($key == 'search_field' or $key == 'submit_fixed_in_bottom') { continue; }