Project

General

Profile

« Previous | Next » 

Revision 544

Added by thorn almost 17 years ago

changed admin/pages/save.php to allow hidden config-elements in table search

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
16-Jan-2008 Thomas Hornik
15
! changed module menu_link: added table mod_menu_link, fixed page-deleting-bug,
15
!	changed admin/pages/save.php to allow hidden config-elements in table search.
16
16-Jan-2008 Thomas Hornik
17
!	changed module menu_link: added table mod_menu_link, fixed page-deleting-bug,
16 18
	fixed odd behavior in case of menu_link as default-page.
17 19
16-Jan-2008 Thomas Hornik
18
# changing PHP-error-level within website baker does not work - fixed (fixed ticket 532)
20
#	changing PHP-error-level within website baker does not work - fixed (fixed ticket 532)
19 21
14-Jan-2008 Matthias Gallas
20 22
#	Replaced hardcoded .php with the variable PAGE_EXTENSION for the use in pagenames.
21 23
	(!!Attention!! To get extenions other than .php working additional fixes are necessary!)
trunk/wb/admin/settings/save.php
143 143
}
144 144

  
145 145
// Query current search settings in the db, then loop through them and update the db with the new value
146
$query = "SELECT name FROM ".TABLE_PREFIX."search WHERE extra = ''";
146
$query = "SELECT name, value FROM ".TABLE_PREFIX."search WHERE extra = ''";
147 147
$results = $database->query($query);
148 148
while($search_setting = $results->fetchRow()) {
149
	$old_value = $search_setting['value'];
149 150
	$setting_name = $search_setting['name'];
150 151
	$post_name = 'search_'.$search_setting['name'];
151
	$value = $admin->get_post($post_name);
152
	if($admin->get_post($post_name) == '')
153
		$value = $old_value;
154
	else
155
		$value = $admin->get_post($post_name);
152 156
	$value = $admin->add_slashes($value);
153 157
	$database->query("UPDATE ".TABLE_PREFIX."search SET value = '$value' WHERE name = '$setting_name'");
154 158
}
......
163 167
$admin->print_success($MESSAGE['SETTINGS']['SAVED'], ADMIN_URL.'/settings/index.php'.$advanced);
164 168
$admin->print_footer();
165 169

  
166
?>
170
?>

Also available in: Unified diff