summaryrefslogtreecommitdiff
path: root/includes/PatrolLog.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/PatrolLog.php
parentd7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff)
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/PatrolLog.php')
-rw-r--r--includes/PatrolLog.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/includes/PatrolLog.php b/includes/PatrolLog.php
index a22839ff..35cb4a02 100644
--- a/includes/PatrolLog.php
+++ b/includes/PatrolLog.php
@@ -46,14 +46,19 @@ class PatrolLog {
# these conditions would have gone into recentchanges, which we aren't
# supposed to be updating
if( is_object( $skin ) ) {
- list( $cur, $prev, $auto ) = $params;
+ list( $cur, /* $prev */, $auto ) = $params;
# Standard link to the page in question
$link = $skin->makeLinkObj( $title );
- # Generate a diff link
- $bits[] = 'oldid=' . urlencode( $cur );
- $bits[] = 'diff=prev';
- $bits = implode( '&', $bits );
- $diff = $skin->makeLinkObj( $title, htmlspecialchars( wfMsg( 'patrol-log-diff', $cur ) ), $bits );
+ if( $title->exists() ) {
+ # Generate a diff link
+ $bits[] = 'oldid=' . urlencode( $cur );
+ $bits[] = 'diff=prev';
+ $bits = implode( '&', $bits );
+ $diff = $skin->makeKnownLinkObj( $title, htmlspecialchars( wfMsg( 'patrol-log-diff', $cur ) ), $bits );
+ } else {
+ # Don't bother with a diff link, it's useless
+ $diff = htmlspecialchars( wfMsg( 'patrol-log-diff', $cur ) );
+ }
# Indicate whether or not the patrolling was automatic
$auto = $auto ? wfMsgHtml( 'patrol-log-auto' ) : '';
# Put it all together
@@ -80,4 +85,3 @@ class PatrolLog {
}
-?> \ No newline at end of file