Changeset 29855


Ignore:
Timestamp:
Oct 1, 2014, 5:38:21 PM (9 years ago)
Author:
gbo
Message:

version 2.7.C by default php 5.2 does not support "array_replace"

Location:
extensions/LLGBO2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/admin.php

    r29842 r29855  
    101101// +-----------------------------------------------------------------------+
    102102$template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content');
     103// update values in $conf[LLGBO2] in place of  array_replace PHP 5.3
     104function update_llgboconf($old_values, $new_values)
     105        {   
     106        foreach ($new_values as $cle  => $value)
     107                {$old_values [$cle] = $value;   }
     108        return $old_values;
     109        }
    103110?>
  • extensions/LLGBO2/admin/frame.php

    r29842 r29855  
    1717                // -------- Save --
    1818                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);
    2021                                conf_update_param('LLGBO2_settings',$conf['LLGBO2']);
    2122                                array_push($page['infos'], l10n('Information data registered in database'));
     
    2526// -------- Preview  --
    2627        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                        }
    2831               
    2932// -------- Reset --
    3033        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                }
    3237       
    3338// -------- Preview  sample -- 
     
    4146                        }
    4247                $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]);
    4450                 
    4551                }
  • extensions/LLGBO2/admin/header.php

    r29841 r29855  
    1010                                                { $param_llgbo_header['HD-dispheader'][$cle] = (empty($_POST[$cle])) ? False : True;
    1111                                                }       
    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 );
    1314                               
    1415                                // Update DB
     
    1819                               
    1920        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);
    2223                        }
    2324
  • extensions/LLGBO2/admin/settings.php

    r29841 r29855  
    1616                                'manageheader'           => empty($_POST['llgbo_manageheader'])                 ? false : true,
    1717                                        );               
    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           
    2021        // Update DB
    2122                                conf_update_param('LLGBO2_settings',$conf['LLGBO2']);
     
    2627        // end submit
    2728        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                }
    2932       
    3033 // Reload settings for correct display after update
  • extensions/LLGBO2/admin/tooltip.php

    r29841 r29855  
    1515       
    1616                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);
    1819                                        conf_update_param('LLGBO2_settings',$conf['LLGBO2']);
    1920                                         array_push($page['infos'], l10n('Information data registered in database')); }
     
    2122       
    2223        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                                  }
    2427                                 
    2528        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);
    2731                }
    2832       
Note: See TracChangeset for help on using the changeset viewer.