Ignore:
Timestamp:
Mar 12, 2010, 9:46:44 PM (14 years ago)
Author:
Eric
Message:

[nbc_HistoryIPExcluder] Pre 2.0.0

  • Code cleaning
  • Translations improvement based on Tosca's FR correction
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php

    r5099 r5121  
    99  $q = '
    1010INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
    11 VALUES ("nbc_HistoryIPExcluder","'.addslashes(serialize($default)).'","Parametres nbc History IP Excluder");
     11VALUES ("nbc_HistoryIPExcluder","","Parametres nbc History IP Excluder");
    1212';
    1313     
     
    1515}
    1616
    17 function plugin_activate()
    18 {
    19   global $conf;
    20 
    21 /* Serializing conf parameters */
    22 /* *************************** */
    23   if (unserialize($conf['nbc_HistoryIPExcluder']) === false)
    24   {
    25   /* upgrade from branch old version to 2.0.0 */
    26   /* **************************************** */
    27     upgrade_200();
    28   }
    29  
    30 }
    3117
    3218function plugin_uninstall()
     
    4531}
    4632
    47 /* upgrade from old version to 2.0.0 */
    48 /* ********************************* */
    49 function upgrade_200()
    50 {
    51         global $conf;
    52  
    53   if (unserialize($conf['nbc_HistoryIPExcluder']) === false)
    54   {
    55     $data = explode(',', $conf['nbc_HistoryIPExcluder']);
    56 
    57     $query = '
    58 UPDATE '.CONFIG_TABLE.'
    59   SET value = "'.addslashes(serialize($data)).'"
    60   WHERE param = "nbc_HistoryIPExcluder"
    61 ;';
    62     pwg_query($query);
    63   }
    64 }
    65 
    6633?>
Note: See TracChangeset for help on using the changeset viewer.