| | 314 | |
| | 315 | |
| | 316 | /* upgrade from 2.16.x to 2.20.0 */ |
| | 317 | /* ***************************** */ |
| | 318 | function upgrade_216_220() |
| | 319 | { |
| | 320 | global $conf; |
| | 321 | |
| | 322 | $uam_new_version = "2.20.0"; |
| | 323 | |
| | 324 | // Upgrading options |
| | 325 | $query = ' |
| | 326 | SELECT value |
| | 327 | FROM '.CONFIG_TABLE.' |
| | 328 | WHERE 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 = ' |
| | 342 | UPDATE '.CONFIG_TABLE.' |
| | 343 | SET value="'.addslashes($update_conf).'" |
| | 344 | WHERE param="UserAdvManager" |
| | 345 | LIMIT 1 |
| | 346 | ;'; |
| | 347 | |
| | 348 | pwg_query($query); |
| | 349 | |
| | 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 | } |