Index: trunk/phase3/includes/search/SearchMySQL.php |
— | — | @@ -284,7 +284,9 @@ |
285 | 285 | $match, |
286 | 286 | $this->queryRedirect(), |
287 | 287 | $this->queryNamespaces() |
288 | | - ) ); |
| 288 | + ), |
| 289 | + __METHOD__ |
| 290 | + ); |
289 | 291 | } |
290 | 292 | |
291 | 293 | /** |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -3519,15 +3519,15 @@ |
3520 | 3520 | |
3521 | 3521 | $titlekey = $this->getArticleId(); |
3522 | 3522 | $dbr = wfGetDB( DB_SLAVE ); |
3523 | | - $categorylinks = $dbr->tableName( 'categorylinks' ); |
3524 | 3523 | |
3525 | | - # NEW SQL |
3526 | | - $sql = "SELECT * FROM $categorylinks" |
3527 | | - . " WHERE cl_from='$titlekey'" |
3528 | | - . " AND cl_from <> '0'" |
3529 | | - . " ORDER BY cl_sortkey"; |
3530 | | - |
3531 | | - $res = $dbr->query( $sql ); |
| 3524 | + $res = $dbr->select( 'categorylinks', '*', |
| 3525 | + array( |
| 3526 | + 'cl_from' => $titleKey, |
| 3527 | + "cl_from <> '0'", |
| 3528 | + ), |
| 3529 | + __METHOD__, |
| 3530 | + array( 'ORDER BY' => 'cl_sortkey' ) |
| 3531 | + ); |
3532 | 3532 | $data = array(); |
3533 | 3533 | |
3534 | 3534 | if ( $dbr->numRows( $res ) > 0 ) { |