Show
Ignore:
Timestamp:
02/09/11 21:35:46 (2 years ago)
Author:
Eric
Message:

Bug 1666 fixed : New option to add a customized text in email sent when users lost their password

Files:
1 modified

Legend:

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

    r8092 r9135  
    312312  pwg_query($query); 
    313313} 
     314 
     315 
     316/* upgrade from 2.16.x to 2.20.0 */ 
     317/* ***************************** */ 
     318function upgrade_216_220() 
     319{ 
     320  global $conf; 
     321 
     322  $uam_new_version = "2.20.0"; 
     323 
     324  // Upgrading options 
     325  $query = ' 
     326SELECT value 
     327  FROM '.CONFIG_TABLE.' 
     328WHERE param = "UserAdvManager" 
     329;'; 
     330 
     331  $result = pwg_query($query); 
     332  $conf_UAM = pwg_db_fetch_assoc($result); 
     333     
     334  $Newconf_UAM = unserialize($conf_UAM['value']); 
     335   
     336  $Newconf_UAM[29] = 'false'; 
     337  $Newconf_UAM[30] = 'You have requested a password reset on our gallery. Please, find below your new connection settings.'; 
     338   
     339  $update_conf = serialize($Newconf_UAM); 
     340     
     341  $query = ' 
     342UPDATE '.CONFIG_TABLE.' 
     343SET value="'.addslashes($update_conf).'" 
     344WHERE param="UserAdvManager" 
     345LIMIT 1 
     346;'; 
     347 
     348        pwg_query($query); 
     349 
     350  // Update plugin version  
     351  $query = ' 
     352UPDATE '.CONFIG_TABLE.' 
     353SET value="'.$uam_new_version.'" 
     354WHERE param="UserAdvManager_Version" 
     355LIMIT 1 
     356;'; 
     357   
     358  pwg_query($query); 
     359} 
    314360?>