Revision 1069
Added by Matthias almost 15 years ago
save_field.php | ||
---|---|---|
42 | 42 |
$update_when_modified = true; // Tells script to update when this page was last updated |
43 | 43 |
require(WB_PATH.'/modules/admin.php'); |
44 | 44 |
|
45 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
|
46 |
if(function_exists('ini_set')) { |
|
47 |
ini_set('arg_separator.output', '&'); |
|
48 |
} |
|
49 |
|
|
45 | 50 |
// Validate all fields |
46 | 51 |
if($admin->get_post('title') == '' OR $admin->get_post('type') == '') { |
47 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
52 |
$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
|
|
48 | 53 |
} else { |
49 | 54 |
$title = $admin->add_slashes($admin->get_post('title')); |
50 | 55 |
$type = $admin->add_slashes($admin->get_post('type')); |
... | ... | |
93 | 98 |
|
94 | 99 |
// Check if there is a db error, otherwise say successful |
95 | 100 |
if($database->is_error()) { |
96 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
101 |
$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
|
|
97 | 102 |
} else { |
98 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'§ion_id='.$section_id.'&field_id='.$field_id);
|
|
103 |
$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
|
|
99 | 104 |
} |
100 | 105 |
|
101 | 106 |
// Print admin footer |
Also available in: Unified diff
Fixed some validiation bugs in core and different modules (Thanks to luisehahne)