From 1d4ff6155337eae83e35740f83a94e1423c8416a Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 13 Jan 2010 04:58:02 +0000 Subject: [PATCH] add in session download script --- maintenance/httpSessionDownload.php | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 maintenance/httpSessionDownload.php diff --git a/maintenance/httpSessionDownload.php b/maintenance/httpSessionDownload.php new file mode 100644 index 0000000000..1e927a7300 --- /dev/null +++ b/maintenance/httpSessionDownload.php @@ -0,0 +1,59 @@ +mDescription = "Simple entry point to initiate a background download"; + $this->addOption( 'sid', 'Session ID', true, true ); + $this->addOption( 'usk', 'Upload session key', true, true ); + $wgUseNormalUser = true; + } + + public function execute() { + wfProfileIn(__METHOD__); + + //run the download: + Http::doSessionIdDownload( $this->getOption('sid'), $this->getOption('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 ); -- 2.20.1