Changeset 9883


Ignore:
Timestamp:
03/26/11 18:40:16 (9 years ago)
Author:
Eric
Message:

r9882 merged from trunk to branch 2.2

Location:
extensions/HistoryIPExcluder/branches/2.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/HistoryIPExcluder/branches/2.2/main.inc.php

    r9870 r9883  
    22/* 
    33Plugin Name: History IP Excluder 
    4 Version: 2.2.0 
     4Version: 2.2.1 
    55Description: Permet l'exclusion d'une IP ou d'une plage d'IP de l'historique et de les blacklister à l'inscription - Base MySql seulement! / Excludes one IP or a range of IP from the history and to blacklist them on registration - MySql database only! 
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=147 
     
    26262.2.0             - Compliance with Piwigo 2.2.x 
    2727                  - Plugin directory renamed from nbc_HistoryIPExcluder to HistoryIPExcluder 
     28 
     292.2.1             - Bug fixed on plugin upgrade from 2.1.x version 
    2830 
    2931-------------------------------------------------------------------------------- 
  • extensions/HistoryIPExcluder/branches/2.2/maintain.inc.php

    r9870 r9883  
    9393  /* *********************************** */ 
    9494  $HIPE_Config = unserialize($conf['HistoryIPConfig']); 
    95   if ($HIPE_Config['Version'] != "2.2.0") 
     95  if ($HIPE_Config['Version'] != '2.2.0') 
    9696  { 
    9797    upgrade_211(); 
     98  } 
     99 
     100  /* upgrade from version 2.2.0 to 2.2.1 */ 
     101  /* *********************************** */ 
     102  $HIPE_Config = unserialize($conf['HistoryIPConfig']); 
     103  if ($HIPE_Config['Version'] != '2.2.1') 
     104  { 
     105    upgrade_220(); 
    98106  } 
    99107} 
     
    179187  $Newconf_HIPE = unserialize($conf_HIPE['value']); 
    180188   
    181   $Newconf_HIPE[1] = '2.2.0'; 
     189  $Newconf_HIPE['Version'] = '2.2.0'; 
    182190   
    183191  $update_conf = serialize($Newconf_HIPE); 
     
    190198;'; 
    191199 
    192         pwg_query($query);  
     200        pwg_query($query); 
    193201 
    194202  // Create new HIPE entry in plugins table  
     
    215223  } 
    216224} 
     225 
     226 
     227function upgrade_220() 
     228{ 
     229  global $conf; 
     230 
     231// Update plugin version 
     232  $query = ' 
     233SELECT value 
     234  FROM '.CONFIG_TABLE.' 
     235WHERE param = "HistoryIPConfig" 
     236;'; 
     237  $result = pwg_query($query); 
     238   
     239  $conf_HIPE = pwg_db_fetch_assoc($result); 
     240     
     241  $Newconf_HIPE = unserialize($conf_HIPE['value']); 
     242   
     243  $Newconf_HIPE['Version'] = '2.2.1'; 
     244   
     245  $update_conf = serialize($Newconf_HIPE); 
     246 
     247  $query = ' 
     248UPDATE '.CONFIG_TABLE.' 
     249SET value="'.addslashes($update_conf).'" 
     250WHERE param="HistoryIPConfig" 
     251LIMIT 1 
     252;'; 
     253 
     254        pwg_query($query); 
     255} 
    217256?> 
Note: See TracChangeset for help on using the changeset viewer.