return $this->historyPage->getArticle();
}
+ function getTitle() {
+ return $this->title;
+ }
+
function getSqlComment() {
if ( $this->conds ) {
return 'history page filtered'; // potentially slow, see CR r58153
'tables' => array( 'revision' ),
'fields' => Revision::selectFields(),
'conds' => array_merge(
- array( 'rev_page' => $this->historyPage->getTitle()->getArticleID() ),
+ array( 'rev_page' => $this->title->getArticleID() ),
$this->conds ),
'options' => array( 'USE INDEX' => array( 'revision' => 'page_timestamp' ) ),
'join_conds' => array( 'tag_summary' => array( 'LEFT JOIN', 'ts_rev_id=rev_id' ) ),
$this->buttons = '<div>';
$this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions' ),
array( 'class' => 'historysubmit' )
- + $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'compareselectedversions' )
+ + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' )
) . "\n";
if ( $wgUser->isAllowed( 'deleterevision' ) ) {
$s .= $this->getRevisionButton( 'revisiondelete', 'showhideselectedversions' );
}
- if ( $wgUser->isAllowed( 'revisionmove' ) ) {
- $s .= $this->getRevisionButton( 'revisionmove', 'revisionmoveselectedversions' );
- }
$this->buttons .= '</div>';
$s .= '</div><ul id="pagehistory">' . "\n";
return $s;
}
private function getRevisionButton( $name, $msg ) {
- global $wgContLang;
$this->preventClickjacking();
- $float = $wgContLang->alignEnd();
# Note bug #20966, <button> is non-standard in IE<8
$element = Html::element( 'button',
array(
'type' => 'submit',
'name' => $name,
'value' => '1',
- 'style' => "float: $float;",
- 'class' => "mw-history-$name-button",
+ 'class' => "mw-history-$name-button mw-float-end",
),
wfMsg( $msg )
) . "\n";
$del = '';
// Show checkboxes for each revision
- if ( $wgUser->isAllowed( 'deleterevision', 'revisionmove' ) ) {
+ if ( $wgUser->isAllowed( 'deleterevision' ) ) {
$this->preventClickjacking();
// If revision was hidden from sysops, disable the checkbox
- // However, if the user has revisionmove rights, we cannot disable the checkbox
- if ( !$rev->userCan( Revision::DELETED_RESTRICTED ) && !$wgUser->isAllowed( 'revisionmove' ) ) {
+ if ( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
$del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) );
// Otherwise, enable the checkbox...
} else {
array( 'name' => 'ids[' . $rev->getId() . ']' ) );
}
// User can only view deleted revisions...
- } else if ( $rev->getVisibility() && $wgUser->isAllowed( 'deletedhistory' ) ) {
+ } elseif ( $rev->getVisibility() && $wgUser->isAllowed( 'deletedhistory' ) ) {
// If revision was hidden from sysops, disable the link
if ( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
$cdel = $this->getSkin()->revDeleteLinkDisabled( false );
$s .= " $del ";
}
+ $dirmark = $wgLang->getDirMark();
+
$s .= " $link";
+ $s .= $dirmark;
$s .= " <span class='history-user'>" .
$this->getSkin()->revUserTools( $rev, true ) . "</span>";
+ $s .= $dirmark;
if ( $rev->isMinor() ) {
$s .= ' ' . ChangesList::flag( 'minor' );
if ( !$rev->userCan( Revision::DELETED_TEXT ) ) {
$radio['disabled'] = 'disabled';
$checkmark = array(); // We will check the next possible one
- } else if ( !$this->oldIdChecked ) {
+ } elseif ( !$this->oldIdChecked ) {
$checkmark = array( 'checked' => 'checked' );
$this->oldIdChecked = $id;
} else {