- Timestamp:
- Sep 30, 2011, 1:50:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/include/upgradedb.inc.php
r12247 r12271 29 29 { 30 30 // Get current plugin version 31 // -------------------------- 31 32 $plugin = PluginInfos(UAM_PATH); 32 33 $version = $plugin['version']; 33 34 34 35 // Update plugin version in #_config table 36 // --------------------------------------- 35 37 $query = ' 36 38 UPDATE '.CONFIG_TABLE.' … … 45 47 // Check #_plugin table consistency 46 48 // Only useful if a previous version upgrade has not worked correctly (rare case) 49 // ------------------------------------------------------------------------------ 47 50 $query = ' 48 51 SELECT version … … 133 136 { 134 137 // Create missing table 138 // -------------------- 135 139 $query = " 136 140 ALTER TABLE ".USER_CONFIRM_MAIL_TABLE." … … 141 145 142 146 // Upgrade plugin configuration 147 // ---------------------------- 143 148 global $conf; 144 149 … … 191 196 192 197 // Changing parameter name 198 // ----------------------- 193 199 $q = ' 194 200 UPDATE '.CONFIG_TABLE.' … … 206 212 207 213 // Upgrading ConfirmMail options 214 // ----------------------------- 208 215 $query = ' 209 216 SELECT value … … 235 242 236 243 // Upgrading options 244 // ----------------- 237 245 $query = ' 238 246 SELECT value … … 289 297 290 298 // Upgrading options 299 // ----------------- 291 300 $query = ' 292 301 SELECT value … … 313 322 314 323 // Insert a new config entry for futur plugin's version check 324 // ---------------------------------------------------------- 315 325 $query = ' 316 326 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) … … 329 339 330 340 // Upgrading options 341 // ----------------- 331 342 $query = ' 332 343 SELECT value … … 352 363 353 364 // Create new UAM entry in plugins table 365 // ------------------------------------- 354 366 $uam_new_version = "2.20.0"; 355 367 … … 361 373 pwg_query($query); 362 374 363 // Delete old plugin entry in plugins table 375 // Delete old plugin entry in plugins table 376 // ---------------------------------------- 364 377 $query = ' 365 378 DELETE FROM '.PLUGINS_TABLE.' … … 370 383 pwg_query($query); 371 384 372 // rename directory 385 // Rename directory 386 // ---------------- 373 387 if (!rename(PHPWG_PLUGINS_PATH.'NBC_UserAdvManager', PHPWG_PLUGINS_PATH.'UserAdvManager')) 374 388 { … … 384 398 385 399 // Upgrading options 400 // ----------------- 386 401 $query = ' 387 402 SELECT value … … 409 424 410 425 // Upgrading options 426 // ----------------- 411 427 $query = ' 412 428 SELECT value … … 435 451 436 452 // Upgrading options 453 // ----------------- 437 454 $query = ' 438 455 SELECT value … … 447 464 448 465 // Refactoring all configuration options 466 // ------------------------------------- 449 467 $Newconf_UAM[0] = $Newconf_UAM[0]; 450 468 $Newconf_UAM[1] = $Newconf_UAM[1]; … … 484 502 485 503 // unset obsolete conf 504 // ------------------- 486 505 unset ($Newconf_UAM[35]); 487 506 unset ($Newconf_UAM[36]); … … 501 520 502 521 // Upgrading options 522 // ----------------- 503 523 $query = ' 504 524 SELECT value … … 522 542 523 543 // Piwigo's native tables modifications for password reset function - Add pwdreset column 544 // -------------------------------------------------------------------------------------- 524 545 $query = ' 525 546 SHOW COLUMNS FROM '.USERS_TABLE.'
Note: See TracChangeset
for help on using the changeset viewer.