Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -1369,13 +1369,10 @@ |
1370 | 1370 | return; |
1371 | 1371 | } |
1372 | 1372 | |
1373 | | - $catlinks = $dbr->tableName( 'categorylinks' ); |
1374 | | - $page = $dbr->tableName( 'page' ); |
1375 | | - $pagelist = "'" . implode( "', '", $pages ) . "'"; |
1376 | 1373 | $res = $dbr->select( |
1377 | 1374 | array( 'page' ), |
1378 | 1375 | array( 'COUNT(page_id) AS count'), |
1379 | | - array( "page_namespace=$page_ns_index", "page_title IN ( $pagelist )" ), |
| 1376 | + array( 'page_namespace' => $page_ns_index, 'page_title' => $pages ), |
1380 | 1377 | __METHOD__ |
1381 | 1378 | ); |
1382 | 1379 | if( $res && $dbr->numRows( $res ) > 0 ) { |
— | — | @@ -1386,8 +1383,13 @@ |
1387 | 1384 | return; |
1388 | 1385 | } |
1389 | 1386 | |
| 1387 | + $pagelist = "'".implode( "', '", $pages)."'"; |
| 1388 | + $catlinks = $dbr->tableName( 'categorylinks' ); |
| 1389 | + $page = $dbr->tableName( 'page' ); |
| 1390 | + |
1390 | 1391 | // proofreading status of pages |
1391 | 1392 | $query = "SELECT COUNT(page_id) AS count FROM $page LEFT JOIN $catlinks ON cl_from=page_id WHERE cl_to='###' AND page_namespace=$page_ns_index AND page_title IN ( $pagelist )" ; |
| 1393 | + |
1392 | 1394 | $n0 = $this->query_count( $dbr, $query, 'proofreadpage_quality0_category' ); |
1393 | 1395 | $n2 = $this->query_count( $dbr, $query, 'proofreadpage_quality2_category' ); |
1394 | 1396 | $n3 = $this->query_count( $dbr, $query, 'proofreadpage_quality3_category' ); |
— | — | @@ -1431,7 +1433,7 @@ |
1432 | 1434 | $res = $dbr->select( |
1433 | 1435 | array( 'templatelinks' ), |
1434 | 1436 | array( 'tl_title AS title' ), |
1435 | | - array( "tl_from=$id", "tl_namespace=$page_ns_index" ), |
| 1437 | + array( 'tl_from' => $id, 'tl_namespace' => $page_ns_index ), |
1436 | 1438 | __METHOD__, |
1437 | 1439 | array( 'LIMIT' => 1 ) |
1438 | 1440 | ); |
— | — | @@ -1443,9 +1445,9 @@ |
1444 | 1446 | array( 'pagelinks', 'page' ), |
1445 | 1447 | array( 'page_title AS title' ), |
1446 | 1448 | array( |
1447 | | - "pl_title='$title'", |
1448 | | - "pl_namespace=$page_ns_index", |
1449 | | - "page_namespace=$index_ns_index" |
| 1449 | + 'pl_title' => $title, |
| 1450 | + 'pl_namespace' => $page_ns_index, |
| 1451 | + 'page_namespace' => $index_ns_index |
1450 | 1452 | ), |
1451 | 1453 | __METHOD__, |
1452 | 1454 | array( 'LIMIT' => 1 ), |
— | — | @@ -1463,7 +1465,7 @@ |
1464 | 1466 | $res = $dbr->select( |
1465 | 1467 | array( 'pr_index', 'page' ), |
1466 | 1468 | array( 'pr_count', 'pr_q0', 'pr_q1', 'pr_q2', 'pr_q3', 'pr_q4' ), |
1467 | | - array( "page_title='$indextitle'", "page_namespace=$index_ns_index" ), |
| 1469 | + array( 'page_title' => $indextitle, 'page_namespace' => $index_ns_index ), |
1468 | 1470 | __METHOD__, |
1469 | 1471 | null, |
1470 | 1472 | array( 'page' => array( 'LEFT JOIN', 'page_id=pr_page_id' ) ) |
— | — | @@ -1484,7 +1486,7 @@ |
1485 | 1487 | $res = $dbr->select( |
1486 | 1488 | array( 'templatelinks', 'page' ), |
1487 | 1489 | array( 'COUNT(page_id) AS count' ), |
1488 | | - array( "tl_from=$id", "tl_namespace=$page_ns_index" ), |
| 1490 | + array( 'tl_from' => $id, 'tl_namespace' => $page_ns_index ), |
1489 | 1491 | __METHOD__, |
1490 | 1492 | null, |
1491 | 1493 | array( 'page' => array( 'LEFT JOIN', 'page_title=tl_title AND page_namespace=tl_namespace' ) ) |