'ar_text_id' => 'rev_text_id',
'ar_text' => '\'\'', // Be explicit to appease
'ar_flags' => '\'\'', // MySQL's "strict mode"...
- 'ar_len' => 'rev_len',
+ 'ar_len' => 'rev_len',
'ar_page_id' => 'page_id',
'ar_deleted' => $bitfield
), array(
$sk = $wgUser->getSkin();
$lnk = $current
? wfMsg( 'currentrevisionlink' )
- : $lnk = $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'currentrevisionlink' ) );
+ : $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'currentrevisionlink' ) );
$curdiff = $current
? wfMsg( 'diff' )
: $sk->makeKnownLinkObj( $this->mTitle, wfMsg( 'diff' ), 'diff=cur&oldid='.$oldid );
/* Client cache fresh and headers sent, nothing more to do. */
return;
- $fname = 'PageHistory::history';
- wfProfileIn( $fname );
+ wfProfileIn( __METHOD__ );
/*
* Setup page variables.
$feedType = $wgRequest->getVal( 'feed' );
if( $feedType ) {
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return $this->feed( $feedType );
}
*/
if( !$this->mTitle->exists() ) {
$wgOut->addWikiMsg( 'nohistory' );
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return;
}
$this->endHistoryList() .
$pager->getNavigationBar()
);
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
}
/**
$s .= " $link";
$s .= ' '.$this->mSkin->revUserTools( $rev, true );
-
+
if( $row->rev_minor_edit ) {
- $s .= ' ' . wfElement( 'span', array( 'class' => 'minor' ), wfMsg( 'minoreditletter') );
+ $s .= ' ' . Xml::element( 'span', array( 'class' => 'minor' ), wfMsg( 'minoreditletter') );
}
- if ( !is_null( $size = $rev->getSize() ) ) {
+ if ( !is_null( $size = $rev->getSize() ) && $rev->userCan( Revision::DELETED_TEXT ) ) {
if ( $size == 0 )
$stxt = wfMsgHtml( 'historyempty' );
else
$s .= " <span class=\"history-size\">$stxt</span>";
}
- #getComment is safe, but this is better formatted
- if( $rev->isDeleted( Revision::DELETED_COMMENT ) ) {
- $s .= " <span class=\"history-deleted\"><span class=\"comment\">" .
- wfMsgHtml( 'rev-deleted-comment' ) . "</span></span>";
- } else {
- $s .= $this->mSkin->revComment( $rev );
- }
+ $s .= $this->mSkin->revComment( $rev, false, true );
if ($notificationtimestamp && ($row->rev_timestamp >= $notificationtimestamp)) {
$s .= ' <span class="updatedmarker">' . wfMsgHtml( 'updatedmarker' ) . '</span>';
}
#add blurb about text having been deleted
- if( $row->rev_deleted & Revision::DELETED_TEXT ) {
+ if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
$s .= ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
}
function getLatestId() {
if( is_null( $this->mLatestId ) ) {
$id = $this->mTitle->getArticleID();
- $db = wfGetDB(DB_SLAVE);
+ $db = wfGetDB( DB_SLAVE );
$this->mLatestId = $db->selectField( 'page',
"page_latest",
array( 'page_id' => $id ),
- 'PageHistory::getLatestID' );
+ __METHOD__ );
}
return $this->mLatestId;
}
* used by the main UI but that's now handled by the pager.
*/
function fetchRevisions($limit, $offset, $direction) {
- $fname = 'PageHistory::fetchRevisions';
-
$dbr = wfGetDB( DB_SLAVE );
if ($direction == PageHistory::DIR_PREV)
'revision',
Revision::selectFields(),
array_merge(array("rev_page=$page_id"), $offsets),
- $fname,
+ __METHOD__,
array('ORDER BY' => "rev_timestamp $dirs",
'USE INDEX' => 'page_timestamp', 'LIMIT' => $limit)
);
/** @todo document */
function getNotificationTimestamp() {
global $wgUser, $wgShowUpdatedMarker;
- $fname = 'PageHistory::getNotficationTimestamp';
if ($this->mNotificationTimestamp !== NULL)
return $this->mNotificationTimestamp;
'wl_title' => $this->mTitle->getDBkey(),
'wl_user' => $wgUser->getID()
),
- $fname);
+ __METHOD__ );
// Don't use the special value reserved for telling whether the field is filled
if ( is_null( $this->mNotificationTimestamp ) ) {