var $mSmaxage, $mMaxage;
var $mContentType, $mExpandTemplates;
- function __construct( Article $article, $request = false ) {
+ function __construct( Page $article, $request = false ) {
global $wgRequest, $wgSquidMaxage, $wgJsMimeType, $wgGroupPermissions;
$allowedCTypes = array( 'text/x-wiki', $wgJsMimeType, 'text/css', 'application/x-zope-edit' );
$this->mArticle = $article;
- $this->mTitle = $article->mTitle;
+ $this->mTitle = $article->getTitle();
if( $request === false ) {
$this->mRequest = $wgRequest;
if( !$oldid ) {
# get the current revision so we can get the penultimate one
$this->mArticle->getTouched();
- $oldid = $this->mArticle->mLatest;
+ $oldid = $this->mArticle->getLatest();
}
$prev = $this->mTitle->getPreviousRevisionId( $oldid );
$oldid = $prev ? $prev : -1 ;
}
function getRawText() {
- global $wgUser, $wgOut;
+ global $wgOut, $wgUser;
if( $this->mGen ) {
$sk = $wgUser->getSkin();
if( !StubObject::isRealObject( $wgOut ) ) {
$sk->initPage( $wgOut );
if( $this->mGen == 'css' ) {
return $sk->generateUserStylesheet();
- } else if( $this->mGen == 'js' ) {
+ } elseif( $this->mGen == 'js' ) {
return $sk->generateUserJs();
}
} else {