From: Brion Vibber Date: Thu, 2 Sep 2004 02:22:42 +0000 (+0000) Subject: Fix for starting point entered as lowercase. X-Git-Tag: 1.5.0alpha1~2170 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=14e028bb19ea156f235e6320775f43cfb9901d08;p=lhc%2Fweb%2Fwiklou.git Fix for starting point entered as lowercase. --- diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index 3432a8d17e..1853c2e606 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -182,8 +182,13 @@ function indexShowChunk( $from, $namespace = 0 ) $out = ""; $dbr =& wfGetDB( DB_SLAVE ); $cur = $dbr->tableName( 'cur' ); - $sql = "SELECT cur_title FROM $cur WHERE cur_namespace=$namespacee AND cur_title >= '" - . $dbr->strencode( $from ) . "' ORDER BY cur_title LIMIT " . $maxPlusOne; + + $fromTitle = Title::newFromURL( $from ); + $fromKey = is_null( $fromTitle ) ? '' : $fromTitle->getDBkey(); + + $sql = "SELECT cur_title FROM $cur WHERE cur_namespace=$namespacee" . + " AND cur_title >= ". $dbr->addQuotes( $fromKey ) . + " ORDER BY cur_title LIMIT " . $maxPlusOne; $res = $dbr->query( $sql, "indexShowChunk" ); ### FIXME: side link to previous