Index: trunk/phase3/includes/SpecialWatchlist.php |
— | — | @@ -124,8 +124,7 @@ |
125 | 125 | |
126 | 126 | $wgOut->addHTML( '<form action=\'' . |
127 | 127 | $specialTitle->escapeLocalUrl( 'action=submit' ) . |
128 | | - "' method='post'>\n" . |
129 | | - "<ul>\n" ); |
| 128 | + "' method='post'>\n" ); |
130 | 129 | |
131 | 130 | # Patch A2 |
132 | 131 | # The following was proposed by KTurner 07.11.2004 to T.Gries |
— | — | @@ -134,21 +133,40 @@ |
135 | 134 | |
136 | 135 | $res = $dbr->query( $sql, $fname ); |
137 | 136 | $sk = $wgUser->getSkin(); |
| 137 | + |
| 138 | + $list = array(); |
138 | 139 | while( $s = $dbr->fetchObject( $res ) ) { |
139 | | - $t = Title::makeTitle( $s->wl_namespace, $s->wl_title ); |
140 | | - if( is_null( $t ) ) { |
141 | | - $wgOut->addHTML( '<!-- bad title "' . htmlspecialchars( $s->wl_title ) . '" in namespace ' . IntVal( $s->wl_namespace ) . " -->\n" ); |
142 | | - } else { |
143 | | - $t = $t->getPrefixedText(); |
144 | | - $wgOut->addHTML( '<li><input type="checkbox" name="id[]" value="' . htmlspecialchars($t) . '" />' . |
145 | | - $sk->makeLink( $t, $t ) . |
146 | | - "</li>\n" ); |
| 140 | + $list[$s->wl_namespace][] = $s->wl_title; |
| 141 | + } |
| 142 | + |
| 143 | + // TODO: Display a t TOC |
| 144 | + foreach($list as $ns => $titles) { |
| 145 | + if ($ns != NS_MAIN) |
| 146 | + $wgOut->addHTML( '<h2>' . $wgContLang->getFormattedNsText( $ns ) . '</h2>' ); |
| 147 | + $wgOut->addHTML( '<ul>' ); |
| 148 | + foreach($titles as $title) { |
| 149 | + $t = Title::makeTitle( $ns, $title ); |
| 150 | + if( is_null( $t ) ) { |
| 151 | + $wgOut->addHTML( |
| 152 | + '<!-- bad title "' . |
| 153 | + htmlspecialchars( $s->wl_title ) . '" in namespace ' . $s->wl_namespace . " -->\n" |
| 154 | + ); |
| 155 | + } else { |
| 156 | + $t = $t->getPrefixedText(); |
| 157 | + $wgOut->addHTML( |
| 158 | + '<li><input type="checkbox" name="id[]" value="' . htmlspecialchars($t) . '" />' . |
| 159 | + $sk->makeLink( $t, $t ) . |
| 160 | + "</li>\n" |
| 161 | + ); |
| 162 | + } |
147 | 163 | } |
| 164 | + $wgOut->addHTML( '</ul>' ); |
148 | 165 | } |
149 | | - $wgOut->addHTML( "</ul>\n" . |
| 166 | + $wgOut->addHTML( |
150 | 167 | "<input type='submit' name='remove' value=\"" . |
151 | 168 | htmlspecialchars( wfMsg( "removechecked" ) ) . "\" />\n" . |
152 | | - "</form>\n" ); |
| 169 | + "</form>\n" |
| 170 | + ); |
153 | 171 | |
154 | 172 | return; |
155 | 173 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -312,6 +312,7 @@ |
313 | 313 | * (bug 2467) Added a Turkish language file |
314 | 314 | * Fixed a bug in Special:Contributions that caused the namespace selection to |
315 | 315 | be forgotten between submits |
| 316 | +* Special:Watchlist/edit now has namespace subheadings |
316 | 317 | |
317 | 318 | === Caveats === |
318 | 319 | |