From 9bbf7e42a347c54794b6f2f6e60d8a84a5dcd43c Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 18 Oct 2010 14:28:51 +0000 Subject: [PATCH] Revert most of r72335: * 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 | 5 ----- maintenance/helloWorld.php | 28 ---------------------------- 2 files changed, 33 deletions(-) delete mode 100644 maintenance/helloWorld.php diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 6108712833..b660e8dd24 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -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 index 7493214eb2..0000000000 --- a/maintenance/helloWorld.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ - -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' ); -- 2.20.1