Ignore:
Timestamp:
Mar 2, 2013, 6:28:58 PM (11 years ago)
Author:
Eric
Message:

Next version will be 1.1.0 :

  • Compliance with Piwigo 2.5
  • Code refactory : Change config variables to assoc array and $_POST vars control before writing conf in database - Thx to flop25 for his advices ;-)
  • Bug fixed : Unable to restore an history backup file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Prune_History/admin/PH_admin.php

    r14854 r21100  
    3535{
    3636
    37   $newconf_PH[0] = $version;
    38   $newconf_PH[1] = $_POST['PH_AutoPrune'];
    39   $newconf_PH[2] = $_POST['PH_Range_Value'];
    40   $newconf_PH[3] = $_POST['PH_Range'];
     37  $newconf_PH['PHVersion'] = $version;
     38  $newconf_PH['AUTOPRUNE'] = (isset($_POST['PH_AutoPrune']) ? $_POST['PH_AutoPrune'] : 'false');
     39  $newconf_PH['RANGEVALUE'] = (isset($_POST['PH_Range_Value']) ? $_POST['PH_Range_Value'] : '0');
     40  $newconf_PH['RANGE'] = (isset($_POST['PH_Range']) ? $_POST['PH_Range'] : '0');
    4141
    4242  $conf['PruneHistory'] = serialize($newconf_PH);
     
    162162    'PH_VERSION'                 => $version,
    163163    'PH_DUMP_DOWNLOAD'           => $dump_download,
    164                 'PH_AUTOPRUNE_TRUE'          => $conf_PH[1]=='true' ? 'checked="checked"' : '' ,
    165                 'PH_AUTOPRUNE_FALSE'         => $conf_PH[1]=='false' ? 'checked="checked"' : '' ,
    166     'PH_RANGE_VALUE'             => $conf_PH[2],
    167     'PH_RANGE_SELECTED'          => $conf_PH[3],
     164                'PH_AUTOPRUNE_TRUE'          => $conf_PH['AUTOPRUNE']=='true' ? 'checked="checked"' : '' ,
     165                'PH_AUTOPRUNE_FALSE'         => $conf_PH['AUTOPRUNE']=='false' ? 'checked="checked"' : '' ,
     166    'PH_RANGE_VALUE'             => $conf_PH['RANGEVALUE'],
     167    'PH_RANGE_SELECTED'          => $conf_PH['RANGE'],
    168168    'range_list'                 => $range_list,
    169169    'month_list'                 => $month_list,
Note: See TracChangeset for help on using the changeset viewer.