Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit e665572

Browse files
edg2sMatmaRex
authored andcommitted
Ensure core.php is always loaded first
Currently this works because 'core' comes before 'extension'/'feature' etc. in the alphabet, but that is a nasty bug waiting to happen.
1 parent 3719cee commit e665572

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

new/install.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ php $PATCHDEMO/wikis/$NAME/w/maintenance/install.php \
2020
echo "\$wgLanguageCode = '$LANGUAGE';" >> $PATCHDEMO/wikis/$NAME/w/LocalSettings.php
2121

2222
mkdir $PATCHDEMO/wikis/$NAME/w/settings.d
23-
echo 'foreach( glob( __DIR__ . "/settings.d/*.php" ) as $conffile ) { include_once $conffile; }' >> $PATCHDEMO/wikis/$NAME/w/LocalSettings.php
23+
echo '
24+
// Always load core.php first
25+
include_once "settings.d/core.php";
26+
foreach( glob( __DIR__ . "/settings.d/*.php" ) as $conffile ) {
27+
include_once $conffile;
28+
}
29+
' >> $PATCHDEMO/wikis/$NAME/w/LocalSettings.php
2430

2531
# apply core/extension/skin/service-specific settings
2632
while IFS=' ' read -r repo dir; do

0 commit comments

Comments
 (0)