Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -783,11 +783,13 @@ |
784 | 784 | $pagelist = "'".implode( "', '", $pp)."'"; |
785 | 785 | $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $page_namespace ) ); |
786 | 786 | $dbr = wfGetDB( DB_SLAVE ); |
787 | | - $catlinks = $dbr->tableName( 'categorylinks' ); |
788 | | - $page = $dbr->tableName( 'page' ); |
789 | 787 | $cat = $dbr->strencode( str_replace( ' ' , '_' , wfMsgForContent( 'proofreadpage_quality0_category' ) ) ); |
790 | | - $query = "SELECT page_title FROM $page LEFT JOIN $catlinks on cl_from=page_id WHERE page_title in ( $pagelist ) AND cl_to='$cat' AND page_namespace=$page_ns_index;" ; |
791 | | - $res = $dbr->query( $query , __METHOD__ ); |
| 788 | + $res = $dbr->select( array('page', 'categorylinks' ), |
| 789 | + array("page_title"), |
| 790 | + array("page_title IN ( $pagelist )", "cl_to='$cat'", "page_namespace=$page_ns_index" ), |
| 791 | + __METHOD__, null, |
| 792 | + array('categorylinks' => array ( 'LEFT JOIN','cl_from=page_id') ) ); |
| 793 | + |
792 | 794 | $q0_pages = array(); |
793 | 795 | if( $res ) { |
794 | 796 | while( $o = $dbr->fetchObject( $res ) ) { |