*/
class MediaWiki {
/**
- * @todo Fold $output, etc, into this
* @var IContextSource
*/
private $context;
*/
private $config;
- /**
- * @param null|WebRequest $x
- * @return WebRequest
- */
- public function request( WebRequest $x = null ) {
- $old = $this->context->getRequest();
- if ( $x ) {
- $this->context->setRequest( $x );
- }
- return $old;
- }
-
- /**
- * @param null|OutputPage $x
- * @return OutputPage
- */
- public function output( OutputPage $x = null ) {
- $old = $this->context->getOutput();
- if ( $x ) {
- $this->context->setOutput( $x );
- }
- return $old;
- }
-
/**
* @param IContextSource|null $context
*/
* @return Title
*/
public function getTitle() {
- if ( $this->context->getTitle() === null ) {
+ if ( !$this->context->hasTitle() ) {
$this->context->setTitle( $this->parseTitle() );
}
return $this->context->getTitle();
wfProfileIn( 'main-try-filecache' );
if ( HTMLFileCache::useFileCache( $this->context ) ) {
// Try low-level file cache hit
- $cache = HTMLFileCache::newFromTitle( $title, $action );
+ $cache = new HTMLFileCache( $title, $action );
if ( $cache->isCacheGood( /* Assume up to date */ ) ) {
// Check incoming headers to see if client has this cached
$timestamp = $cache->cacheTimestamp();
$query = array( 'title' => 'Special:RunJobs',
'tasks' => 'jobs', 'maxjobs' => $n, 'sigexpiry' => time() + 5 );
- $query['signature'] = SpecialRunJobs::getQuerySignature( $query );
+ $query['signature'] = SpecialRunJobs::getQuerySignature(
+ $query, $this->config->get( 'SecretKey' ) );
$errno = $errstr = null;
$info = wfParseUrl( $this->config->get( 'Server' ) );