summaryrefslogtreecommitdiff
path: root/includes/PageHistory.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-09-14 13:18:58 +0200
commit8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch)
treecd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /includes/PageHistory.php
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/PageHistory.php')
-rw-r--r--includes/PageHistory.php26
1 files changed, 23 insertions, 3 deletions
diff --git a/includes/PageHistory.php b/includes/PageHistory.php
index b1cf41f0..d84c3515 100644
--- a/includes/PageHistory.php
+++ b/includes/PageHistory.php
@@ -62,6 +62,7 @@ class PageHistory {
* Setup page variables.
*/
$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ $wgOut->setPageTitleActionText( wfMsg( 'history_short' ) );
$wgOut->setArticleFlag( false );
$wgOut->setArticleRelated( true );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
@@ -244,8 +245,26 @@ class PageHistory {
if( $row->rev_deleted & Revision::DELETED_TEXT ) {
$s .= ' ' . wfMsgHtml( 'deletedrev' );
}
- if( $wgUser->isAllowed( 'rollback' ) && $latest ) {
- $s .= ' '.$this->mSkin->generateRollback( $rev );
+
+ $tools = array();
+
+ if ( !is_null( $next ) && is_object( $next ) ) {
+ if( $wgUser->isAllowed( 'rollback' ) && $latest ) {
+ $tools[] = '<span class="mw-rollback-link">'
+ . $this->mSkin->buildRollbackLink( $rev )
+ . '</span>';
+ }
+
+ $undolink = $this->mSkin->makeKnownLinkObj(
+ $this->mTitle,
+ wfMsgHtml( 'editundo' ),
+ 'action=edit&undoafter=' . $next->rev_id . '&undo=' . $rev->getId()
+ );
+ $tools[] = "<span class=\"mw-history-undo\">{$undolink}</span>";
+ }
+
+ if( $tools ) {
+ $s .= ' (' . implode( ' | ', $tools ) . ')';
}
wfRunHooks( 'PageHistoryLineEnding', array( &$row , &$s ) );
@@ -589,4 +608,5 @@ class PageHistoryPager extends ReverseChronologicalPager {
}
}
-?>
+
+