Changeset 855 in ExiteCMS for trunk/administration/upgrade.php
- Timestamp:
- 09/29/07 14:20:26 (5 years ago)
- File:
-
- 1 edited
-
trunk/administration/upgrade.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/upgrade.php
r834 r855 20 20 // check for available upgrades 21 21 $upgrades = array(); 22 $upgraded = array(); 22 23 $temp = makefilelist(PATH_ADMIN."upgrade", ".|.."); 23 24 foreach ($temp as $tempfile) { … … 25 26 if (strlen($tempfile) != 12 || substr($tempfile,0,3) != "rev" || substr($tempfile,-4) != ".php") continue; 26 27 $thisrev = substr($tempfile,3,5); 27 if (!isNum($thisrev) || $thisrev <= $settings['revision']) continue; 28 $upgrades[] = $tempfile; 28 if (!isNum($thisrev) || $thisrev <= $settings['revision']) { 29 $upgraded[] = $tempfile; 30 } else { 31 $upgrades[] = $tempfile; 32 } 29 33 } 30 34 31 35 // set a constant to define the upgrades available 32 36 define('UPGRADES', count($upgrades)); 37 38 // set a constant to define the upgrades already installed 39 define('UPGRADED', count($upgraded)); 33 40 34 41 // if it was called from the admin panel, continue interactively … … 47 54 $variables = array(); 48 55 56 // get some information from the upgrades already installed 57 if (UPGRADED) { 58 $revisions = array(); 59 // load and check the revision files 60 foreach ($upgraded as $revfile) { 61 require_once PATH_ADMIN."upgrade/".$revfile; 62 } 63 $variables['revisions_installed'] = $revisions; 64 } 65 49 66 // check if there are upgrades available 50 67 if (UPGRADES) { … … 129 146 // check for newer revisions on the ExiteCMS website 130 147 $variables['new_upgrades'] = false; 131 148 132 149 $template_panels[] = array('type' => 'body', 'name' => 'admin.upgrade', 'template' => 'admin.upgrade.tpl', 'locale' => PATH_LOCALE.LOCALESET."admin/upgrade.php"); 133 150 $template_variables['admin.upgrade'] = $variables;
Note: See TracChangeset
for help on using the changeset viewer.
