Index: trunk/phase3/includes/revisiondelete/RevisionDeleter.php |
— | — | @@ -163,7 +163,7 @@ |
164 | 164 | public static function getLogLinks( $title, $paramArray, $skin, $messages ) { |
165 | 165 | global $wgLang; |
166 | 166 | |
167 | | - if( count($paramArray) >= 2 ) { |
| 167 | + if ( count( $paramArray ) >= 2 ) { |
168 | 168 | // Different revision types use different URL params... |
169 | 169 | $originalKey = $key = $paramArray[0]; |
170 | 170 | // $paramArray[1] is a CSV of the IDs |
— | — | @@ -171,19 +171,10 @@ |
172 | 172 | |
173 | 173 | $revert = array(); |
174 | 174 | |
175 | | - // For if undeleted revisions are found amidst deleted ones. |
176 | | - $undeletedRevisions = array(); |
177 | | - |
178 | | - // This is not going to work if some revs are deleted and some |
179 | | - // aren't. |
180 | | - if ($key == 'revision') { |
181 | | - // Nothing to do; deleted revisions can still be looked up by ID. |
182 | | - } |
183 | | - |
184 | 175 | // Diff link for single rev deletions |
185 | | - if( count($Ids) == 1 && !count($undeletedRevisions) ) { |
| 176 | + if ( count( $Ids ) == 1 ) { |
186 | 177 | // Live revision diffs... |
187 | | - if( in_array( $key, array( 'oldid', 'revision' ) ) ) { |
| 178 | + if ( in_array( $key, array( 'oldid', 'revision' ) ) ) { |
188 | 179 | $revert[] = $skin->link( |
189 | 180 | $title, |
190 | 181 | $messages['diff'], |
— | — | @@ -195,7 +186,7 @@ |
196 | 187 | array( 'known', 'noclasses' ) |
197 | 188 | ); |
198 | 189 | // Deleted revision diffs... |
199 | | - } elseif( in_array( $key, array( 'artimestamp','archive' ) ) ) { |
| 190 | + } elseif ( in_array( $key, array( 'artimestamp','archive' ) ) ) { |
200 | 191 | $revert[] = $skin->link( |
201 | 192 | SpecialPage::getTitleFor( 'Undelete' ), |
202 | 193 | $messages['diff'], |
— | — | @@ -211,53 +202,18 @@ |
212 | 203 | } |
213 | 204 | |
214 | 205 | // View/modify link... |
215 | | - if ( count( $undeletedRevisions ) ) { |
216 | | - // @todo FIXME: THIS IS A HORRIBLE HORRIBLE HACK AND SHOULD DIE |
217 | | - // It's not possible to pass a list of both deleted and |
218 | | - // undeleted revisions to SpecialRevisionDelete, so we're |
219 | | - // stuck with two links. See bug 23363. |
220 | | - $restoreLinks = array(); |
| 206 | + $revert[] = $skin->link( |
| 207 | + SpecialPage::getTitleFor( 'Revisiondelete' ), |
| 208 | + $messages['revdel-restore'], |
| 209 | + array(), |
| 210 | + array( |
| 211 | + 'target' => $title->getPrefixedText(), |
| 212 | + 'type' => $key, |
| 213 | + 'ids' => implode(',', $Ids), |
| 214 | + ), |
| 215 | + array( 'known', 'noclasses' ) |
| 216 | + ); |
221 | 217 | |
222 | | - $restoreLinks[] = $skin->link( |
223 | | - SpecialPage::getTitleFor( 'Revisiondelete' ), |
224 | | - $messages['revdel-restore-visible'], |
225 | | - array(), |
226 | | - array( |
227 | | - 'target' => $title->getPrefixedText(), |
228 | | - 'type' => $originalKey, |
229 | | - 'ids' => implode( ',', $undeletedRevisions ), |
230 | | - ), |
231 | | - array( 'known', 'noclasses' ) |
232 | | - ); |
233 | | - |
234 | | - $restoreLinks[] = $skin->link( |
235 | | - SpecialPage::getTitleFor( 'Revisiondelete' ), |
236 | | - $messages['revdel-restore-deleted'], |
237 | | - array(), |
238 | | - array( |
239 | | - 'target' => $title->getPrefixedText(), |
240 | | - 'type' => $key, |
241 | | - 'ids' => implode(',', $Ids), |
242 | | - ), |
243 | | - array( 'known', 'noclasses' ) |
244 | | - ); |
245 | | - |
246 | | - $revert[] = $messages['revdel-restore'] . ' [' . |
247 | | - $wgLang->pipeList( $restoreLinks ) . ']'; |
248 | | - } else { |
249 | | - $revert[] = $skin->link( |
250 | | - SpecialPage::getTitleFor( 'Revisiondelete' ), |
251 | | - $messages['revdel-restore'], |
252 | | - array(), |
253 | | - array( |
254 | | - 'target' => $title->getPrefixedText(), |
255 | | - 'type' => $key, |
256 | | - 'ids' => implode(',', $Ids), |
257 | | - ), |
258 | | - array( 'known', 'noclasses' ) |
259 | | - ); |
260 | | - } |
261 | | - |
262 | 218 | // Pipe links |
263 | 219 | return wfMsg( 'parentheses', $wgLang->pipeList( $revert ) ); |
264 | 220 | } |