Ignore:
Timestamp:
Nov 30, 2010, 5:24:38 PM (13 years ago)
Author:
Eric
Message:
  • Bug 1585 fixed : Adding plugin's version number in #_config table
  • Performing old code cleanup
  • 1st step to branch 2.16
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php

    r6775 r7955  
    208208}
    209209
    210 /* upgrade from branch 2.15.3 to 2.15.4 */
    211 /* ************************************ */
     210/* upgrade from 2.15.3 to 2.15.4 */
     211/* ***************************** */
    212212function upgrade_2153_2154()
    213213{
     
    267267  pwg_query($query);
    268268}
     269
     270/* upgrade from 2.15.9 to 2.16.0 */
     271/* ***************************** */
     272function upgrade_2159_2160()
     273{
     274  global $conf;
     275
     276/* Upgrading options */
     277  $query = '
     278SELECT value
     279  FROM '.CONFIG_TABLE.'
     280WHERE param = "UserAdvManager"
     281;';
     282
     283  $result = pwg_query($query);
     284  $conf_UAM = pwg_db_fetch_assoc($result);
     285   
     286  $Newconf_UAM = unserialize($conf_UAM['value']);
     287 
     288  $Newconf_UAM[22] = 'false';
     289  $Newconf_UAM[23] = 'false';
     290  $Newconf_UAM[24] = 'false';
     291  $Newconf_UAM[25] = 'Sorry, your account has been deleted due to a too long time passed since your last visit.';
     292  $Newconf_UAM[26] = 'Sorry, your account has been deprecated due to a too long time passed since your last visit. Please, use the following link to revalidate your account.';
     293 
     294  $update_conf = serialize($Newconf_UAM);
     295   
     296  $query = '
     297      UPDATE '.CONFIG_TABLE.'
     298                        SET value="'.addslashes($update_conf).'"
     299                        WHERE param="UserAdvManager"
     300                        LIMIT 1
     301                ;';
     302
     303        pwg_query($query);
     304
     305  // Insert a new config entry for futur plugin's version check
     306  $query = '
     307INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
     308VALUES ("UserAdvManager_Version","2.15.8","UAM version check")
     309  ;';
     310 
     311  pwg_query($query);
     312}
    269313?>
Note: See TracChangeset for help on using the changeset viewer.