Changeset 5121 for extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php
- Timestamp:
- Mar 12, 2010, 9:46:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/nbc_HistoryIPExcluder/trunk/maintain.inc.php
r5099 r5121 9 9 $q = ' 10 10 INSERT INTO '.CONFIG_TABLE.' (param,value,comment) 11 VALUES ("nbc_HistoryIPExcluder"," '.addslashes(serialize($default)).'","Parametres nbc History IP Excluder");11 VALUES ("nbc_HistoryIPExcluder","","Parametres nbc History IP Excluder"); 12 12 '; 13 13 … … 15 15 } 16 16 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 }31 17 32 18 function plugin_uninstall() … … 45 31 } 46 32 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 66 33 ?>
Note: See TracChangeset
for help on using the changeset viewer.