Ignore:
Timestamp:
Mar 17, 2010, 5:44:07 PM (14 years ago)
Author:
Eric
Message:

[nbc_HistoryIPExcluder]

  • Removing "NBC" references
  • Display the good plugin's name
  • Database upgrade process for next version
File:
1 edited

Legend:

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

    r5121 r5162  
    99  $q = '
    1010INSERT INTO '.CONFIG_TABLE.' (param,value,comment)
    11 VALUES ("nbc_HistoryIPExcluder","","Parametres nbc History IP Excluder");
     11VALUES ("HistoryIPExcluder","","History IP Excluder parameters");
    1212';
    1313     
    1414  pwg_query($q);
     15}
     16
     17
     18function plugin_activate()
     19{
     20  global $conf;
     21 
     22/* Check for upgrade from 2.0.0 to 2.0.1 */
     23/* *************************************** */
     24        $query = '
     25SELECT param
     26  FROM '.CONFIG_TABLE.'
     27WHERE param = "nbc_HistoryIPExcluder"
     28;';
     29  $count = mysql_num_rows(pwg_query($query));
     30 
     31        if ($count == 1)
     32        {
     33  /* upgrade from branch 2.0.0 to 2.0.1 */
     34  /* ************************************ */
     35                upgrade_200();
     36        }
    1537}
    1638
     
    3153}
    3254
     55
     56function upgrade_200()
     57{
     58  global $conf;
     59 
     60  $q = '
     61UPDATE '.CONFIG_TABLE.'
     62SET param = "HistoryIPExcluder"
     63WHERE param = "nbc_HistoryIPExcluder"
     64;';
     65  pwg_query($q);
     66
     67  $q = '
     68UPDATE '.CONFIG_TABLE.'
     69SET comment = "History IP Excluder parameters"
     70WHERE comment = "Parametres nbc History IP Excluder"
     71;';
     72  pwg_query($q);
     73}
    3374?>
Note: See TracChangeset for help on using the changeset viewer.