/** @var Content $pstContent */
private $pstContent = null;
- public function __construct( $main, $action ) {
- parent::__construct( $main, $action );
- }
-
public function execute() {
// The data is hot but user-dependent, like page views, so we set vary cookies
$this->getMain()->setCacheMode( 'anon-public-user-private' );
// TODO: Does this still need $wgTitle?
global $wgParser, $wgTitle;
- // Currently unnecessary, code to act as a safeguard against any change in current behaviour of uselang
+ // Currently unnecessary, code to act as a safeguard against any change in current behavior of uselang
$oldLang = null;
if ( isset( $params['uselang'] ) && $params['uselang'] != $this->getContext()->getLanguage()->getCode() ) {
$oldLang = $this->getContext()->getLanguage(); // Backup language
if ( $rev->isCurrent() ) {
// May get from/save to parser cache
$p_result = $this->getParsedContent( $pageObj, $popts,
- $pageid, isset( $prop['wikitext'] ) ) ;
+ $pageid, isset( $prop['wikitext'] ) );
} else { // This is an old revision, so get the text differently
$this->content = $rev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
// Potentially cached
$p_result = $this->getParsedContent( $pageObj, $popts, $pageid,
- isset( $prop['wikitext'] ) ) ;
+ isset( $prop['wikitext'] ) );
}
} else { // Not $oldid, $pageid, $page. Hence based on $text
$titleObj = Title::newFromText( $title );
- if ( !$titleObj ) {
+ if ( !$titleObj || $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', $title ) );
}
if ( !$titleObj->canExist() ) {