Revert most of r72335:
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Oct 2010 14:28:51 +0000 (14:28 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Oct 2010 14:28:51 +0000 (14:28 +0000)
* wfRunMaintenance() had scope issues (Maintenance::run() would have the same issues). Also per CR, it doesn't really reduce the amount of code that users are writing
* Example maintenance script doesn't belong here. There's already an example in docs/maintenance.txt, as well as docs on mw.org. Suggest expanding those instead.

maintenance/Maintenance.php
maintenance/helloWorld.php [deleted file]

index 6108712..b660e8d 100644 (file)
@@ -9,11 +9,6 @@
 define( 'DO_MAINTENANCE', dirname( __FILE__ ) . '/doMaintenance.php' );
 $maintClass = false;
 
-function wfRunMaintenance( $class ) {
-       $maintClass = $class;
-       require_once( DO_MAINTENANCE );
-}
-
 // Make sure we're on PHP5 or better
 if ( version_compare( PHP_VERSION, '5.1.0' ) < 0 ) {
        die ( "Sorry! This version of MediaWiki requires PHP 5.1.x; you are running " .
diff --git a/maintenance/helloWorld.php b/maintenance/helloWorld.php
deleted file mode 100644 (file)
index 7493214..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * To the extent possible under law,  I, Mark Hershberger, have waived all copyright and
- * related or neighboring rights to Hello World. This work is published from United States.
- *
- * @file
- * @ingroup Maintenance
- * @copyright CC0 http://creativecommons.org/publicdomain/zero/1.0/
- * @author Mark A. Hershberger <mah@everybody.org>
- */
-
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
-
-class CommandLineInstaller extends Maintenance {
-
-       public function __construct() {
-               parent::__construct();
-
-               $this->addOption( 'name', 'Who to say Hello to', false, true );
-       }
-
-       public function execute() {
-               $name = $this->getOption( 'name', 'World' );
-               echo "Hello, $name!\n";
-       }
-}
-
-wfRunMaintenance( 'CommandLineInstaller' );