global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer;
$fname = 'Article::insertNewArticle';
+ wfProfileIn( $fname );
$this->mGoodAdjustment = $this->isCountable( $text );
$this->mTotalAdjustment = 1;
$oldid = 0; # new article
$this->showArticle( $text, wfMsg( 'newarticle' ), false, $isminor, $now, $summary, $oldid );
+ wfProfileOut( $fname );
}
function getTextOfLastEditWithSectionReplacedOrAdded($section, $text, $summary = '', $edittime = NULL) {
global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList, $wgUseFileCache;
$fname = 'Article::updateArticle';
+ wfProfileIn( $fname );
$good = true;
$isminor = ( $minor && $wgUser->isLoggedIn() );
'text' => $text
) );
+ $dbw->immediateCommit();
$dbw->begin();
$revisionId = $revision->insertOn( $dbw );
$this->showArticle( $text, wfMsg( 'updated' ), $sectionanchor, $isminor, $now, $summary, $lastRevision );
}
+ wfProfileOut( $fname );
return $good;
}
global $wgUseDumbLinkUpdate, $wgAntiLockFlags, $wgOut, $wgUser, $wgLinkCache, $wgEnotif;
global $wgUseEnotif;
+ $fname = 'Article::showArticle';
+ wfProfileIn( $fname );
+
$wgLinkCache = new LinkCache();
if ( !$wgUseDumbLinkUpdate ) {
$wgEnotif = new EmailNotification ();
$wgEnotif->notifyOnPageChange( $this->mTitle, $now, $summary, $me2, $oldid );
}
+ wfProfileOut( $fname );
}
/**
$cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
$recentchanges = $dbw->tableName( 'recentchanges' );
$sql = "DELETE FROM $recentchanges WHERE rc_timestamp < '{$cutoff}'";
+ //$dbw->query( $sql ); // HACK: disabled for now, slowness
+
+ // re-enabled for commit of unrelated live changes -- TS
$dbw->query( $sql );
}
$id = $this->getID();