124 global $enano_versions; |
124 global $enano_versions; |
125 // Import UI functions |
125 // Import UI functions |
126 global $ui; |
126 global $ui; |
127 // This is needed for upgrade abstraction |
127 // This is needed for upgrade abstraction |
128 global $dbdriver; |
128 global $dbdriver; |
|
129 |
|
130 // see if we're actually supposed to be in post-upgrade |
|
131 if ( getConfig('enano_version') == 'upg-' . installer_enano_version() ) |
|
132 { |
|
133 // yep, fall out here to avoid errors |
|
134 return true; |
|
135 } |
|
136 |
129 // Main upgrade stage |
137 // Main upgrade stage |
130 |
138 |
131 // Init vars |
139 // Init vars |
132 list($major_version, $minor_version) = explode('.', installer_enano_version()); |
140 list($major_version, $minor_version) = explode('.', installer_enano_version()); |
133 $installer_branch = "$major_version.$minor_version"; |
141 $installer_branch = "$major_version.$minor_version"; |
|
142 $installer_branch = preg_replace('/^upg-/', '', $installer_branch); |
|
143 $target_branch = preg_replace('/^upg-/', '', $target_branch); |
134 |
144 |
135 $version_flipped = array_flip($enano_versions[$target_branch]); |
145 $version_flipped = array_flip($enano_versions[$target_branch]); |
136 $version_curr = enano_version(); |
146 $version_curr = enano_version(); |
137 // Change this to be the last version in the current branch. |
147 // Change this to be the last version in the current branch. |
138 // If we're just upgrading within this branch, use the version the installer library |
148 // If we're just upgrading within this branch, use the version the installer library |