Ignore:
Timestamp:
Apr 7, 2011, 10:53:21 PM (13 years ago)
Author:
Eric
Message:

r10144 merged from trunk to branch 2.20

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.20/include/upgradedb.inc.php

    r9909 r10145  
    1919// |       Upgrading database from old plugin versions        |
    2020// +----------------------------------------------------------+
     21
     22
     23/* *************************************** */
     24/* Update plugin version in conf table     */
     25/* Used everytime a new version is updated */
     26/* even if no database upgrade is needed   */
     27/* *************************************** */
     28function UAM_version_update()
     29
     30  // Get current plugin version
     31  $plugin =  PluginInfos(UAM_PATH);
     32  $version = $plugin['version'];
     33 
     34  // Update plugin version
     35  $query = '
     36UPDATE '.CONFIG_TABLE.'
     37SET value="'.$version.'"
     38WHERE param="UserAdvManager_Version"
     39LIMIT 1
     40;';
     41
     42  pwg_query($query);
     43}
     44
    2145
    2246/* upgrade from branch 2.10 to 2.11 */
     
    153177}
    154178
     179
    155180/* upgrade from branch 2.14 to 2.15 */
    156181/* ******************************** */
     
    202227    upgrade_2153_2154();
    203228}
     229
    204230
    205231/* upgrade from 2.15.3 to 2.15.4 */
     
    263289}
    264290
     291
    265292/* upgrade from 2.15.x to 2.16.0 */
    266293/* ***************************** */
     
    316343  global $conf;
    317344
    318   $uam_new_version = "2.20.0";
    319 
    320345  // Upgrading options
    321346  $query = '
     
    348373        pwg_query($query);
    349374
    350   // Update plugin version
    351   $query = '
    352 UPDATE '.CONFIG_TABLE.'
    353 SET value="'.$uam_new_version.'"
    354 WHERE param="UserAdvManager_Version"
    355 LIMIT 1
    356 ;';
    357 
    358   pwg_query($query);
    359 
    360   // Create new UAM entry in plugins table
     375  // Create new UAM entry in plugins table
     376  $uam_new_version = "2.20.0";
     377
    361378  $query = '
    362379INSERT INTO '.PLUGINS_TABLE.' (id, state, version)
Note: See TracChangeset for help on using the changeset viewer.