class EvalPrompt extends Maintenance {
public function __construct() {
+ global $wgUseNormalUser;
parent::__construct();
$this->mDescription = "This script lets a command-line user start up the wiki engine and then poke\n" .
"about by issuing PHP commands directly.";
$this->addOption( 'd', "Enable MediaWiki debug output", false, true );
+ $wgUseNormalUser = (bool)getenv('MW_WIKIUSER');
}
public function execute() {
- global $wgUseNormalUser, $wgDebugFunctionEntry, $wgDebugLogFile;
- $wgUseNormalUser = (bool)getenv('MW_WIKIUSER');
+ global $wgDebugFunctionEntry, $wgDebugLogFile;
if ( $this->hasOption('d') ) {
$d = $this->getOption('d');
if ( $d > 0 ) {
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') );