(bug 20052) Watch checkbox on Special:Movepage is checked by default when the old...
[lhc/web/wiklou.git] / maintenance / http_session_download.php
index 264c8af..3abaaf6 100644 (file)
@@ -27,19 +27,18 @@ require_once( dirname(__FILE__) . '/Maintenance.php' );
 
 class HttpSessionDownload extends Maintenance {
        public function __construct() {
+               global $wgUseNormalUser;
                parent::__construct();
                $this->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() {
-               global $wgUseNormalUser;
+               
                wfProfileIn(__METHOD__);
 
-               // act like a "normal user"
-               $wgUseNormalUser = true;
-
                //run the download: 
                Http::doSessionIdDownload( $this->getOption('sid'), $this->getOption('usk') );