From 77f4f334636114fcf846f455e72fd9acc49b33d2 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Mon, 11 Oct 2004 11:09:18 +0000 Subject: [PATCH] don't show redirects in categories --- includes/CategoryPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 3e89a5fec2..479938a4e4 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -71,7 +71,7 @@ class CategoryPage extends Article { $t = $dbr->strencode( $this->mTitle->getDBKey() ); $sql = "SELECT DISTINCT cur_title,cur_namespace FROM $cur,$categorylinks " . - "WHERE cl_to='$t' AND cl_from=cur_id ORDER BY cl_sortkey" ; + "WHERE cl_to='$t' AND cl_from=cur_id AND cur_is_redirect=0 ORDER BY cl_sortkey" ; $res = $dbr->query( $sql, $fname ) ; # For all pages that link to this category while ( $x = $dbr->fetchObject ( $res ) ) @@ -130,7 +130,7 @@ class CategoryPage extends Article { $t = $dbr->strencode( $this->mTitle->getDBKey() ); $sql = "SELECT DISTINCT cur_title,cur_namespace,cl_sortkey FROM " . - "$cur,$categorylinks WHERE cl_to='$t' AND cl_from=cur_id ORDER BY cl_sortkey" ; + "$cur,$categorylinks WHERE cl_to='$t' AND cl_from=cur_id AND cur_is_redirect=0 ORDER BY cl_sortkey" ; $res = $dbr->query ( $sql ) ; while ( $x = $dbr->fetchObject ( $res ) ) { -- 2.20.1