From: River Tarnell Date: Mon, 11 Oct 2004 11:09:18 +0000 (+0000) Subject: don't show redirects in categories X-Git-Tag: 1.5.0alpha1~1596 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=77f4f334636114fcf846f455e72fd9acc49b33d2;p=lhc%2Fweb%2Fwiklou.git don't show redirects in categories --- 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 ) ) {