Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -1194,7 +1194,7 @@ |
1195 | 1195 | if ( $image && $image->isMultiPage() && $image->pageCount() ) { |
1196 | 1196 | $n = $image->pageCount(); |
1197 | 1197 | for ( $i = 1; $i <= $n; $i++ ) { |
1198 | | - $page = $index_title->getDBKey().'/'.$i; |
| 1198 | + $page = $dbr->strencode( $index_title->getDBKey().'/'.$i ); |
1199 | 1199 | if($page != $deletedpage) array_push( $pages, $page ); |
1200 | 1200 | } |
1201 | 1201 | } |
— | — | @@ -1270,7 +1270,7 @@ |
1271 | 1271 | $catlinks = $dbr->tableName( 'categorylinks' ); |
1272 | 1272 | |
1273 | 1273 | # count transclusions from page namespace |
1274 | | - $query = "SELECT COUNT(page_id) AS count FROM $templatelinks LEFT JOIN $page ON page_title=tl_title where tl_from=$id and tl_namespace=$page_ns_index"; |
| 1274 | + $query = "SELECT COUNT(page_id) AS count FROM $templatelinks LEFT JOIN $page ON page_title=tl_title AND page_namespace=tl_namespace WHERE tl_from=$id AND tl_namespace=$page_ns_index"; |
1275 | 1275 | $res = $dbr->query( $query , __METHOD__ ); |
1276 | 1276 | if( $res && $dbr->numRows( $res ) > 0 ) { |
1277 | 1277 | $row = $dbr->fetchObject( $res ); |
— | — | @@ -1282,7 +1282,7 @@ |
1283 | 1283 | } |
1284 | 1284 | |
1285 | 1285 | # find the proofreading status of transclusions |
1286 | | - $query = "SELECT COUNT(page_id) AS count FROM $templatelinks LEFT JOIN $page ON page_title=tl_title LEFT JOIN $catlinks ON cl_from=page_id where tl_from=$id and tl_namespace=$page_ns_index AND cl_to='###'"; |
| 1286 | + $query = "SELECT COUNT(page_id) AS count FROM $templatelinks LEFT JOIN $page ON page_title=tl_title AND page_namespace=tl_namespace LEFT JOIN $catlinks ON cl_from=page_id WHERE tl_from=$id AND tl_namespace=$page_ns_index AND cl_to='###'"; |
1287 | 1287 | $n0 = pr_query_count( $dbr, $query, 'proofreadpage_quality0_category' ); |
1288 | 1288 | $n2 = pr_query_count( $dbr, $query, 'proofreadpage_quality2_category' ); |
1289 | 1289 | $n3 = pr_query_count( $dbr, $query, 'proofreadpage_quality3_category' ); |