Commit e44dfdf
authored
fix(upgrade): skip stale patch directories and fix System module update URL (#17)
* fix(upgrade): skip stale patch directories and fix System module update URL
Wrap patch file includes in buildUpgradeQueue() with try/catch so that
stale directories from previous beta versions (e.g. upd_2.5.11-to-2.5.12
from the pre-rename cycle) are logged and skipped instead of crashing the
upgrade with a fatal "Class not found" error.
Also fix double-encoding of the System module update URL at the end of
the upgrade wizard — & in the PHP string was re-encoded by
htmlspecialchars() in oneButtonContinueForm(), producing & which
broke the query parameters.
* fix(upgrade): emit visible warnings for skipped patches and guard Db_manager loads
Replace the undeclared $this->logs[] write in UpgradeControl::buildUpgradeQueue()
with trigger_error(E_USER_WARNING) so that skipped patches produce a visible
warning in the PHP error output instead of writing to a property that does not
exist on the class.
Also wrap the two method-level require_once calls for dbmanager.php inside
upd-2.4.x-to-2.5.0 with class_exists('Db_manager', false) guards, matching the
top-level guard, to prevent a fatal class redeclaration when the class was
already loaded by an earlier patch in the upgrade queue.1 parent 69422cc commit e44dfdf
4 files changed
Lines changed: 37 additions & 12 deletions
File tree
- upgrade
- class/Xoops/Upgrade
- upd-2.4.x-to-2.5.0
- upd_2.5.10-to-2.5.11
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
232 | 249 | | |
233 | 250 | | |
234 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | | - | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
200 | | - | |
201 | | - | |
202 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | | - | |
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
0 commit comments