Commit graph

65 commits

Author SHA1 Message Date
Antoine Musso
ad1609059f merge msg script now detects extensions main files
maintenance/mergeMessageFileList.php is used by `scap` to establish a
list of message files to load. To do that, it read extensions paths from
a manually maintained list: wmf-config/extension-list.

This patch adds an optional automatic detection system to add extension
messages. That will reduce the risk of forgetting to update the
extension-list file and will be of good use on labs.

The new parameter is named --extensions-dir and takes a path holding
MediaWiki extensions. The script will take the directory names there and
attempt to load a file named `Foobar/Foobar.php`. --list-file is still
required, you can skip it using /dev/null.

Synopsis:

php maintenance/mergeMessageFileList.php \
 --list-file /dev/null \
 --extensions-dir /srv/mw-trunk/extensions

Script will bail out whenever an expected PHP file is not found and will
list all of those "missing" files.

Change-Id: I8ab15f899f0333428fd8b2a98c58c07c2fce2962
2012-07-06 20:16:01 +02:00
Catrope
e69afa4340 Fix https://gerrit.wikimedia.org/r/4830 , I botched the conflict
resolution there

Change-Id: I7d563851e8b89c249105e91ceed71f747732084f
2012-04-12 17:48:03 -07:00
Catrope
d242205f72 Revert "Bit more refactoring"
This reverts commit 5586e73fac.

This broke mergeMessageFileList.php by no longer running the extension
setup files in the global scope.

Change-Id: I8f22d0b3e938ba617f4297802edfc2012d78cc9b
2012-04-12 17:20:00 -07:00
Siebrand Mazeland
a63b207fff Bye, bye $wgExtensionAliasesFiles (deprecated in 1.16). 2011-12-25 23:09:26 +00:00
Sam Reed
5586e73fac Bit more refactoring 2011-10-11 21:34:53 +00:00
Sam Reed
c2884b8bd1 Don't reinvent the wheel to do parameter existence checking
Stops running the code outside the class when there's no point attempting it
2011-10-11 21:28:31 +00:00
Roan Kattouw
86a5b6c87f Merge r81725 from 1.17wmf1: add parent constructor call so $IP is set properly 2011-02-08 12:19:59 +00:00
Chad Horohoe
26505b170a Fix concern raised by Brion in r74108 (but has really existed since the maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself.
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().

Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
2011-01-13 22:58:55 +00:00
Alexandre Emsenhuber
9f5d06527c Part of bug 26280: added license headers to PHP files in maintenance 2010-12-16 19:15:12 +00:00
Sam Reed
b6f2713294 Remove unused variable
Remove 1 unused global
2010-07-24 21:11:29 +00:00
Sam Reed
659778619c Stylize maintenance folder.. 2010-05-22 16:50:39 +00:00
Tim Starling
0956ad88ed Don't include the old ExtensionMessages.php when you're building a new one. Otherwise renames break. 2009-11-27 00:18:59 +00:00
Tim Starling
1d8d173ecc Assorted tweaks. 2009-09-18 05:23:10 +00:00
Tim Starling
a89f29f7b4 Was too slow. Trying different approach. 2009-09-18 04:27:28 +00:00
Tim Starling
307d27e6e8 Script to produce a merged $wgExtensionMessagesFiles for the case where a wiki farm uses different messages for different wikis. 2009-09-18 03:34:34 +00:00