Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -330,8 +330,6 @@ |
331 | 331 | environments |
332 | 332 | * (bug 14977) Fixed $wgServer detection in cases where an IPv6 address is used |
333 | 333 | as the server name. |
334 | | -* (bug 19725) Do not list suppressed edits in the "View X deleted edits" link |
335 | | - if user cannot view suppressed edits. |
336 | 334 | * The View X deleted revisions is now shown again on Special:Upload. |
337 | 335 | * (bug 29071) mediawiki.action.watch.ajax.js should pass uselang to API. |
338 | 336 | * (bug 28868) Show total pages in the subtitle of an image on the |
Index: branches/REL1_18/phase3/includes/Title.php |
— | — | @@ -2373,37 +2373,21 @@ |
2374 | 2374 | /** |
2375 | 2375 | * Is there a version of this page in the deletion archive? |
2376 | 2376 | * |
2377 | | - * @param $includeSuppressed Boolean Include suppressed revisions? |
2378 | 2377 | * @return Int the number of archived revisions |
2379 | 2378 | */ |
2380 | | - public function isDeleted( $includeSuppressed = false ) { |
| 2379 | + public function isDeleted() { |
2381 | 2380 | if ( $this->getNamespace() < 0 ) { |
2382 | 2381 | $n = 0; |
2383 | 2382 | } else { |
2384 | 2383 | $dbr = wfGetDB( DB_SLAVE ); |
2385 | | - $conditions = array( 'ar_namespace' => $this->getNamespace(), 'ar_title' => $this->getDBkey() ); |
2386 | 2384 | |
2387 | | - if( !$includeSuppressed ) { |
2388 | | - $suppressedTextBits = Revision::DELETED_TEXT | Revision::DELETED_RESTRICTED; |
2389 | | - $conditions[] = $dbr->bitAnd('ar_deleted', $suppressedTextBits ) . |
2390 | | - ' != ' . $suppressedTextBits; |
2391 | | - } |
2392 | | - |
2393 | 2385 | $n = $dbr->selectField( 'archive', 'COUNT(*)', |
2394 | | - $conditions, |
| 2386 | + array( 'ar_namespace' => $this->getNamespace(), 'ar_title' => $this->getDBkey() ), |
2395 | 2387 | __METHOD__ |
2396 | 2388 | ); |
2397 | 2389 | if ( $this->getNamespace() == NS_FILE ) { |
2398 | | - $fconditions = array( 'fa_name' => $this->getDBkey() ); |
2399 | | - if( !$includeSuppressed ) { |
2400 | | - $suppressedTextBits = File::DELETED_FILE | File::DELETED_RESTRICTED; |
2401 | | - $fconditions[] = $dbr->bitAnd('fa_deleted', $suppressedTextBits ) . |
2402 | | - ' != ' . $suppressedTextBits; |
2403 | | - } |
2404 | | - |
2405 | | - $n += $dbr->selectField( 'filearchive', |
2406 | | - 'COUNT(*)', |
2407 | | - $fconditions, |
| 2390 | + $n += $dbr->selectField( 'filearchive', 'COUNT(*)', |
| 2391 | + array( 'fa_name' => $this->getDBkey() ), |
2408 | 2392 | __METHOD__ |
2409 | 2393 | ); |
2410 | 2394 | } |
Index: branches/REL1_18/phase3/includes/SkinTemplate.php |
— | — | @@ -976,8 +976,7 @@ |
977 | 977 | } else { |
978 | 978 | // article doesn't exist or is deleted |
979 | 979 | if ( $wgUser->isAllowed( 'deletedhistory' ) ) { |
980 | | - $includeSuppressed = $wgUser->isAllowed( 'suppressrevision' ); |
981 | | - $n = $title->isDeleted( $includeSuppressed ); |
| 980 | + $n = $title->isDeleted(); |
982 | 981 | if( $n ) { |
983 | 982 | $undelTitle = SpecialPage::getTitleFor( 'Undelete' ); |
984 | 983 | // If the user can't undelete but can view deleted history show them a "View .. deleted" tab instead |
Index: branches/REL1_18/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -62,7 +62,6 @@ |
63 | 63 | * @return ResultWrapper |
64 | 64 | */ |
65 | 65 | public static function listPagesByPrefix( $prefix ) { |
66 | | - global $wgUser; |
67 | 66 | $dbr = wfGetDB( DB_SLAVE ); |
68 | 67 | |
69 | 68 | $title = Title::newFromText( $prefix ); |
— | — | @@ -78,12 +77,6 @@ |
79 | 78 | 'ar_namespace' => $ns, |
80 | 79 | 'ar_title' . $dbr->buildLike( $prefix, $dbr->anyString() ), |
81 | 80 | ); |
82 | | - |
83 | | - // bug 19725 |
84 | | - $suppressedText = Revision::DELETED_TEXT | Revision::DELETED_RESTRICTED; |
85 | | - if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
86 | | - $conds[] = $dbr->bitAnd('ar_deleted', $suppressedText ) . |
87 | | - ' != ' . $suppressedText; |
88 | 81 | } |
89 | 82 | return self::listPages( $dbr, $conds ); |
90 | 83 | } |
Index: branches/REL1_18/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -314,20 +314,17 @@ |
315 | 315 | $title = Title::makeTitleSafe( NS_FILE, $this->mDesiredDestName ); |
316 | 316 | // Show a subtitle link to deleted revisions (to sysops et al only) |
317 | 317 | if( $title instanceof Title ) { |
318 | | - if ( $wgUser->isAllowed( 'deletedhistory' ) ) { |
319 | | - $canViewSuppress = $wgUser->isAllowed( 'suppressrevision' ); |
320 | | - $count = $title->isDeleted( $canViewSuppress ); |
321 | | - if ( $count > 0 ) { |
322 | | - $link = wfMsgExt( |
323 | | - $wgUser->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted', |
324 | | - array( 'parse', 'replaceafter' ), |
325 | | - $this->getSkin()->linkKnown( |
326 | | - SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ), |
327 | | - wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $count ) |
328 | | - ) |
329 | | - ); |
330 | | - $wgOut->addHTML( "<div id=\"contentSub2\">{$link}</div>" ); |
331 | | - } |
| 318 | + $count = $title->isDeleted(); |
| 319 | + if ( $count > 0 && $wgUser->isAllowed( 'deletedhistory' ) ) { |
| 320 | + $link = wfMsgExt( |
| 321 | + $wgUser->isAllowed( 'delete' ) ? 'thisisdeleted' : 'viewdeleted', |
| 322 | + array( 'parse', 'replaceafter' ), |
| 323 | + $this->getSkin()->linkKnown( |
| 324 | + SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ), |
| 325 | + wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $count ) |
| 326 | + ) |
| 327 | + ); |
| 328 | + $wgOut->addHTML( "<div id=\"contentSub2\">{$link}</div>" ); |
332 | 329 | } |
333 | 330 | } |
334 | 331 | } |
Index: branches/REL1_18/phase3/includes/Skin.php |
— | — | @@ -727,9 +727,8 @@ |
728 | 728 | |
729 | 729 | if ( $this->getUser()->isAllowed( 'deletedhistory' ) && |
730 | 730 | ( $this->getTitle()->getArticleId() == 0 || $action == 'history' ) ) { |
| 731 | + $n = $this->getTitle()->isDeleted(); |
731 | 732 | |
732 | | - $includeSuppressed = $this->getUser()->isAllowed( 'suppressrevision' ); |
733 | | - $n = $this->getTitle()->isDeleted( $includeSuppressed ); |
734 | 733 | |
735 | 734 | if ( $n ) { |
736 | 735 | if ( $this->getUser()->isAllowed( 'undelete' ) ) { |