Page MenuHomeDevCentral

D3901.id10102.diff
No OneTemporary

D3901.id10102.diff

diff --git a/roles/saas-mediawiki/software/files/mw.sh.jinja b/roles/saas-mediawiki/software/files/mw.sh.jinja
--- a/roles/saas-mediawiki/software/files/mw.sh.jinja
+++ b/roles/saas-mediawiki/software/files/mw.sh.jinja
@@ -74,12 +74,12 @@
# Determine script path
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Appends .php if string doesn't contain it
-test "${SCRIPT#*.php}" != "$SCRIPT" || SCRIPT="$SCRIPT.php"
+# checks the full path for an existing script
+test "${SCRIPT#/}" != "$SCRIPT" || SCRIPT="$SCRIPT.php"
# By default, scripts are located in maintenance wgCacheDirectory
if [ "${SCRIPT#/}" == "$SCRIPT" ]; then
- FULL_SCRIPT_PATH=$MEDIAWIKI_DIRECTORY/maintenance/$SCRIPT
+ FULL_SCRIPT_PATH=$MEDIAWIKI_DIRECTORY/maintenance/$SCRIPT.php
else
FULL_SCRIPT_PATH=$SCRIPT
fi
@@ -100,4 +100,4 @@
export SERVER_NAME
export MW_INSTALL_PATH
-rlwrap php "$FULL_SCRIPT_PATH" "$@"
+rlwrap php "$MEDIAWIKI_DIRECTORY/maintenance/run.php" "$SCRIPT" "$@"

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 6, 21:19 (5 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3427364
Default Alt Text
D3901.id10102.diff (999 B)

Event Timeline