Index: trunk/phase3/maintenance/httpSessionDownload.php |
— | — | @@ -1,57 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Simple entry point to initiate a background download |
5 | | - * |
6 | | - * arguments: |
7 | | - * --sid {$session_id} --usk {$upload_session_key} --wiki {wfWikiId()} |
8 | | - * |
9 | | - * This program is free software; you can redistribute it and/or modify |
10 | | - * it under the terms of the GNU General Public License as published by |
11 | | - * the Free Software Foundation; either version 2 of the License, or |
12 | | - * (at your option) any later version. |
13 | | - * |
14 | | - * This program is distributed in the hope that it will be useful, |
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | | - * GNU General Public License for more details. |
18 | | - * |
19 | | - * You should have received a copy of the GNU General Public License along |
20 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
21 | | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
22 | | - * http://www.gnu.org/copyleft/gpl.html |
23 | | - * |
24 | | - * @ingroup Maintenance |
25 | | - */ |
26 | | - |
27 | | -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); |
28 | | - |
29 | | -class HttpSessionDownload extends Maintenance { |
30 | | - public function __construct() { |
31 | | - parent::__construct(); |
32 | | - $this->mDescription = "Simple entry point to initiate a background download"; |
33 | | - $this->addOption( 'sid', 'Session ID', true, true ); |
34 | | - $this->addOption( 'usk', 'Upload session key', true, true ); |
35 | | - } |
36 | | - |
37 | | - public function execute() { |
38 | | - wfProfileIn( __METHOD__ ); |
39 | | - |
40 | | - // run the download: |
41 | | - Http::doSessionIdDownload( $this->getOption( 'sid' ), $this->getOption( 'usk' ) ); |
42 | | - |
43 | | - // close up shop: |
44 | | - // Execute any deferred updates |
45 | | - wfDoUpdates(); |
46 | | - |
47 | | - // Log what the user did, for book-keeping purposes. |
48 | | - wfLogProfilingData(); |
49 | | - |
50 | | - // Shut down the database before exit |
51 | | - wfGetLBFactory()->shutdown(); |
52 | | - |
53 | | - wfProfileOut( __METHOD__ ); |
54 | | - } |
55 | | -} |
56 | | - |
57 | | -$maintClass = "HttpSessionDownload"; |
58 | | -require_once( RUN_MAINTENANCE_IF_MAIN ); |