Commit graph

14 commits

Author SHA1 Message Date
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Alexandre Emsenhuber
f7c4c52ba0 Improve documentation of maintenance scripts.
Change-Id: I1c911eb0fd6108fdee0b4e96363d87b926aba396
2012-06-25 21:54:41 +02: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
Sam Reed
487d9a4ec8 Per CR on r75575, remove array_keys() as getModuleNames has array_key'd the returned stuffs 2011-01-12 19:03:59 +00:00
Sam Reed
9015102f59 Fix another typo in r80075 2011-01-12 02:20:41 +00:00
Sam Reed
3253df4a9b Fix typo from r80075
Rename table variable
2011-01-12 02:19:09 +00:00
Sam Reed
4906d50911 Follwup r75575, honour table prefixes. Bad Roan ;) 2011-01-12 02:16:56 +00:00
Sam Reed
298d0344da Followup r75575
reedy@ubuntu64-esxi:~/mediawiki/trunk/phase3/maintenance$ php cleanupRemovedModules.php 
Fatal error: Call to undefined method ResourceLoader::getModules() in /home/reedy/mediawiki/trunk/phase3/maintenance/cleanupRemovedModules.php on line 40
2011-01-12 02:12:53 +00:00
Mark A. Hershberger
617a5b1e15 Whitespace fixup under tha maint directory. 2010-12-04 03:20:14 +00:00
Chad Horohoe
b412b3ed8e (bug 25935) Fix comment in cleanupRemovedModules.php 2010-11-15 12:20:00 +00:00
Roan Kattouw
77e631ae23 Fix copy-paste mistake in @author attribution for cleanupRemovedModules.php 2010-11-06 12:03:39 +00:00
Roan Kattouw
69171cde6d Re-add maintenance script from r75555, not totally broken this time 2010-10-27 20:08:04 +00:00
Roan Kattouw
89b49c49c1 Revert unintended changes in r75555 2010-10-27 18:49:18 +00:00
Roan Kattouw
e31ed04b16 Whitespace fixes for r75486 2010-10-27 15:51:31 +00:00