Changeset 29855
- Timestamp:
- Oct 1, 2014, 5:38:21 PM (9 years ago)
- Location:
- extensions/LLGBO2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LLGBO2/admin.php
r29842 r29855 101 101 // +-----------------------------------------------------------------------+ 102 102 $template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content'); 103 // update values in $conf[LLGBO2] in place of array_replace PHP 5.3 104 function update_llgboconf($old_values, $new_values) 105 { 106 foreach ($new_values as $cle => $value) 107 {$old_values [$cle] = $value; } 108 return $old_values; 109 } 103 110 ?> -
extensions/LLGBO2/admin/frame.php
r29842 r29855 17 17 // -------- Save -- 18 18 if ( isset($_POST['save']) ) 19 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_frame); 19 { // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_frame); 20 $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $param_llgbo_frame); 20 21 conf_update_param('LLGBO2_settings',$conf['LLGBO2']); 21 22 array_push($page['infos'], l10n('Information data registered in database')); … … 25 26 // -------- Preview -- 26 27 if ( isset($_POST['preview']) ) 27 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_frame); } 28 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $param_llgbo_frame); 29 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_frame); 30 } 28 31 29 32 // -------- Reset -- 30 33 if ( isset($_POST['reset']) ) 31 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_frame); } 34 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $default_frame); 35 //$conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_frame); 36 } 32 37 33 38 // -------- Preview sample -- … … 41 46 } 42 47 $s = $_POST['sample']; 43 $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $samples[$s]); 48 $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $samples[$s]); 49 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $samples[$s]); 44 50 45 51 } -
extensions/LLGBO2/admin/header.php
r29841 r29855 10 10 { $param_llgbo_header['HD-dispheader'][$cle] = (empty($_POST[$cle])) ? False : True; 11 11 } 12 $conf['LLGBO2'] = array_replace($conf['LLGBO2'],$param_llgbo_header ); 12 $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'],$param_llgbo_header ); 13 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'],$param_llgbo_header ); 13 14 14 15 // Update DB … … 18 19 19 20 if ( isset($_POST['reset']) ) 20 { 21 $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_header);21 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $default_header ); 22 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_header); 22 23 } 23 24 -
extensions/LLGBO2/admin/settings.php
r29841 r29855 16 16 'manageheader' => empty($_POST['llgbo_manageheader']) ? false : true, 17 17 ); 18 $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo); 19 18 $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $param_llgbo); 19 //$conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo); 20 20 21 // Update DB 21 22 conf_update_param('LLGBO2_settings',$conf['LLGBO2']); … … 26 27 // end submit 27 28 if ( isset($_POST['reset']) ) 28 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_main); } 29 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $default_main); 30 //$conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_main); 31 } 29 32 30 33 // Reload settings for correct display after update -
extensions/LLGBO2/admin/tooltip.php
r29841 r29855 15 15 16 16 if ( isset($_POST['save']) ) 17 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_tooltip); 17 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'],$param_llgbo_tooltip); 18 //$conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_tooltip); 18 19 conf_update_param('LLGBO2_settings',$conf['LLGBO2']); 19 20 array_push($page['infos'], l10n('Information data registered in database')); } … … 21 22 22 23 if ( isset($_POST['preview']) ) 23 {$conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_tooltip);} 24 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'],$param_llgbo_tooltip); 25 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $param_llgbo_tooltip); 26 } 24 27 25 28 if ( isset($_POST['reset']) ) 26 { $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_tooltip); 29 { $conf['LLGBO2'] = update_llgboconf($conf['LLGBO2'], $default_tooltip); 30 // $conf['LLGBO2'] = array_replace($conf['LLGBO2'], $default_tooltip); 27 31 } 28 32
Note: See TracChangeset
for help on using the changeset viewer.