Merge "Show protection log on creation-protected pages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 7 Aug 2017 22:12:44 +0000 (22:12 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 7 Aug 2017 22:12:44 +0000 (22:12 +0000)
1  2 
includes/page/Article.php
languages/i18n/en.json

@@@ -1180,7 -1180,7 +1180,7 @@@ class Article implements Page 
                $key = $cache->makeKey( 'page-recent-delete', md5( $title->getPrefixedText() ) );
                $loggedIn = $this->getContext()->getUser()->isLoggedIn();
                if ( $loggedIn || $cache->get( $key ) ) {
-                       $logTypes = [ 'delete', 'move' ];
+                       $logTypes = [ 'delete', 'move', 'protect' ];
  
                        $dbr = wfGetDB( DB_REPLICA );
  
                        [ 'delete', $this->getTitle()->getPrefixedText() ] )
                ) {
                        # Flag to hide all contents of the archived revisions
 -                      $suppress = $request->getVal( 'wpSuppress' ) && $user->isAllowed( 'suppressrevision' );
 +                      $suppress = $request->getCheck( 'wpSuppress' ) && $user->isAllowed( 'suppressrevision' );
  
                        $this->doDelete( $reason, $suppress );
  
                $title = $this->getTitle();
                $ctx = $this->getContext();
                $outputPage = $ctx->getOutput();
 -              $useMediaWikiUIEverywhere = $ctx->getConfig()->get( 'UseMediaWikiUIEverywhere' );
                $outputPage->setPageTitle( wfMessage( 'delete-confirm', $title->getPrefixedText() ) );
                $outputPage->addBacklinkSubtitle( $title );
                $outputPage->setRobotPolicy( 'noindex,nofollow' );
                Hooks::run( 'ArticleConfirmDelete', [ $this, $outputPage, &$reason ] );
  
                $user = $this->getContext()->getUser();
 -              if ( $user->isAllowed( 'suppressrevision' ) ) {
 -                      $suppress = Html::openElement( 'div', [ 'id' => 'wpDeleteSuppressRow' ] ) .
 -                              Xml::checkLabel( wfMessage( 'revdelete-suppress' )->text(),
 -                                      'wpSuppress', 'wpSuppress', false, [ 'tabindex' => '4' ] ) .
 -                              Html::closeElement( 'div' );
 -              } else {
 -                      $suppress = '';
 -              }
                $checkWatch = $user->getBoolOption( 'watchdeletion' ) || $user->isWatched( $title );
  
                $outputPage->enableOOUI();
                        );
                }
  
 +              if ( $user->isAllowed( 'suppressrevision' ) ) {
 +                      $fields[] = new OOUI\FieldLayout(
 +                              new OOUI\CheckboxInputWidget( [
 +                                      'name' => 'wpSuppress',
 +                                      'inputId' => 'wpSuppress',
 +                                      'tabIndex' => 4,
 +                              ] ),
 +                              [
 +                                      'label' => $ctx->msg( 'revdelete-suppress' )->text(),
 +                                      'align' => 'inline',
 +                                      'infusable' => true,
 +                              ]
 +                      );
 +              }
 +
                $fields[] = new OOUI\FieldLayout(
                        new OOUI\ButtonInputWidget( [
                                'name' => 'wpConfirmB',
diff --combined languages/i18n/en.json
@@@ -30,7 -30,7 +30,7 @@@
        "tog-shownumberswatching": "Show the number of watching users",
        "tog-oldsig": "Your existing signature:",
        "tog-fancysig": "Treat signature as wikitext (without an automatic link)",
 -      "tog-uselivepreview": "Use live preview",
 +      "tog-uselivepreview": "Show previews without reloading the page",
        "tog-forceeditsummary": "Prompt me when entering a blank edit summary",
        "tog-watchlisthideown": "Hide my edits from the watchlist",
        "tog-watchlisthidebots": "Hide bot edits from the watchlist",
        "permissionserrorstext-withaction": "You do not have permission to $2, for the following {{PLURAL:$1|reason|reasons}}:",
        "contentmodelediterror": "You cannot edit this revision because its content model is <code>$1</code>, which differs from the current content model of the page <code>$2</code>.",
        "recreate-moveddeleted-warn": "<strong>Warning: You are recreating a page that was previously deleted.</strong>\n\nYou should consider whether it is appropriate to continue editing this page.\nThe deletion and move log for this page are provided here for convenience:",
-       "moveddeleted-notice": "This page has been deleted.\nThe deletion and move log for the page are provided below for reference.",
-       "moveddeleted-notice-recent": "Sorry, this page was recently deleted (within the last 24 hours).\nThe deletion and move log for the page are provided below for reference.",
+       "moveddeleted-notice": "This page has been deleted.\nThe deletion, protection, and move log for the page are provided below for reference.",
+       "moveddeleted-notice-recent": "Sorry, this page was recently deleted (within the last 24 hours).\nThe deletion, protection, and move log for the page are provided below for reference.",
        "log-fulllog": "View full log",
        "edit-hook-aborted": "Edit aborted by hook.\nIt gave no explanation.",
        "edit-gone-missing": "Could not update the page.\nIt appears to have been deleted.",
        "prefs-editwatchlist-clear": "Clear your watchlist",
        "prefs-watchlist-days": "Days to show in watchlist:",
        "prefs-watchlist-days-max": "Maximum $1 {{PLURAL:$1|day|days}}",
 -      "prefs-watchlist-edits": "Maximum number of changes to show in expanded watchlist:",
 +      "prefs-watchlist-edits": "Maximum number of changes to show in watchlist:",
        "prefs-watchlist-edits-max": "Maximum number: 1000",
        "prefs-watchlist-token": "Watchlist token:",
        "prefs-misc": "Misc",
        "recentchanges-legend-plusminus": "(<em>±123</em>)",
        "recentchanges-submit": "Show",
        "rcfilters-legend-heading": "<strong>List of abbreviations:</strong>",
 +      "rcfilters-other-review-tools": "<strong>Other review tools</strong>",
 +      "rcfilters-group-results-by-page": "Group results by page",
 +      "rcfilters-grouping-title": "Grouping",
        "rcfilters-activefilters": "Active filters",
        "rcfilters-advancedfilters": "Advanced filters",
        "rcfilters-limit-title": "Changes to show",
 -      "rcfilters-limit-shownum": "Show last $1 changes",
 +      "rcfilters-limit-shownum": "Show last {{PLURAL:$1|change|$1 changes}}",
        "rcfilters-days-title": "Recent days",
        "rcfilters-hours-title": "Recent hours",
        "rcfilters-days-show-days": "$1 {{PLURAL:$1|day|days}}",
        "rcfilters-savedqueries-new-name-label": "Name",
        "rcfilters-savedqueries-new-name-placeholder": "Describe the purpose of the filter",
        "rcfilters-savedqueries-apply-label": "Create filter",
 +      "rcfilters-savedqueries-apply-and-setdefault-label": "Create default filter",
        "rcfilters-savedqueries-cancel-label": "Cancel",
        "rcfilters-savedqueries-add-new-title": "Save current filter settings",
        "rcfilters-restore-default-filters": "Restore default filters",
        "rcfilters-clear-all-filters": "Clear all filters",
 +      "rcfilters-show-new-changes": "View newest changes",
 +      "rcfilters-previous-changes-label": "Previously viewed changes",
        "rcfilters-search-placeholder": "Filter recent changes (browse or start typing)",
        "rcfilters-invalid-filter": "Invalid filter",
        "rcfilters-empty-filter": "No active filters. All contributions are shown.",
        "rcfilters-tag-prefix-tags": "#$1",
        "rcfilters-exclude-button-off": "Exclude selected",
        "rcfilters-exclude-button-on": "Excluding selected",
 +      "rcfilters-view-advanced-filters-label": "Advanced filters",
        "rcfilters-view-tags": "Tagged edits",
        "rcfilters-view-namespaces-tooltip": "Filter results by namespace",
        "rcfilters-view-tags-tooltip": "Filter results using edit tags",
        "rcfilters-view-return-to-default-tooltip": "Return to main filter menu",
        "rcfilters-liveupdates-button": "Live updates",
 +      "rcfilters-liveupdates-button-title-on": "Turn off live updates",
 +      "rcfilters-liveupdates-button-title-off": "Display new changes as they happen",
        "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
        "rclistfromreset": "Reset date selection",
        "rclistfrom": "Show new changes starting from $2, $3",
        "pageswithprop-legend": "Pages with a page property",
        "pageswithprop-text": "This page lists pages that use a particular page property.",
        "pageswithprop-prop": "Property name:",
 +      "pageswithprop-reverse": "Sort in reverse order",
 +      "pageswithprop-sortbyvalue": "Sort by property value",
        "pageswithprop-submit": "Go",
        "pageswithprop-prophidden-long": "long text property value hidden ($1)",
        "pageswithprop-prophidden-binary": "binary property value hidden ($1)",
        "enotif_lastdiff": "To view this change, see $1",
        "enotif_anon_editor": "anonymous user $1",
        "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEditor's summary: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the editor:\nmail: $PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThere will be no other notifications in case of further activity unless you visit this page while logged in. You could also reset the notification flags for all your watched pages on your watchlist.\n\nYour friendly {{SITENAME}} notification system\n\n--\nTo change your email notification settings, visit\n{{canonicalurl:{{#special:Preferences}}}}\n\nTo change your watchlist settings, visit\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nTo delete the page from your watchlist, visit\n$UNWATCHURL\n\nFeedback and further assistance:\n$HELPPAGE",
 +      "enotif_minoredit": "This is a minor edit",
        "created": "created",
        "changed": "changed",
        "deletepage": "Delete page",
        "import-nonewrevisions": "No revisions imported (all were either already present, or skipped due to errors).",
        "xml-error-string": "$1 at line $2, col $3 (byte $4): $5",
        "import-upload": "Upload XML data",
 -      "import-token-mismatch": "Loss of session data.\n\nYou might have been logged out. <strong>Please verify that you're still logged in and try again</strong>.\nIf it still does not work, try [[Special:UserLogout|logging out]] and logging back in, and check that your browser allows cookies from this site.",
 +      "import-token-mismatch": "Loss of session data.\n\nYou might have been logged out. '''Please verify that you're still logged in and try again'''.\nIf it still does not work, try [[Special:UserLogout|logging out]] and logging back in, and check that your browser allows cookies from this site.",
        "import-invalid-interwiki": "Cannot import from the specified wiki.",
        "import-error-edit": "Page \"$1\" was not imported because you are not allowed to edit it.",
        "import-error-create": "Page \"$1\" was not imported because you are not allowed to create it.",
        "specialpages": "Special pages",
        "specialpages-summary": "",
        "specialpages-note-top": "Legend",
 -      "specialpages-note": "* Normal special pages.\n* <span class=\"mw-specialpagerestricted\">Restricted special pages.</span>",
 +      "specialpages-note-restricted": "* Normal special pages.\n* <span class=\"mw-specialpagerestricted\">Restricted special pages.</span>",
 +      "specialpages-note-cached": "-",
        "specialpages-group-maintenance": "Maintenance reports",
        "specialpages-group-other": "Other special pages",
        "specialpages-group-login": "Login / create account",