Index: trunk/phase3/CREDITS |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | |
58 | 58 | == Patch Contributors == |
59 | 59 | * Agbad |
| 60 | +* Ahmad Sherif |
60 | 61 | * Brad Jorsch |
61 | 62 | * Brent G |
62 | 63 | * Daniel Arnold |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3439,6 +3439,9 @@ |
3440 | 3440 | wfDebug( __METHOD__.": [[MediaWiki:hidden-category-category]] is not a valid title!\n" ); |
3441 | 3441 | } |
3442 | 3442 | } |
| 3443 | + if ( isset( $this->mDoubleUnderscores['ignoreunused'] ) && $this->mTitle->getNamespace() == NS_CATEGORY ) { |
| 3444 | + $this->mOutput->setProperty( 'ignoreunused', 'y' ); |
| 3445 | + } |
3443 | 3446 | # (bug 8068) Allow control over whether robots index a page. |
3444 | 3447 | # |
3445 | 3448 | # FIXME (bug 14899): __INDEX__ always overrides __NOINDEX__ here! This |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -159,6 +159,7 @@ |
160 | 160 | 'noeditsection', |
161 | 161 | 'newsectionlink', |
162 | 162 | 'hiddencat', |
| 163 | + 'ignoreunused', |
163 | 164 | 'index', |
164 | 165 | 'noindex', |
165 | 166 | 'staticredirect', |
Index: trunk/phase3/includes/specials/SpecialUnusedcategories.php |
— | — | @@ -22,14 +22,16 @@ |
23 | 23 | function getSQL() { |
24 | 24 | $NScat = NS_CATEGORY; |
25 | 25 | $dbr = wfGetDB( DB_SLAVE ); |
26 | | - list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' ); |
| 26 | + list( $categorylinks, $page, $page_props ) = $dbr->tableNamesN( 'categorylinks', 'page', 'page_props' ); |
27 | 27 | return "SELECT 'Unusedcategories' as type, |
28 | 28 | {$NScat} as namespace, page_title as title, page_title as value |
29 | 29 | FROM $page |
30 | 30 | LEFT JOIN $categorylinks ON page_title=cl_to |
| 31 | + LEFT JOIN $page_props ON pp_page=page_id |
31 | 32 | WHERE cl_from IS NULL |
32 | 33 | AND page_namespace = {$NScat} |
33 | | - AND page_is_redirect = 0"; |
| 34 | + AND page_is_redirect = 0 |
| 35 | + AND (pp_propname IS NULL OR pp_propname != 'ignoreunused')"; |
34 | 36 | } |
35 | 37 | |
36 | 38 | function formatResult( $skin, $result ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -327,6 +327,7 @@ |
328 | 328 | 'filepath' => array( 0, 'FILEPATH:' ), |
329 | 329 | 'tag' => array( 0, 'tag' ), |
330 | 330 | 'hiddencat' => array( 1, '__HIDDENCAT__' ), |
| 331 | + 'ignoreunused' => array( 1, '__IGNOREUNUSED__' ), |
331 | 332 | 'pagesincategory' => array( 1, 'PAGESINCATEGORY', 'PAGESINCAT' ), |
332 | 333 | 'pagesize' => array( 1, 'PAGESIZE' ), |
333 | 334 | 'index' => array( 1, '__INDEX__' ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -60,6 +60,8 @@ |
61 | 61 | link instead of Go button & Search button |
62 | 62 | * (bug 2314) Add links to user custom CSS and JS to Special:Preferences |
63 | 63 | * More helpful error message on raw page access if PHP_SELF isn't set |
| 64 | +* (bug 17145) Specific categories can be excluded from Special:UnusedCategories |
| 65 | + with __IGNOREUNUSED__ |
64 | 66 | |
65 | 67 | === Bug fixes in 1.15 === |
66 | 68 | * (bug 16968) Special:Upload no longer throws useless warnings. |