Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -29,11 +29,16 @@ |
30 | 30 | $this->target = $wgRequest->getText( 'target' ); |
31 | 31 | # Handle our many different possible input types. |
32 | 32 | # Use CVS, since the cgi handling will break on arrays. |
33 | | - $this->oldids = array_filter( explode( ',', $wgRequest->getVal('oldid') ) ); |
34 | | - $this->artimestamps = array_filter( explode( ',', $wgRequest->getVal('artimestamp') ) ); |
35 | | - $this->logids = array_filter( explode( ',', $wgRequest->getVal('logid') ) ); |
36 | | - $this->oldimgs = array_filter( explode( ',', $wgRequest->getVal('oldimage') ) ); |
37 | | - $this->fileids = array_filter( explode( ',', $wgRequest->getVal('fileid') ) ); |
| 33 | + $this->oldids = explode( ',', $wgRequest->getVal('oldid') ); |
| 34 | + $this->oldids = array_unique( array_filter($this->oldids) ); |
| 35 | + $this->artimestamps = explode( ',', $wgRequest->getVal('artimestamp') ); |
| 36 | + $this->artimestamps = array_unique( array_filter($this->artimestamps) ); |
| 37 | + $this->logids = explode( ',', $wgRequest->getVal('logid') ); |
| 38 | + $this->logids = array_unique( array_filter($this->logids) ); |
| 39 | + $this->oldimgs = explode( ',', $wgRequest->getVal('oldimage') ); |
| 40 | + $this->oldimgs = array_unique( array_filter($this->oldimgs) ); |
| 41 | + $this->fileids = explode( ',', $wgRequest->getVal('fileid') ); |
| 42 | + $this->fileids = array_unique( array_filter($this->fileids) ); |
38 | 43 | # For reviewing deleted files... |
39 | 44 | $this->file = $wgRequest->getVal( 'file' ); |
40 | 45 | # Only one target set at a time please! |
— | — | @@ -260,9 +265,11 @@ |
261 | 266 | $result = $dbr->select( array('revision','page'), '*', |
262 | 267 | array( |
263 | 268 | 'rev_page' => $this->page->getArticleID(), |
264 | | - 'rev_id' => $where, |
265 | | - 'rev_page = page_id' ), |
266 | | - __METHOD__ ); |
| 269 | + 'rev_id' => $where, |
| 270 | + 'rev_page = page_id' |
| 271 | + ), |
| 272 | + __METHOD__ |
| 273 | + ); |
267 | 274 | while( $row = $dbr->fetchObject( $result ) ) { |
268 | 275 | $revObjs[$row->rev_id] = new Revision( $row ); |
269 | 276 | } |
— | — | @@ -288,9 +295,11 @@ |
289 | 296 | $result = $dbr->select( 'archive', '*', |
290 | 297 | array( |
291 | 298 | 'ar_namespace' => $this->page->getNamespace(), |
292 | | - 'ar_title' => $this->page->getDBKey(), |
293 | | - 'ar_timestamp' => $where ), |
294 | | - __METHOD__ ); |
| 299 | + 'ar_title' => $this->page->getDBKey(), |
| 300 | + 'ar_timestamp' => $where |
| 301 | + ), |
| 302 | + __METHOD__ |
| 303 | + ); |
295 | 304 | while( $row = $dbr->fetchObject( $result ) ) { |
296 | 305 | $timestamp = wfTimestamp( TS_MW, $row->ar_timestamp ); |
297 | 306 | $revObjs[$timestamp] = new Revision( array( |
— | — | @@ -392,9 +401,11 @@ |
393 | 402 | } |
394 | 403 | $result = $dbr->select( 'oldimage', '*', |
395 | 404 | array( |
396 | | - 'oi_name' => $this->page->getDBKey(), |
397 | | - 'oi_archive_name' => $where ), |
398 | | - __METHOD__ ); |
| 405 | + 'oi_name' => $this->page->getDBKey(), |
| 406 | + 'oi_archive_name' => $where |
| 407 | + ), |
| 408 | + __METHOD__ |
| 409 | + ); |
399 | 410 | while( $row = $dbr->fetchObject( $result ) ) { |
400 | 411 | $filesObjs[$row->oi_archive_name] = RepoGroup::singleton()->getLocalRepo()->newFileFromRow( $row ); |
401 | 412 | $filesObjs[$row->oi_archive_name]->user = $row->oi_user; |
— | — | @@ -426,8 +437,10 @@ |
427 | 438 | $result = $dbr->select( 'filearchive', '*', |
428 | 439 | array( |
429 | 440 | 'fa_name' => $this->page->getDBKey(), |
430 | | - 'fa_id' => $where ), |
431 | | - __METHOD__ ); |
| 441 | + 'fa_id' => $where |
| 442 | + ), |
| 443 | + __METHOD__ |
| 444 | + ); |
432 | 445 | while( $row = $dbr->fetchObject( $result ) ) { |
433 | 446 | $filesObjs[$row->fa_id] = ArchivedFile::newFromRow( $row ); |
434 | 447 | } |