diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2009-06-24 02:49:24 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2009-06-24 02:49:24 +0000 |
commit | 1c9773bd015adbf8aedb3b1777f0e087906baf6f (patch) | |
tree | 353da0a7f0f11723ebc93c301ed13528693e380d /docs | |
parent | ceedb37941702f54766b107aee86e28559868304 (diff) | |
download | mediawikicore-1c9773bd015adbf8aedb3b1777f0e087906baf6f.tar.gz mediawikicore-1c9773bd015adbf8aedb3b1777f0e087906baf6f.zip |
Revert r52336 "Merge maintenance-work branch:"
Seems to have broken a bunch of stuff. Don't commit giant non-critical changes that break Setup.php and all maint scripts. Thanks!
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/52340
Diffstat (limited to 'docs')
-rw-r--r-- | docs/maintenance.txt | 54 | ||||
-rw-r--r-- | docs/scripts.txt | 7 |
2 files changed, 4 insertions, 57 deletions
diff --git a/docs/maintenance.txt b/docs/maintenance.txt deleted file mode 100644 index d46d12e27c6f..000000000000 --- a/docs/maintenance.txt +++ /dev/null @@ -1,54 +0,0 @@ -Prior to version 1.16, maintenance scripts were a hodgepodge of code that -had no cohesion or formal method of action. Beginning in 1.16, maintenance -scripts have been cleaned up to use a unified class. - -1. Directory structure -2. How to run a script -3. How to write your own - -1. DIRECTORY STRUCTURE - The /maintenance directory of a MediaWiki installation contains several -subdirectories, all of which have unique purposes. - -2. HOW TO RUN A SCRIPT - Ridiculously simple, just call 'php someScript.php' that's in the top- -level /maintenance directory. - -Example: - php clear_stats.php - -The following parameters are available to all maintenance scripts ---help : Print a help message ---quiet : Quiet non-error output ---dbuser : The database user to use for the script (if needed) ---dbpass : Same as above (if needed) - -3. HOW TO WRITE YOUR OWN -Make a file in the maintenance directory called myScript.php or something. -In it, write the following: - -==BEGIN== - -<?php - -require_once( "Maintenance.php" ); - -class DemoMaint extends Maintenance { - - public function __construct() { - parent::__construct(); - } - - protected function execute() { - } -} - -$maintClass = "DemoMaint"; -require_once( DO_MAINTENANCE ); - -==END== - -That's it. In the execute() method, you have access to all of the normal -MediaWiki functions, so you can get a DB connection, use the cache, etc. -For full docs on the Maintenance class, see the auto-generated docs at -http://svn.wikimedia.org/doc/classMaintenance.html
\ No newline at end of file diff --git a/docs/scripts.txt b/docs/scripts.txt index 2027d176e777..f8228a463ac3 100644 --- a/docs/scripts.txt +++ b/docs/scripts.txt @@ -35,9 +35,10 @@ Primary scripts: to force the profiler to save the informations in the database and apply the maintenance/archives/patch-profiling.sql patch to the database. - To enable the profileinfo.php itself, you'll need to set $wgDBadminuser - and $wgDBadminpassword in your LocalSettings.php, as well as $wgEnableProfileInfo - See also http://www.mediawiki.org/wiki/How_to_debug#Profiling. + To enable the profileinfo.php itself, you'll need to create the + AdminSettings.php file (see AdminSettings.sample for more information) and + set $wgEnableProfileInfo to true in that file. See also + http://www.mediawiki.org/wiki/How_to_debug#Profiling. redirect.php Script that only redirect to the article passed in the wpDropdown parameter |