dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4e6b21
)
Use quickUserCan for UI links
author
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 29 Dec 2008 22:24:31 +0000
(22:24 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 29 Dec 2008 22:24:31 +0000
(22:24 +0000)
includes/PageHistory.php
patch
|
blob
|
history
diff --git
a/includes/PageHistory.php
b/includes/PageHistory.php
index
b01b485
..
5fd81b3
100644
(file)
--- a/
includes/PageHistory.php
+++ b/
includes/PageHistory.php
@@
-331,14
+331,16
@@
class PageHistory {
}
$tools = array();
}
$tools = array();
-
if( !is_null( $next ) && is_object( $next ) ) {
if( !is_null( $next ) && is_object( $next ) ) {
- if( $latest && $this->mTitle->userCan( 'rollback' ) && $this->mTitle->userCan( 'edit' ) ) {
+ # Add [rollback] link to current revision
+ if( $latest && $this->mTitle->quickUserCan( 'rollback' ) &&
+ $this->mTitle->quickUserCan( 'edit' ) )
+ {
$tools[] = '<span class="mw-rollback-link">'.$this->mSkin->buildRollbackLink( $rev ).'</span>';
}
$tools[] = '<span class="mw-rollback-link">'.$this->mSkin->buildRollbackLink( $rev ).'</span>';
}
-
+ # Add (undo) links to revisions
if( $this->mTitle->quickUserCan( 'edit' ) && !$rev->isDeleted( Revision::DELETED_TEXT ) &&
if( $this->mTitle->quickUserCan( 'edit' ) && !$rev->isDeleted( Revision::DELETED_TEXT ) &&
- !
$next->rev_deleted & Revision::DELETED_TEXT
)
+ !
($next->rev_deleted & Revision::DELETED_TEXT)
)
{
# Create undo tooltip for the first (=latest) line only
$undoTooltip = $latest
{
# Create undo tooltip for the first (=latest) line only
$undoTooltip = $latest