Index: trunk/phase3/maintenance/http_session_download.php |
— | — | @@ -27,19 +27,18 @@ |
28 | 28 | |
29 | 29 | class HttpSessionDownload extends Maintenance { |
30 | 30 | public function __construct() { |
| 31 | + global $wgUseNormalUser; |
31 | 32 | parent::__construct(); |
32 | 33 | $this->mDescription = "Simple entry point to initiate a background download"; |
33 | 34 | $this->addOption( 'sid', 'Session ID', true, true ); |
34 | 35 | $this->addOption( 'usk', 'Upload session key', true, true ); |
| 36 | + $wgUseNormalUser = true; |
35 | 37 | } |
36 | 38 | |
37 | 39 | public function execute() { |
38 | | - global $wgUseNormalUser; |
| 40 | + |
39 | 41 | wfProfileIn(__METHOD__); |
40 | 42 | |
41 | | - // act like a "normal user" |
42 | | - $wgUseNormalUser = true; |
43 | | - |
44 | 43 | //run the download: |
45 | 44 | Http::doSessionIdDownload( $this->getOption('sid'), $this->getOption('usk') ); |
46 | 45 | |
Index: trunk/phase3/maintenance/eval.php |
— | — | @@ -35,15 +35,16 @@ |
36 | 36 | class EvalPrompt extends Maintenance { |
37 | 37 | |
38 | 38 | public function __construct() { |
| 39 | + global $wgUseNormalUser; |
39 | 40 | parent::__construct(); |
40 | 41 | $this->mDescription = "This script lets a command-line user start up the wiki engine and then poke\n" . |
41 | 42 | "about by issuing PHP commands directly."; |
42 | 43 | $this->addOption( 'd', "Enable MediaWiki debug output", false, true ); |
| 44 | + $wgUseNormalUser = (bool)getenv('MW_WIKIUSER'); |
43 | 45 | } |
44 | 46 | |
45 | 47 | public function execute() { |
46 | | - global $wgUseNormalUser, $wgDebugFunctionEntry, $wgDebugLogFile; |
47 | | - $wgUseNormalUser = (bool)getenv('MW_WIKIUSER'); |
| 48 | + global $wgDebugFunctionEntry, $wgDebugLogFile; |
48 | 49 | if ( $this->hasOption('d') ) { |
49 | 50 | $d = $this->getOption('d'); |
50 | 51 | if ( $d > 0 ) { |