mDescription = "Simple entry point to initiate a background download"; $this->addOption( 'sid', 'Session ID', true, true ); $this->addOption( 'usk', 'Upload session key', true, true ); } public function execute() { global $wgUseNormalUser; wfProfileIn(__METHOD__); // act like a "normal user" $wgUseNormalUser = true; //run the download: Http::doSessionIdDownload( $options['sid'], $options['usk'] ); // close up shop: // Execute any deferred updates wfDoUpdates(); // Log what the user did, for book-keeping purposes. wfLogProfilingData(); // Shut down the database before exit wfGetLBFactory()->shutdown(); wfProfileOut(__METHOD__); } } $maintClass = "HttpSessionDownload"; require_once( DO_MAINTENANCE );