Property changes on: branches/querypage-work2/phase3/maintenance/cleanupTable.inc |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 1 | - /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646 |
/branches/querypage-work/phase3/maintenance/cleanupTable.inc:49084,49599,49631,49951,50105 |
/branches/wmf-deployment/maintenance/cleanupTable.inc:56715 |
2 | 2 | + /branches/REL1_15/phase3/maintenance/cleanupTable.inc:51646 |
/branches/querypage-work/phase3/maintenance/cleanupTable.inc:49084,49599,49631,49951,50105,50378 |
/branches/wmf-deployment/maintenance/cleanupTable.inc:56715 |
Property changes on: branches/querypage-work2/phase3/skins/common/jquery.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
3 | 3 | - /branches/querypage-work/phase3/skins/common/jquery.js:49084,49599,49631,49951,50105 |
4 | 4 | + /branches/querypage-work/phase3/skins/common/jquery.js:49084,49599,49631,49951,50105,50378 |
Property changes on: branches/querypage-work2/phase3/skins/common/jquery.min.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
5 | 5 | - /branches/querypage-work/phase3/skins/common/jquery.min.js:49084,49599,49631,49951,50105 |
6 | 6 | + /branches/querypage-work/phase3/skins/common/jquery.min.js:49084,49599,49631,49951,50105,50378 |
Index: branches/querypage-work2/phase3/includes/ImageQueryPage.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * @ingroup SpecialPage |
9 | 9 | * @author Rob Church <robchur@gmail.com> |
10 | 10 | */ |
11 | | -class ImageQueryPage extends QueryPage { |
| 11 | +abstract class ImageQueryPage extends QueryPage { |
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Format and output report results using the given information plus |
— | — | @@ -37,6 +37,9 @@ |
38 | 38 | $out->addHTML( $gallery->toHtml() ); |
39 | 39 | } |
40 | 40 | } |
| 41 | + |
| 42 | + // Gotta override this since it's abstract |
| 43 | + function formatResult( $skin, $result ) { } |
41 | 44 | |
42 | 45 | /** |
43 | 46 | * Prepare an image object given a result row |
Property changes on: branches/querypage-work2/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
44 | 47 | - /branches/REL1_15/phase3/includes/OutputPage.php:51646 |
/branches/querypage-work/phase3/includes/OutputPage.php:49084,49599,49631,49951,50105 |
/branches/wmf-deployment/includes/OutputPage.php:53381,57468 |
45 | 48 | + /branches/REL1_15/phase3/includes/OutputPage.php:51646 |
/branches/querypage-work/phase3/includes/OutputPage.php:49084,49599,49631,49951,50105,50378 |
/branches/wmf-deployment/includes/OutputPage.php:53381,57468 |
Property changes on: branches/querypage-work2/phase3/includes/api |
___________________________________________________________________ |
Name: svn:mergeinfo |
46 | 49 | - /branches/REL1_15/phase3/includes/api:51646 |
/branches/REL1_16/phase3/includes/api:63621-63636 |
/branches/querypage-work/phase3/includes/api:49084,49599,49631,49951,50105 |
/branches/sqlite/includes/api:58211-58321 |
/branches/wmf-deployment/includes/api:53381,59952 |
47 | 50 | + /branches/REL1_15/phase3/includes/api:51646 |
/branches/REL1_16/phase3/includes/api:63621-63636 |
/branches/querypage-work/phase3/includes/api:49084,49599,49631,49951,50105,50378 |
/branches/sqlite/includes/api:58211-58321 |
/branches/wmf-deployment/includes/api:53381,59952 |
Index: branches/querypage-work2/phase3/includes/AutoLoader.php |
— | — | @@ -576,7 +576,6 @@ |
577 | 577 | 'SpecialUpload' => 'includes/specials/SpecialUpload.php', |
578 | 578 | 'SpecialVersion' => 'includes/specials/SpecialVersion.php', |
579 | 579 | 'SpecialWhatlinkshere' => 'includes/specials/SpecialWhatlinkshere.php', |
580 | | - 'SpecialWhatLinksHere' => 'includes/specials/SpecialWhatlinkshere.php', |
581 | 580 | 'UncategorizedCategoriesPage' => 'includes/specials/SpecialUncategorizedcategories.php', |
582 | 581 | 'UncategorizedPagesPage' => 'includes/specials/SpecialUncategorizedpages.php', |
583 | 582 | 'UncategorizedTemplatesPage' => 'includes/specials/SpecialUncategorizedtemplates.php', |
— | — | @@ -593,7 +592,6 @@ |
594 | 593 | 'WantedFilesPage' => 'includes/specials/SpecialWantedfiles.php', |
595 | 594 | 'WantedPagesPage' => 'includes/specials/SpecialWantedpages.php', |
596 | 595 | 'WantedTemplatesPage' => 'includes/specials/SpecialWantedtemplates.php', |
597 | | - 'WhatLinksHerePage' => 'includes/specials/SpecialWhatlinkshere.php', |
598 | 596 | 'WikiImporter' => 'includes/Import.php', |
599 | 597 | 'WikiRevision' => 'includes/Import.php', |
600 | 598 | 'WithoutInterwikiPage' => 'includes/specials/SpecialWithoutinterwiki.php', |
Property changes on: branches/querypage-work2/phase3/includes/ChangesList.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
601 | 599 | - /branches/REL1_15/phase3/includes/ChangesList.php:51646 |
/branches/querypage-work/phase3/includes/ChangesList.php:49084,49599,49631,49951,50105 |
/branches/wmf-deployment/includes/ChangesList.php:53381,57589 |
602 | 600 | + /branches/REL1_15/phase3/includes/ChangesList.php:51646 |
/branches/querypage-work/phase3/includes/ChangesList.php:49084,49599,49631,49951,50105,50378 |
/branches/wmf-deployment/includes/ChangesList.php:53381,57589 |
Property changes on: branches/querypage-work2/phase3/includes/ConfEditor.php |
___________________________________________________________________ |
Name: svn:mergeinfo |
603 | 601 | - /branches/querypage-work/phase3/includes/ConfEditor.php:49084,49599,49631,49951,50105 |
604 | 602 | + /branches/querypage-work/phase3/includes/ConfEditor.php:49084,49599,49631,49951,50105,50378 |
Index: branches/querypage-work2/phase3/includes/specials/SpecialFewestrevisions.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | // useful to remove this. People _do_ create pages |
41 | 41 | // and never revise them, they aren't necessarily |
42 | 42 | // redirects. |
43 | | - 'GROUP BY' => 'page_namespace, page_title' . |
| 43 | + 'GROUP BY' => 'page_namespace, page_title, ' . |
44 | 44 | 'page_is_redirect' ) |
45 | 45 | ); |
46 | 46 | } |
Index: branches/querypage-work2/phase3/includes/specials/SpecialWantedtemplates.php |
— | — | @@ -33,7 +33,8 @@ |
34 | 34 | 'join_conds' => array ( 'page' => array ( 'LEFT JOIN', |
35 | 35 | array ( 'page_namespace = tl_namespace', |
36 | 36 | 'page_title = tl_title' ) ) ) |
37 | | - ); |
| 37 | + ); |
| 38 | + } |
38 | 39 | } |
39 | 40 | |
40 | 41 | /** |
Index: branches/querypage-work2/phase3/includes/specials/SpecialBrokenRedirects.php |
— | — | @@ -34,7 +34,6 @@ |
35 | 35 | 'conds' => array( 'rd_namespace >= 0', |
36 | 36 | 'p2.page_namespace IS NULL' |
37 | 37 | ), |
38 | | - // TODO test this join |
39 | 38 | 'join_conds' => array( 'page AS p1' => array( 'LEFT JOIN', array( |
40 | 39 | 'rd_from=p1.page_id', |
41 | 40 | ) ), |
Index: branches/querypage-work2/phase3/includes/specials/SpecialMostcategories.php |
— | — | @@ -27,7 +27,6 @@ |
28 | 28 | 'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces() ), |
29 | 29 | 'options' => array ( 'HAVING' => 'COUNT(*) > 1', |
30 | 30 | 'GROUP BY' => 'page_namespace, page_title' ), |
31 | | - // TODO: test this JOIN |
32 | 31 | 'join_conds' => array ( 'page' => array ( 'LEFT JOIN', |
33 | 32 | 'page_id = cl_from' ) ) |
34 | 33 | ); |
Index: branches/querypage-work2/phase3/includes/specials/SpecialLonelypages.php |
— | — | @@ -38,7 +38,6 @@ |
39 | 39 | 'page_namespace' => MWNamespace::getContentNamespaces(), |
40 | 40 | 'page_is_redirect' => 0, |
41 | 41 | 'tl_namespace IS NULL' ), |
42 | | - // TODO: test this JOIN |
43 | 42 | 'join_conds' => array ( |
44 | 43 | 'pagelinks' => array ( |
45 | 44 | 'LEFT JOIN', array ( |
Index: branches/querypage-work2/phase3/includes/specials/SpecialMostlinkedtemplates.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | 'fields' => array ( 'tl_namespace AS namespace', |
57 | 57 | 'tl_title AS title', |
58 | 58 | 'COUNT(*) AS value' ), |
59 | | - 'conds' => array ( 'tl_namespace' => NS_TEMPLATE' ), |
| 59 | + 'conds' => array ( 'tl_namespace' => NS_TEMPLATE ), |
60 | 60 | 'options' => array( 'GROUP BY' => 'tl_title' ) |
61 | 61 | ); |
62 | 62 | } |
Index: branches/querypage-work2/phase3/includes/specials/SpecialUnusedtemplates.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | '0 AS value' ), |
28 | 28 | 'conds' => array ( 'page_namespace' => NS_TEMPLATE, |
29 | 29 | 'tl_from IS NULL', |
30 | | - 'page_redirect' => 0 ), |
| 30 | + 'page_is_redirect' => 0 ), |
31 | 31 | 'join_conds' => array ( 'templatelinks' => array ( |
32 | 32 | 'LEFT JOIN', array ( 'tl_title = page_title', |
33 | 33 | 'tl_namespace = page_namespace' ) ) ) |
Index: branches/querypage-work2/phase3/includes/specials/SpecialUncategorizedimages.php |
— | — | @@ -39,6 +39,20 @@ |
40 | 40 | FROM {$page} LEFT JOIN {$categorylinks} ON page_id = cl_from |
41 | 41 | WHERE cl_from IS NULL AND page_namespace = {$ns} AND page_is_redirect = 0"; |
42 | 42 | } |
| 43 | + |
| 44 | + function getQueryInfo() { |
| 45 | + return array ( |
| 46 | + 'tables' => array( 'page', 'categorylinks' ), |
| 47 | + 'fields' => array( 'page_namespace AS namespace', |
| 48 | + 'page_title AS title', |
| 49 | + 'page_title AS value' ), |
| 50 | + 'conds' => array( 'cl_from IS NULL', |
| 51 | + 'page_namespace' => NS_FILE, |
| 52 | + 'page_is_redirect' => 0 ), |
| 53 | + 'join_conds' => array( 'categorylinks' => array( |
| 54 | + 'LEFT JOIN', 'cl_from=page_id' ) ) |
| 55 | + ); |
| 56 | + } |
43 | 57 | |
44 | 58 | } |
45 | 59 | |
Index: branches/querypage-work2/phase3/includes/specials/SpecialWantedpages.php |
— | — | @@ -61,11 +61,10 @@ |
62 | 62 | NS_MEDIAWIKI . "'" ), |
63 | 63 | 'options' => array ( 'HAVING' => "COUNT(*) > $count", |
64 | 64 | 'GROUP BY' => 'pl_namespace, pl_title' ), |
65 | | - // TODO: test this join |
66 | 65 | 'join_conds' => array ( 'page AS pg1' => array ( |
67 | 66 | 'LEFT JOIN', array ( |
68 | 67 | 'pg1.page_namespace = pl_namespace', |
69 | | - 'pg2.page_title = pl_title' ) ), |
| 68 | + 'pg1.page_title = pl_title' ) ), |
70 | 69 | 'page AS pg2' => array ( 'LEFT JOIN', |
71 | 70 | 'pg2.page_id = pl_from' ) ) |
72 | 71 | ); |
Property changes on: branches/querypage-work2/phase3/includes/specials |
___________________________________________________________________ |
Name: svn:mergeinfo |
73 | 72 | - /branches/REL1_15/phase3/includes/specials:51646 |
/branches/querypage-work/phase3/includes/specials:49084,49599,49631,49951,50105 |
/branches/sqlite/includes/specials:58211-58321 |
/branches/wmf-deployment/includes/specials:53381,56967 |
74 | 73 | + /branches/REL1_15/phase3/includes/specials:51646 |
/branches/querypage-work/phase3/includes/specials:49084,49599,49631,49951,50105,50378 |
/branches/sqlite/includes/specials:58211-58321 |
/branches/wmf-deployment/includes/specials:53381,56967 |
Index: branches/querypage-work2/phase3/includes/QueryPage.php |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | $field .= ' DESC'; |
326 | 326 | } |
327 | 327 | } |
328 | | - if( !is_array( $query['options'] ) ) { |
| 328 | + if( !is_array( @$query['options'] ) ) { |
329 | 329 | $options = array (); |
330 | 330 | } |
331 | 331 | if( count( $order ) ) { |
— | — | @@ -338,10 +338,10 @@ |
339 | 339 | } |
340 | 340 | |
341 | 341 | $dbr = wfGetDB( DB_SLAVE ); |
342 | | - $res = $dbr->select( (array)$query['tables'], |
343 | | - (array)$query['fields'], |
344 | | - (array)$query['conds'], $fname, |
345 | | - $query['options'], (array)$query['join_conds'] |
| 342 | + $res = $dbr->select( (array)@$query['tables'], |
| 343 | + (array)@$query['fields'], |
| 344 | + (array)@$query['conds'], $fname, |
| 345 | + $query['options'], (array)@$query['join_conds'] |
346 | 346 | ); |
347 | 347 | return $dbr->resultObject( $res ); |
348 | 348 | } |
Property changes on: branches/querypage-work2/phase3/includes |
___________________________________________________________________ |
Name: svn:mergeinfo |
349 | 349 | - /branches/REL1_15/phase3/includes:51646 |
/branches/querypage-work/phase3/includes:49084,49599,49631,49951,50105 |
/branches/sqlite/includes:58211-58321 |
/branches/wmf-deployment/includes:53381 |
350 | 350 | + /branches/REL1_15/phase3/includes:51646 |
/branches/querypage-work/phase3/includes:49084,49599,49631,49951,50105,50378 |
/branches/sqlite/includes:58211-58321 |
/branches/wmf-deployment/includes:53381 |
Property changes on: branches/querypage-work2/phase3 |
___________________________________________________________________ |
Name: svn:mergeinfo |
351 | 351 | - /branches/REL1_15/phase3:51646 |
/branches/querypage-work/phase3:49084,49599,49631,49951,50105 |
/branches/sqlite:58211-58321 |
352 | 352 | + /branches/REL1_15/phase3:51646 |
/branches/querypage-work/phase3:49084,49599,49631,49951,50105,50378 |
/branches/sqlite:58211-58321 |
Index: branches/querypage-work2/TODO |
— | — | @@ -1,12 +1,10 @@ |
2 | | -* Test JOINs using table aliases |
3 | 2 | * Make INNER JOIN implicit in Unusedimages? |
4 | 3 | * Find and migrate code using WantedPages::getSQL hook |
5 | 4 | * Check sorting sanity |
6 | 5 | ** Check whether sorts are efficient and page right |
7 | 6 | ** Check whether sorting by nothing is really what we want |
8 | 7 | ** Check whether selecting title or ns AS value is really what we want |
| 8 | +* Track down and fix pages querying page info one title at a time |
9 | 9 | * Mark ShortPages as inexpensive |
10 | 10 | * Reuse UncategorizedPages code in UncategorizedImages somehow |
11 | 11 | * Make UncategorizedPages parameterized by namespace |
12 | | - |
13 | | -* Convert UncategorizedImages |
Property changes on: branches/querypage-work2 |
___________________________________________________________________ |
Name: svn:mergeinfo |
14 | 12 | - /branches/querypage-work:49084,49599,49631,49951,50105 |
15 | 13 | + /branches/querypage-work:49084,49599,49631,49951,50105,50378 |