/* private */ var $mMinorEdit, $mRedirectedFrom;
/* private */ var $mTouched, $mFileCache;
- function Article() { $this->clear(); }
+ function Article( &$title ) {
+ $this->mTitle =& $title;
+ $this->clear();
+ }
/* private */ function clear()
{
$this->mTouched = "19700101000000";
}
- /* static */ function newFromID( $newid )
- {
- global $wgOut, $wgTitle, $wgArticle;
- $a = new Article();
- $n = Article::nameOf( $newid );
-
- $wgTitle = Title::newFromDBkey( $n );
- $wgTitle->resetArticleID( $newid );
-
- return $a;
- }
-
- /* static */ function nameOf( $id )
- {
- $sql = "SELECT cur_namespace,cur_title FROM cur WHERE " .
- "cur_id={$id}";
- $res = wfQuery( $sql, "Article::nameOf" );
- if ( 0 == wfNumRows( $res ) ) { return NULL; }
-
- $s = wfFetchObject( $res );
- $n = Title::makeName( $s->cur_namespace, $s->cur_title );
- return $n;
- }
-
# Note that getContent/loadContent may follow redirects if
# not told otherwise, and so may cause a change to wgTitle.
function getContent( $noredir = false )
{
- global $action,$section,$count,$wgTitle; # From query string
+ global $action,$section,$count; # From query string
wfProfileIn( "Article::getContent" );
if ( 0 == $this->getID() ) {
if ( "edit" == $action ) {
-
- global $wgTitle;
return ""; # was "newarticletext", now moved above the box)
-
-
}
wfProfileOut();
return wfMsg( "noarticletext" );
if(
# check if we're displaying a [[User talk:x.x.x.x]] anonymous talk page
- ( $wgTitle->getNamespace() == Namespace::getTalk( Namespace::getUser()) ) &&
- preg_match("/^\d{1,3}\.\d{1,3}.\d{1,3}\.\d{1,3}$/",$wgTitle->getText()) &&
+ ( $this->mTitle->getNamespace() == Namespace::getTalk( Namespace::getUser()) ) &&
+ preg_match("/^\d{1,3}\.\d{1,3}.\d{1,3}\.\d{1,3}$/",$this->mTitle->getText()) &&
$action=="view"
)
{
function loadContent( $noredir = false )
{
- global $wgOut, $wgTitle, $wgMwRedir;
+ global $wgOut, $wgMwRedir;
global $oldid, $redirect; # From query
if ( $this->mContentLoaded ) return;
# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
- $t = $wgTitle->getPrefixedText();
+ $t = $this->mTitle->getPrefixedText();
if ( $oldid ) { $t .= ",oldid={$oldid}"; }
if ( $redirect ) { $t .= ",redirect={$redirect}"; }
$this->mContent = str_replace( "$1", $t, wfMsg( "missingarticle" ) );
$res = wfQuery( $sql, $fname );
if ( 0 != wfNumRows( $res ) ) {
- $this->mRedirectedFrom = $wgTitle->getPrefixedText();
- $wgTitle = $rt;
+ $this->mRedirectedFrom = $this->mTitle->getPrefixedText();
+ $this->mTitle = $rt;
$s = wfFetchObject( $res );
}
}
$this->mCounter = $s->cur_counter;
$this->mTimestamp = $s->cur_timestamp;
$this->mTouched = $s->cur_touched;
- $wgTitle->mRestrictions = explode( ",", trim( $s->cur_restrictions ) );
- $wgTitle->mRestrictionsLoaded = true;
+ $this->mTitle->mRestrictions = explode( ",", trim( $s->cur_restrictions ) );
+ $this->mTitle->mRestrictionsLoaded = true;
wfFreeResult( $res );
} else { # oldid set, retrieve historical version
$sql = "SELECT old_text,old_timestamp,old_user FROM old " .
$this->mContentLoaded = true;
}
- function getID() { global $wgTitle; return $wgTitle->getArticleID(); }
+ function getID() { return $this->mTitle->getArticleID(); }
function getCount()
{
function isCountable( $text )
{
- global $wgTitle, $wgUseCommaCount, $wgMwRedir;
+ global $wgUseCommaCount, $wgMwRedir;
- if ( 0 != $wgTitle->getNamespace() ) { return 0; }
+ if ( 0 != $this->mTitle->getNamespace() ) { return 0; }
if ( $wgMwRedir->matchStart( $text ) ) { return 0; }
$token = ($wgUseCommaCount ? "," : "[[" );
if ( false === strstr( $text, $token ) ) { return 0; }
function view()
{
- global $wgUser, $wgOut, $wgTitle, $wgLang;
+ global $wgUser, $wgOut, $wgLang;
global $oldid, $diff; # From query
global $wgLinkCache;
wfProfileIn( "Article::view" );
# diff page instead of the article.
if ( isset( $diff ) ) {
- $wgOut->setPageTitle( $wgTitle->getPrefixedText() );
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
$de = new DifferenceEngine( $oldid, $diff );
$de->showDiffPage();
wfProfileOut();
return;
}
$text = $this->getContent(); # May change wgTitle!
- $wgOut->setPageTitle( $wgTitle->getPrefixedText() );
- $wgOut->setHTMLTitle( $wgTitle->getPrefixedText() .
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ $wgOut->setHTMLTitle( $this->mTitle->getPrefixedText() .
" - " . wfMsg( "wikititlesuffix" ) );
# We're looking at an old revision
}
$wgOut->checkLastModified( $this->mTouched );
$this->tryFileCache();
- $wgLinkCache->preFill( $wgTitle );
+ $wgLinkCache->preFill( $this->mTitle );
$wgOut->addWikiText( $text );
# If the article we've just shown is in the "Image" namespace,
# follow it with the history list and link list for the image
# it describes.
- if ( Namespace::getImage() == $wgTitle->getNamespace() ) {
+ if ( Namespace::getImage() == $this->mTitle->getNamespace() ) {
$this->imageHistory();
$this->imageLinks();
}
/* private */ function insertNewArticle( $text, $summary, $isminor, $watchthis )
{
- global $wgOut, $wgUser, $wgTitle, $wgLinkCache, $wgMwRedir;
+ global $wgOut, $wgUser, $wgLinkCache, $wgMwRedir;
$fname = "Article::insertNewArticle";
- $ns = $wgTitle->getNamespace();
- $ttl = $wgTitle->getDBkey();
+ $ns = $this->mTitle->getNamespace();
+ $ttl = $this->mTitle->getDBkey();
$text = $this->preSaveTransform( $text );
if ( $wgMwRedir->matchStart( $text ) ) { $redir = 1; }
else { $redir = 0; }
$res = wfQuery( $sql, $fname );
$newid = wfInsertId();
- $wgTitle->resetArticleID( $newid );
+ $this->mTitle->resetArticleID( $newid );
$sql = "INSERT INTO recentchanges (rc_timestamp,rc_cur_time," .
"rc_namespace,rc_title,rc_new,rc_minor,rc_cur_id,rc_user," .
( $wgUser->isBot() ? 1 : 0 ) . ")";
wfQuery( $sql, $fname );
if ($watchthis) {
- if(!$wgTitle->userIsWatching()) $this->watch();
+ if(!$this->mTitle->userIsWatching()) $this->watch();
} else {
- if ( $wgTitle->userIsWatching() ) {
+ if ( $this->mTitle->userIsWatching() ) {
$this->unwatch();
}
}
function updateArticle( $text, $summary, $minor, $watchthis, $section="" )
{
- global $wgOut, $wgUser, $wgTitle, $wgLinkCache;
+ global $wgOut, $wgUser, $wgLinkCache;
global $wgDBtransactions, $wgMwRedir;
$fname = "Article::updateArticle";
$sql = "INSERT INTO old (old_namespace,old_title,old_text," .
"old_comment,old_user,old_user_text,old_timestamp," .
"old_minor_edit,inverse_timestamp) VALUES (" .
- $wgTitle->getNamespace() . ", '" .
- wfStrencode( $wgTitle->getDBkey() ) . "', '" .
+ $this->mTitle->getNamespace() . ", '" .
+ wfStrencode( $this->mTitle->getDBkey() ) . "', '" .
wfStrencode( $oldtext ) . "', '" .
wfStrencode( $this->getComment() ) . "', " .
$this->getUser() . ", '" .
$sql = "INSERT INTO recentchanges (rc_timestamp,rc_cur_time," .
"rc_namespace,rc_title,rc_new,rc_minor,rc_bot,rc_cur_id,rc_user," .
"rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid) VALUES (" .
- "'{$now}','{$now}'," . $wgTitle->getNamespace() . ",'" .
- wfStrencode( $wgTitle->getDBkey() ) . "',0,{$me2}," .
+ "'{$now}','{$now}'," . $this->mTitle->getNamespace() . ",'" .
+ wfStrencode( $this->mTitle->getDBkey() ) . "',0,{$me2}," .
( $wgUser->isBot() ? 1 : 0 ) . "," .
$this->getID() . "," . $wgUser->getID() . ",'" .
wfStrencode( $wgUser->getName() ) . "','" .
wfQuery( $sql, $fname );
$sql = "UPDATE recentchanges SET rc_this_oldid={$oldid} " .
- "WHERE rc_namespace=" . $wgTitle->getNamespace() . " AND " .
- "rc_title='" . wfStrencode( $wgTitle->getDBkey() ) . "' AND " .
+ "WHERE rc_namespace=" . $this->mTitle->getNamespace() . " AND " .
+ "rc_title='" . wfStrencode( $this->mTitle->getDBkey() ) . "' AND " .
"rc_timestamp='" . $this->getTimestamp() . "'";
wfQuery( $sql, $fname );
}
if ($watchthis) {
- if (!$wgTitle->userIsWatching()) $this->watch();
+ if (!$this->mTitle->userIsWatching()) $this->watch();
} else {
- if ( $wgTitle->userIsWatching() ) {
+ if ( $this->mTitle->userIsWatching() ) {
$this->unwatch();
}
}
function showArticle( $text, $subtitle )
{
- global $wgOut, $wgTitle, $wgUser, $wgLinkCache, $wgUseBetterLinksUpdate;
+ global $wgOut, $wgUser, $wgLinkCache, $wgUseBetterLinksUpdate;
global $wgMwRedir;
$wgLinkCache = new LinkCache();
# Get old version of link table to allow incremental link updates
if ( $wgUseBetterLinksUpdate ) {
- $wgLinkCache->preFill( $wgTitle );
+ $wgLinkCache->preFill( $this->mTitle );
$wgLinkCache->clear();
}
$r = "redirect=no";
else
$r = "";
- $wgOut->redirect( wfLocalUrl( $wgTitle->getPrefixedURL(), $r ) );
+ $wgOut->redirect( wfLocalUrl( $this->mTitle->getPrefixedURL(), $r ) );
}
# If the page we've just displayed is in the "Image" namespace,
function imageHistory()
{
- global $wgUser, $wgOut, $wgLang, $wgTitle;
+ global $wgUser, $wgOut, $wgLang;
$fname = "Article::imageHistory";
$sql = "SELECT img_size,img_description,img_user," .
"img_user_text,img_timestamp FROM image WHERE " .
- "img_name='" . wfStrencode( $wgTitle->getDBkey() ) . "'";
+ "img_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "'";
$res = wfQuery( $sql, $fname );
if ( 0 == wfNumRows( $res ) ) { return; }
$line = wfFetchObject( $res );
$s .= $sk->imageHistoryLine( true, $line->img_timestamp,
- $wgTitle->getText(), $line->img_user,
+ $this->mTitle->getText(), $line->img_user,
$line->img_user_text, $line->img_size, $line->img_description );
$sql = "SELECT oi_size,oi_description,oi_user," .
"oi_user_text,oi_timestamp,oi_archive_name FROM oldimage WHERE " .
- "oi_name='" . wfStrencode( $wgTitle->getDBkey() ) . "' " .
+ "oi_name='" . wfStrencode( $this->mTitle->getDBkey() ) . "' " .
"ORDER BY oi_timestamp DESC";
$res = wfQuery( $sql, $fname );
function imageLinks()
{
- global $wgUser, $wgOut, $wgTitle;
+ global $wgUser, $wgOut;
$wgOut->addHTML( "<h2>" . wfMsg( "imagelinks" ) . "</h2>\n" );
$sql = "SELECT il_from FROM imagelinks WHERE il_to='" .
- wfStrencode( $wgTitle->getDBkey() ) . "'";
+ wfStrencode( $this->mTitle->getDBkey() ) . "'";
$res = wfQuery( $sql, "Article::imageLinks" );
if ( 0 == wfNumRows( $res ) ) {
function watch()
{
- global $wgUser, $wgTitle, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgLang;
global $wgDeferredUpdateList;
if ( 0 == $wgUser->getID() ) {
$wgOut->readOnlyPage();
return;
}
- $wgUser->addWatch( $wgTitle );
+ $wgUser->addWatch( $this->mTitle );
$wgOut->setPagetitle( wfMsg( "addedwatch" ) );
$wgOut->setRobotpolicy( "noindex,follow" );
$sk = $wgUser->getSkin() ;
- $link = $sk->makeKnownLink ( $wgTitle->getPrefixedText() ) ;
+ $link = $sk->makeKnownLink ( $this->mTitle->getPrefixedText() ) ;
$text = str_replace( "$1", $link ,
wfMsg( "addedwatchtext" ) );
function unwatch()
{
- global $wgUser, $wgTitle, $wgOut, $wgLang;
+ global $wgUser, $wgOut, $wgLang;
global $wgDeferredUpdateList;
if ( 0 == $wgUser->getID() ) {
$wgOut->readOnlyPage();
return;
}
- $wgUser->removeWatch( $wgTitle );
+ $wgUser->removeWatch( $this->mTitle );
$wgOut->setPagetitle( wfMsg( "removedwatch" ) );
$wgOut->setRobotpolicy( "noindex,follow" );
$sk = $wgUser->getSkin() ;
- $link = $sk->makeKnownLink ( $wgTitle->getPrefixedText() ) ;
+ $link = $sk->makeKnownLink ( $this->mTitle->getPrefixedText() ) ;
$text = str_replace( "$1", $link ,
wfMsg( "removedwatchtext" ) );
function history()
{
- global $wgUser, $wgOut, $wgLang, $wgTitle, $offset, $limit;
+ global $wgUser, $wgOut, $wgLang, $offset, $limit;
# If page hasn't changed, client can cache this
$wgOut->checkLastModified( $this->getTimestamp() );
wfProfileIn( "Article::history" );
- $wgOut->setPageTitle( $wgTitle->getPRefixedText() );
+ $wgOut->setPageTitle( $this->mTitle->getPRefixedText() );
$wgOut->setSubtitle( wfMsg( "revhistory" ) );
$wgOut->setArticleFlag( false );
$wgOut->setRobotpolicy( "noindex,nofollow" );
- if( $wgTitle->getArticleID() == 0 ) {
+ if( $this->mTitle->getArticleID() == 0 ) {
$wgOut->addHTML( wfMsg( "nohistory" ) );
wfProfileOut();
return;
$offset = (int)$offset;
$limit = (int)$limit;
if( $limit == 0 ) $limit = 50;
- $namespace = $wgTitle->getNamespace();
- $title = $wgTitle->getText();
+ $namespace = $this->mTitle->getNamespace();
+ $title = $this->mTitle->getText();
$sql = "SELECT old_id,old_user," .
"old_comment,old_user_text,old_timestamp,old_minor_edit ".
"FROM old USE INDEX (name_title_timestamp) " .
"WHERE old_namespace={$namespace} AND " .
- "old_title='" . wfStrencode( $wgTitle->getDBkey() ) . "' " .
+ "old_title='" . wfStrencode( $this->mTitle->getDBkey() ) . "' " .
"ORDER BY inverse_timestamp LIMIT $offset, $limit";
$res = wfQuery( $sql, "Article::history" );
$revs = wfNumRows( $res );
- if( $wgTitle->getArticleID() == 0 ) {
+ if( $this->mTitle->getArticleID() == 0 ) {
$wgOut->addHTML( wfMsg( "nohistory" ) );
wfProfileOut();
return;
$sk = $wgUser->getSkin();
$numbar = wfViewPrevNext(
$offset, $limit,
- $wgTitle->getPrefixedText(),
+ $this->mTitle->getPrefixedText(),
"action=history" );
$s = $numbar;
$s .= $sk->beginHistoryList();
function protect()
{
- global $wgUser, $wgOut, $wgTitle;
+ global $wgUser, $wgOut;
if ( ! $wgUser->isSysop() ) {
$wgOut->sysopRequired();
$wgOut->readOnlyPage();
return;
}
- $id = $wgTitle->getArticleID();
+ $id = $this->mTitle->getArticleID();
if ( 0 == $id ) {
$wgOut->fatalEror( wfMsg( "badarticleerror" ) );
return;
"cur_restrictions='sysop' WHERE cur_id={$id}";
wfQuery( $sql, "Article::protect" );
- $wgOut->redirect( wfLocalUrl( $wgTitle->getPrefixedURL() ) );
+ $wgOut->redirect( wfLocalUrl( $this->mTitle->getPrefixedURL() ) );
}
function unprotect()
{
- global $wgUser, $wgOut, $wgTitle;
+ global $wgUser, $wgOut;
if ( ! $wgUser->isSysop() ) {
$wgOut->sysopRequired();
$wgOut->readOnlyPage();
return;
}
- $id = $wgTitle->getArticleID();
+ $id = $this->mTitle->getArticleID();
if ( 0 == $id ) {
$wgOut->fatalEror( wfMsg( "badarticleerror" ) );
return;
"cur_restrictions='' WHERE cur_id={$id}";
wfQuery( $sql, "Article::unprotect" );
- $wgOut->redirect( wfLocalUrl( $wgTitle->getPrefixedURL() ) );
+ $wgOut->redirect( wfLocalUrl( $this->mTitle->getPrefixedURL() ) );
}
function delete()
{
- global $wgUser, $wgOut, $wgTitle;
+ global $wgUser, $wgOut;
global $wpConfirm, $wpReason, $image, $oldimage;
# Anybody can delete old revisions of images; only sysops
$sub = str_replace( "$1", $image, wfMsg( "deletesub" ) );
} else {
- if ( ( "" == trim( $wgTitle->getText() ) )
- or ( $wgTitle->getArticleId() == 0 ) ) {
+ if ( ( "" == trim( $this->mTitle->getText() ) )
+ or ( $this->mTitle->getArticleId() == 0 ) ) {
$wgOut->fatalError( wfMsg( "cannotdelete" ) );
return;
}
- $sub = str_replace( "$1", $wgTitle->getPrefixedText(),
+ $sub = str_replace( "$1", $this->mTitle->getPrefixedText(),
wfMsg( "deletesub" ) );
# determine whether this page has earlier revisions
# and insert a warning if it does
# we select the text because it might be useful below
- $sql="SELECT old_text FROM old WHERE old_namespace=0 and old_title='" . wfStrencode($wgTitle->getPrefixedDBkey())."' ORDER BY inverse_timestamp LIMIT 1";
+ $sql="SELECT old_text FROM old WHERE old_namespace=0 and old_title='" . wfStrencode($this->mTitle->getPrefixedDBkey())."' ORDER BY inverse_timestamp LIMIT 1";
$res=wfQuery($sql,$fname);
if( ($old=wfFetchObject($res)) && !$wpConfirm ) {
$skin=$wgUser->getSkin();
$wgOut->addHTML( $skin->historyLink() ."</B><P>");
}
- $sql="SELECT cur_text FROM cur WHERE cur_namespace=0 and cur_title='" . wfStrencode($wgTitle->getPrefixedDBkey())."'";
+ $sql="SELECT cur_text FROM cur WHERE cur_namespace=0 and cur_title='" . wfStrencode($this->mTitle->getPrefixedDBkey())."'";
$res=wfQuery($sql,$fname);
if( ($s=wfFetchObject($res))) {
$wgOut->setRobotpolicy( "noindex,nofollow" );
$wgOut->addWikiText( wfMsg( "confirmdeletetext" ) );
- $t = $wgTitle->getPrefixedURL();
+ $t = $this->mTitle->getPrefixedURL();
$q = "action=delete";
if ( $image ) {
function doDelete()
{
- global $wgOut, $wgTitle, $wgUser, $wgLang;
+ global $wgOut, $wgUser, $wgLang;
global $image, $oldimage, $wpReason;
$fname = "Article::doDelete";
$deleted = $oldimage;
} else {
- $this->doDeleteArticle( $wgTitle );
- $deleted = $wgTitle->getPrefixedText();
+ $this->doDeleteArticle( $this->mTitle );
+ $deleted = $this->mTitle->getPrefixedText();
}
$wgOut->setPagetitle( wfMsg( "actioncomplete" ) );
$wgOut->setRobotpolicy( "noindex,nofollow" );
function doDeleteArticle( $title )
{
- global $wgUser, $wgOut, $wgLang, $wpReason, $wgTitle, $wgDeferredUpdateList;
+ global $wgUser, $wgOut, $wgLang, $wpReason, $wgDeferredUpdateList;
$fname = "Article::doDeleteArticle";
$ns = $title->getNamespace();
$log->addEntry( str_replace( "$1", $art, wfMsg( "deletedarticle" ) ), $wpReason );
# Clear the cached article id so the interface doesn't act like we exist
- $wgTitle->resetArticleID( 0 );
- $wgTitle->mArticleID = 0;
+ $this->mTitle->resetArticleID( 0 );
+ $this->mTitle->mArticleID = 0;
}
function revert()
function rollback()
{
- global $wgUser, $wgTitle, $wgLang, $wgOut, $from;
+ global $wgUser, $wgLang, $wgOut, $from;
if ( ! $wgUser->isSysop() ) {
$wgOut->sysopRequired();
}
# Replace all this user's current edits with the next one down
- $tt = wfStrencode( $wgTitle->getDBKey() );
- $n = $wgTitle->getNamespace();
+ $tt = wfStrencode( $this->mTitle->getDBKey() );
+ $n = $this->mTitle->getNamespace();
# Get the last editor
$sql = "SELECT cur_id,cur_user,cur_user_text,cur_comment FROM cur WHERE cur_title='{$tt}' AND cur_namespace={$n}";
if( $from != $s->cur_user_text ) {
$wgOut->setPageTitle(wfmsg("rollbackfailed"));
$wgOut->addWikiText( wfMsg( "alreadyrolled",
- htmlspecialchars( $wgTitle->getPrefixedText()),
+ htmlspecialchars( $this->mTitle->getPrefixedText()),
htmlspecialchars( $from ),
htmlspecialchars( $s->cur_user_text ) ) );
if($s->cur_comment != "") {
$wgOut->setPagetitle( wfMsg( "actioncomplete" ) );
$wgOut->setRobotpolicy( "noindex,nofollow" );
$wgOut->addHTML( "<h2>" . $newcomment . "</h2>\n<hr>\n" );
- $this->updateArticle( $s->old_text, $newcomment, 1, $wgTitle->userIsWatching() );
+ $this->updateArticle( $s->old_text, $newcomment, 1, $this->mTitle->userIsWatching() );
$wgOut->returnToMain( false );
}
/* private */ function viewUpdates()
{
- global $wgDeferredUpdateList, $wgTitle;
+ global $wgDeferredUpdateList;
if ( 0 != $this->getID() ) {
$u = new ViewCountUpdate( $this->getID() );
$u = new SiteStatsUpdate( 1, 0, 0 );
array_push( $wgDeferredUpdateList, $u );
- $u = new UserTalkUpdate( 0, $wgTitle->getNamespace(),
- $wgTitle->getDBkey() );
+ $u = new UserTalkUpdate( 0, $this->mTitle->getNamespace(),
+ $this->mTitle->getDBkey() );
array_push( $wgDeferredUpdateList, $u );
}
}
/* private */ function editUpdates( $text )
{
- global $wgDeferredUpdateList, $wgTitle;
+ global $wgDeferredUpdateList;
wfSeedRandom();
if ( 0 == mt_rand( 0, 999 ) ) {
wfQuery( $sql );
}
$id = $this->getID();
- $title = $wgTitle->getPrefixedDBkey();
+ $title = $this->mTitle->getPrefixedDBkey();
$adj = $this->mCountAdjustment;
if ( 0 != $id ) {
$u = new SearchUpdate( $id, $title, $text );
array_push( $wgDeferredUpdateList, $u );
- $u = new UserTalkUpdate( 1, $wgTitle->getNamespace(),
- $wgTitle->getDBkey() );
+ $u = new UserTalkUpdate( 1, $this->mTitle->getNamespace(),
+ $this->mTitle->getDBkey() );
array_push( $wgDeferredUpdateList, $u );
}
}
/* private */ function pstPass2( $text )
{
- global $wgUser, $wgLang, $wgTitle, $wgLocaltimezone;
+ global $wgUser, $wgLang, $wgLocaltimezone;
# Signatures
#
$p4 = "/\[\[([A-Aa-z _]+):({$np}+) \\(({$np}+)\\)\\|]]/";
# [[ns:page (cont)|]]
$context = "";
- $t = $wgTitle->getText();
+ $t = $this->mTitle->getText();
if ( preg_match( $conpat, $t, $m ) ) {
$context = $m[2];
}
/* Caching functions */
function tryFileCache() {
- global $wgTitle;
-
if($this->isFileCacheable()) {
- $cache = new CacheManager( $wgTitle );
+ $cache = new CacheManager( $this->mTitle );
if($cache->isFileCacheGood( $this->mTouched )) {
wfDebug( " tryFileCache() - about to load\n" );
$cache->loadFromFileCache();
}
function isFileCacheable() {
- global $wgUser, $wgTitle, $wgUseFileCache, $wgShowIPinHeader;
+ global $wgUser, $wgUseFileCache, $wgShowIPinHeader;
global $action, $oldid, $diff, $redirect, $printable;
return $wgUseFileCache
and (!$wgShowIPinHeader)
and ($wgUser->getId() == 0)
and (!$wgUser->getNewtalk())
- and ($wgTitle->getNamespace != Namespace::getSpecial())
+ and ($this->mTitle->getNamespace != Namespace::getSpecial())
and ($action == "view")
and (!isset($oldid))
and (!isset($diff))