Index: trunk/phase3/includes/SpecialDeadendpages.php |
— | — | @@ -18,13 +18,8 @@ |
19 | 19 | return wfMsgExt( 'deadendpagestext', array( 'parse' ) ); |
20 | 20 | } |
21 | 21 | |
22 | | - /** |
23 | | - * LEFT JOIN is expensive |
24 | | - * |
25 | | - * @return true |
26 | | - */ |
27 | 22 | function isExpensive( ) { |
28 | | - return 1; |
| 23 | + return false; |
29 | 24 | } |
30 | 25 | |
31 | 26 | function isSyndicated() { return false; } |
— | — | @@ -43,10 +38,12 @@ |
44 | 39 | $dbr = wfGetDB( DB_SLAVE ); |
45 | 40 | list( $page, $pagelinks ) = $dbr->tableNamesN( 'page', 'pagelinks' ); |
46 | 41 | return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " . |
47 | | - "FROM $page LEFT JOIN $pagelinks ON page_id = pl_from " . |
48 | | - "WHERE pl_from IS NULL " . |
| 42 | + "FROM $page,$pagelinks " . |
| 43 | + "WHERE page_id = pl_from " . |
49 | 44 | "AND page_namespace = 0 " . |
50 | | - "AND page_is_redirect = 0"; |
| 45 | + "AND page_is_redirect = 0 " . |
| 46 | + "AND pl_title = '' " . |
| 47 | + "AND pl_namespace = 0"; |
51 | 48 | } |
52 | 49 | } |
53 | 50 | |
Index: trunk/phase3/includes/SpecialUncategorizedpages.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | } |
22 | 22 | |
23 | 23 | function isExpensive() { |
24 | | - return true; |
| 24 | + return false; |
25 | 25 | } |
26 | 26 | function isSyndicated() { return false; } |
27 | 27 | |
— | — | @@ -33,12 +33,11 @@ |
34 | 34 | " |
35 | 35 | SELECT |
36 | 36 | $name as type, |
37 | | - page_namespace AS namespace, |
38 | | - page_title AS title, |
39 | | - page_title AS value |
40 | | - FROM $page |
41 | | - LEFT JOIN $categorylinks ON page_id=cl_from |
42 | | - WHERE cl_from IS NULL AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0 |
| 37 | + page.page_namespace AS namespace, |
| 38 | + page.page_title AS title, |
| 39 | + page.page_title AS value |
| 40 | + FROM $page,$categorylinks |
| 41 | + WHERE page_id=cl_from AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0 AND cl_to='' |
43 | 42 | "; |
44 | 43 | } |
45 | 44 | } |
Index: trunk/phase3/includes/LinksUpdate.php |
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | $this->mExternals = $parserOutput->getExternalLinks(); |
54 | 54 | $this->mCategories = $parserOutput->getCategories(); |
55 | 55 | |
| 56 | + # Insert (0,'') entries if there are none of a given type of link (page and category links only) |
| 57 | + $this->mLinks = $this->addNullEntries( $this->mLinks, array( 0 => array( '' => 0 ) ) ); |
| 58 | + $this->mCategories = $this->addNullEntries( $this->mCategories ); |
| 59 | + |
56 | 60 | # Convert the format of the interlanguage links |
57 | 61 | # I didn't want to change it in the ParserOutput, because that array is passed all |
58 | 62 | # the way back to the skin, so either a skin API break would be required, or an |
— | — | @@ -69,6 +73,21 @@ |
70 | 74 | } |
71 | 75 | |
72 | 76 | /** |
| 77 | + * Add "no links" entries to the parser-output. |
| 78 | + * @param $links array The links array to add null entries to. |
| 79 | + * @param $replace array What to replace it with if $links is empty. |
| 80 | + * @return array The links array, after being modified. |
| 81 | + */ |
| 82 | + function addNullEntries( $links, $replace = array( '' => '' ) ) |
| 83 | + { |
| 84 | + if ( count( $links ) == 0 ) { |
| 85 | + $links = $replace; |
| 86 | + } |
| 87 | + |
| 88 | + return $links; |
| 89 | + } |
| 90 | + |
| 91 | + /** |
73 | 92 | * Update link tables with outgoing links from an updated article |
74 | 93 | */ |
75 | 94 | function doUpdate() { |
— | — | @@ -322,6 +341,7 @@ |
323 | 342 | # array_diff_key() was introduced in PHP 5.1, there is a compatibility function |
324 | 343 | # in GlobalFunctions.php |
325 | 344 | $diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys; |
| 345 | + |
326 | 346 | foreach ( $diffs as $dbk => $id ) { |
327 | 347 | $arr[] = array( |
328 | 348 | 'pl_from' => $this->mId, |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -19,6 +19,9 @@ |
20 | 20 | it from source control: http://www.mediawiki.org/wiki/Download_from_SVN |
21 | 21 | |
22 | 22 | === Configuration changes in 1.12 === |
| 23 | +* The permission key required to edit another user's css/js subpage is now |
| 24 | + editusercssjs, rather than editinterface, as it was previously. This permission |
| 25 | + is assigned by default to the sysop group. |
23 | 26 | |
24 | 27 | === New features in 1.12 === |
25 | 28 | * Add a warning for non-descriptive filenames at Special:Upload |
— | — | @@ -45,8 +48,10 @@ |
46 | 49 | * (bug 11266) Set fallback language for Fulfulde (ff) to French |
47 | 50 | * (bug 11179) Include image version deletion comment in public log |
48 | 51 | * (bug 11158) Fix escaping in API HTML-formatted JSON |
| 52 | +* Speed up Special:UncategorizedPages and Special:Deadendpages (no longer marked |
| 53 | + as slow queries). They now add blank ('','') entries for pages without ANY links |
| 54 | + or categories. |
49 | 55 | |
50 | | - |
51 | 56 | === API changes in 1.12 === |
52 | 57 | |
53 | 58 | Full API documentation is available at http://www.mediawiki.org/wiki/API |