From abe00c51c041240f8b9166fc0c2c4ac0f65cfd87 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Tue, 4 Apr 2006 15:00:40 +0000 Subject: [PATCH] (bug 759) Wrap redirects on the watchlist editing page in a span, class "watchlistredir" --- RELEASE-NOTES | 1 + includes/SpecialWatchlist.php | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 721ec350ba..b8f1376caa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -429,6 +429,7 @@ Special Pages: * (bug 5409) Hide "show/hide patrolled edits" in Special:Recentchanges if patrolling is disabled * (bug 5447) Convert first letter of username to uppercase before searching in Special:Listusers +* (bug 759) Wrap redirects on the watchlist editing page in a span, class "watchlistredir" Misc.: * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index ce1b09a4b1..cec90c4b63 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -152,7 +152,7 @@ function wfSpecialWatchlist( $par ) { # Patch A2 # The following was proposed by KTurner 07.11.2004 to T.Gries # $sql = "SELECT distinct (wl_namespace & ~1),wl_title FROM $watchlist WHERE wl_user=$uid"; - $sql = "SELECT wl_namespace,wl_title FROM $watchlist WHERE wl_user=$uid"; + $sql = "SELECT wl_namespace, wl_title, page_is_redirect FROM $page LEFT JOIN $watchlist ON wl_namespace = page_namespace AND wl_title = page_title WHERE wl_user=$uid"; $res = $dbr->query( $sql, $fname ); @@ -168,7 +168,7 @@ function wfSpecialWatchlist( $par ) { $list = array(); while( $s = $dbr->fetchObject( $res ) ) { - $list[$s->wl_namespace][] = $s->wl_title; + $list[$s->wl_namespace][$s->wl_title] = $s->page_is_redirect; } // TODO: Display a TOC @@ -178,7 +178,7 @@ function wfSpecialWatchlist( $par ) { if ($ns != NS_MAIN) $wgOut->addHTML( '

' . $wgContLang->getFormattedNsText( $ns ) . '

' ); $wgOut->addHTML( '' ); -- 2.20.1