Commit 631b31b
authored
fix(installer): prevent column-shift corruption and autoloader failure on fresh install (#16)
* fix(installer): prevent column-shift corruption and autoloader failure on fresh install
Use explicit column names in every INSERT in makedata.php to prevent silent
data corruption when columns are added to core tables. The modules table gained
show_in_menu after the positional VALUES list was written, shifting dirname to
'0' and isactive to 0 for the System module — which broke the entire install:
the System module appeared as an optional checkbox (issue #12), selecting it
caused duplicate template insertion errors (issue #13), and skipping it left
XOOPS non-functional.
Also replace Xmf\Request with raw $_COOKIE in the install wizard bootstrap
(issue #11). The XMF autoloader is not reliably available at that point when
xoops_lib has been relocated outside the webroot — mainfile.php does not exist
yet on the first page load, so the autoloader search paths all fail.
Fixes #11, fixes #12, fixes #13
* fix(installer): add explicit columns to remaining menu-seed permission inserts
The two group_permission inserts in system_menu_install_seed_defaults()
were still using positional VALUES without a column list. Also initialize
$module_array before the system-dirname filter loop in searchform.php to
prevent an undefined variable warning when all modules are filtered out.1 parent 9c3a62d commit 631b31b
3 files changed
Lines changed: 210 additions & 197 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
0 commit comments