Merge "WikiTextStructure: Explain the source of two non-Core exclusions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 17 Jan 2019 19:50:33 +0000 (19:50 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 17 Jan 2019 19:50:33 +0000 (19:50 +0000)
RELEASE-NOTES-1.33
includes/Linker.php
includes/api/ApiSetNotificationTimestamp.php
includes/skins/Skin.php
languages/messages/MessagesSat.php

index c9bd093..80e3bbd 100644 (file)
@@ -79,6 +79,8 @@ production.
 * (T212356) When using action=delete on pages with many revisions, the module
   may return a boolean-true 'scheduled' and no 'logid'. This signifies that the
   deletion will be processed via the job queue.
+* action=setnotificationtimestamp will now update the watchlist asynchronously
+  if entirewatchlist is set, so updates may not be visible immediately
 
 === Action API internal changes in 1.33 ===
 * A number of deprecated methods for API documentation, intended for overriding
@@ -105,6 +107,7 @@ because of Phabricator reports.
 * (T203908) Added language support for Eastern Pwo (kjp).
 * (T213717) Fixed a translation error on Goan Konkani (gom-deva) translations
   for NS_TEMPLATE.
+* (T212221) Added $digitTransformTable for Santali (sat).
 
 === Breaking changes in 1.33 ===
 * The parameteter $lang in DifferenceEngine::setTextLanguage must be of type
index 89a41dc..d1434f8 100644 (file)
@@ -958,23 +958,23 @@ class Linker {
 
                Hooks::run( 'UserToolLinksEdit', [ $userId, $userText, &$items ] );
 
-               if ( $items ) {
-                       if ( $useParentheses ) {
-                               return wfMessage( 'word-separator' )->escaped()
-                                       . '<span class="mw-usertoollinks">'
-                                       . wfMessage( 'parentheses' )->rawParams( $wgLang->pipeList( $items ) )->escaped()
-                                       . '</span>';
-                       } else {
-                               $tools = [];
-                               foreach ( $items as $tool ) {
-                                       $tools[] = Html::rawElement( 'span', [], $tool );
-                               }
-                               return ' <span class="mw-usertoollinks mw-changeslist-links">' .
-                                       implode( ' ', $tools ) . '</span>';
-                       }
-               } else {
+               if ( !$items ) {
                        return '';
                }
+
+               if ( $useParentheses ) {
+                       return wfMessage( 'word-separator' )->escaped()
+                               . '<span class="mw-usertoollinks">'
+                               . wfMessage( 'parentheses' )->rawParams( $wgLang->pipeList( $items ) )->escaped()
+                               . '</span>';
+               }
+
+               $tools = [];
+               foreach ( $items as $tool ) {
+                       $tools[] = Html::rawElement( 'span', [], $tool );
+               }
+               return ' <span class="mw-usertoollinks mw-changeslist-links">' .
+                       implode( ' ', $tools ) . '</span>';
        }
 
        /**
@@ -1463,16 +1463,15 @@ class Linker {
                // compatibility, acc. to brion -ævar
                if ( $comment == '' || $comment == '*' ) {
                        return '';
+               }
+               $formatted = self::formatComment( $comment, $title, $local, $wikiId );
+               if ( $useParentheses ) {
+                       $formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
+                       $classNames = 'comment';
                } else {
-                       $formatted = self::formatComment( $comment, $title, $local, $wikiId );
-                       if ( $useParentheses ) {
-                               $formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
-                               $classNames = 'comment';
-                       } else {
-                               $classNames = 'comment comment--without-parentheses';
-                       }
-                       return " <span class=\"$classNames\">$formatted</span>";
+                       $classNames = 'comment comment--without-parentheses';
                }
+               return " <span class=\"$classNames\">$formatted</span>";
        }
 
        /**
@@ -2089,27 +2088,26 @@ class Linker {
 
                if ( !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) {
                        return self::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
+               }
+               if ( $rev->getId() ) {
+                       // RevDelete links using revision ID are stable across
+                       // page deletion and undeletion; use when possible.
+                       $query = [
+                               'type' => 'revision',
+                               'target' => $title->getPrefixedDBkey(),
+                               'ids' => $rev->getId()
+                       ];
                } else {
-                       if ( $rev->getId() ) {
-                               // RevDelete links using revision ID are stable across
-                               // page deletion and undeletion; use when possible.
-                               $query = [
-                                       'type' => 'revision',
-                                       'target' => $title->getPrefixedDBkey(),
-                                       'ids' => $rev->getId()
-                               ];
-                       } else {
-                               // Older deleted entries didn't save a revision ID.
-                               // We have to refer to these by timestamp, ick!
-                               $query = [
-                                       'type' => 'archive',
-                                       'target' => $title->getPrefixedDBkey(),
-                                       'ids' => $rev->getTimestamp()
-                               ];
-                       }
-                       return self::revDeleteLink( $query,
-                               $rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
+                       // Older deleted entries didn't save a revision ID.
+                       // We have to refer to these by timestamp, ick!
+                       $query = [
+                               'type' => 'archive',
+                               'target' => $title->getPrefixedDBkey(),
+                               'ids' => $rev->getTimestamp()
+                       ];
                }
+               return self::revDeleteLink( $query,
+                       $rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
        }
 
        /**
index b81c5bf..41c207b 100644 (file)
@@ -108,10 +108,14 @@ class ApiSetNotificationTimestamp extends ApiBase {
                $result = [];
                if ( $params['entirewatchlist'] ) {
                        // Entire watchlist mode: Just update the thing and return a success indicator
-                       $watchedItemStore->setNotificationTimestampsForUser(
-                               $user,
-                               $timestamp
-                       );
+                       if ( is_null( $timestamp ) ) {
+                               $watchedItemStore->resetAllNotificationTimestampsForUser( $user );
+                       } else {
+                               $watchedItemStore->setNotificationTimestampsForUser(
+                                       $user,
+                                       $timestamp
+                               );
+                       }
 
                        $result['notificationtimestamp'] = is_null( $timestamp )
                                ? ''
index e31bc06..7a2679e 100644 (file)
@@ -716,10 +716,12 @@ abstract class Skin extends ContextSource {
         */
        function getUndeleteLink() {
                $action = $this->getRequest()->getVal( 'action', 'view' );
+               $title = $this->getTitle();
 
-               if ( $this->getTitle()->userCan( 'deletedhistory', $this->getUser() ) &&
-                       ( !$this->getTitle()->exists() || $action == 'history' ) ) {
-                       $n = $this->getTitle()->isDeleted();
+               if ( ( !$title->exists() || $action == 'history' ) &&
+                       $title->userCan( 'deletedhistory', $this->getUser() )
+               ) {
+                       $n = $title->isDeleted();
 
                        if ( $n ) {
                                if ( $this->getTitle()->quickUserCan( 'undelete', $this->getUser() ) ) {
index 9dbb838..20fdc2c 100644 (file)
@@ -27,3 +27,16 @@ $namespaceNames = [
        NS_CATEGORY         => 'ᱛᱷᱚᱠ',
        NS_CATEGORY_TALK    => 'ᱛᱷᱚᱠ_ᱜᱟᱞᱢᱟᱨᱟᱣ',
 ];
+
+$digitTransformTable = [
+       '0' => '᱐',
+       '1' => '᱑',
+       '2' => '᱒',
+       '3' => '᱓',
+       '4' => '᱔',
+       '5' => '᱕',
+       '6' => '᱖',
+       '7' => '᱗',
+       '8' => '᱘',
+       '9' => '᱙',
+];