Index: trunk/phase3/includes/Xml.php |
— | — | @@ -96,9 +96,10 @@ |
97 | 97 | * @param $selected Mixed: the namespace which should be selected, default '' |
98 | 98 | * @param $allnamespaces String: value of a special item denoting all namespaces. Null to not include (default) |
99 | 99 | * @param $includehidden Bool: include hidden namespaces? |
| 100 | + * @param array $exclude Array of namespace indexes to exclude |
100 | 101 | * @return String: Html string containing the namespace selector |
101 | 102 | */ |
102 | | - public static function namespaceSelector($selected = '', $allnamespaces = null, $includehidden=false) { |
| 103 | + public static function namespaceSelector($selected = '', $allnamespaces = null, $includehidden=false, $exclude = array() ) { |
103 | 104 | global $wgContLang; |
104 | 105 | if( is_null( $selected ) ) |
105 | 106 | $selected = ''; |
— | — | @@ -108,7 +109,8 @@ |
109 | 110 | $arr = array($allnamespaces => wfMsg('namespacesall')) + $arr; |
110 | 111 | } |
111 | 112 | foreach ($arr as $index => $name) { |
112 | | - if ($index < NS_MAIN) continue; |
| 113 | + if( $index < NS_MAIN || in_array( $index, $exclude ) ) |
| 114 | + continue; |
113 | 115 | |
114 | 116 | $name = $index !== 0 ? $name : wfMsg('blanknamespace'); |
115 | 117 | |
Index: trunk/phase3/includes/SpecialProtectedpages.php |
— | — | @@ -119,10 +119,19 @@ |
120 | 120 | "</fieldset></form>"; |
121 | 121 | } |
122 | 122 | |
123 | | - function getNamespaceMenu( $namespace=NULL ) { |
124 | | - return "<label for='namespace'>" . wfMsgHtml('namespace') . "</label>" . HTMLnamespaceselector($namespace, ''); |
| 123 | + /** |
| 124 | + * Prepare the namespace filter drop-down; standard namespace |
| 125 | + * selector, sans the MediaWiki namespace |
| 126 | + * |
| 127 | + * @param mixed $namespace Pre-select namespace |
| 128 | + * @return string |
| 129 | + */ |
| 130 | + function getNamespaceMenu( $namespace = null ) { |
| 131 | + return Xml::label( wfMsg( 'namespace' ), 'namespace' ) |
| 132 | + . ' ' |
| 133 | + . Xml::namespaceSelector( $namespace, '', false, array( NS_MEDIAWIKI, NS_MEDIAWIKI_TALK ) ); |
125 | 134 | } |
126 | | - |
| 135 | + |
127 | 136 | /** |
128 | 137 | * @return string Formatted HTML |
129 | 138 | * @private |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -161,7 +161,9 @@ |
162 | 162 | * (bug 10701) Link to Special:Listusers in default Special:Statistics messages |
163 | 163 | * Improved file history presentation |
164 | 164 | * (bug 10739) Users can now enter comments when reverting files |
165 | | -* Improved handling of permissions errors. |
| 165 | +* Improved handling of permissions errors |
| 166 | +* (bug 10798) Exclude MediaWiki namespace from filtering options on |
| 167 | + Special:Protectedpages (implicit protection, doesn't make sense to have it) |
166 | 168 | |
167 | 169 | == Bugfixes since 1.10 == |
168 | 170 | |