From: Mark A. Hershberger Date: Wed, 13 Jan 2010 04:58:02 +0000 (+0000) Subject: add in session download script X-Git-Tag: 1.31.0-rc.0~38295 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=1d4ff6155337eae83e35740f83a94e1423c8416a;p=lhc%2Fweb%2Fwiklou.git add in session download script --- 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 );