Merge "RecentChanges: Correct 'no matches found' message"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 20 Mar 2017 19:55:26 +0000 (19:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 20 Mar 2017 19:55:27 +0000 (19:55 +0000)
includes/libs/filebackend/FileBackendStore.php
includes/libs/filebackend/SwiftFileBackend.php
languages/i18n/en.json
languages/i18n/qqq.json
resources/Resources.php
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js

index 7cb26c6..039bd42 100644 (file)
@@ -1200,21 +1200,20 @@ abstract class FileBackendStore extends FileBackend {
         * to the order in which the handles where given.
         *
         * @param FileBackendStoreOpHandle[] $fileOpHandles
-        *
-        * @throws FileBackendError
         * @return StatusValue[] Map of StatusValue objects
+        * @throws FileBackendError
         */
        final public function executeOpHandlesInternal( array $fileOpHandles ) {
                $ps = $this->scopedProfileSection( __METHOD__ . "-{$this->name}" );
 
                foreach ( $fileOpHandles as $fileOpHandle ) {
                        if ( !( $fileOpHandle instanceof FileBackendStoreOpHandle ) ) {
-                               throw new InvalidArgumentException( "Got a non-FileBackendStoreOpHandle object." );
+                               throw new InvalidArgumentException( "Expected FileBackendStoreOpHandle object." );
                        } elseif ( $fileOpHandle->backend->getName() !== $this->getName() ) {
-                               throw new InvalidArgumentException(
-                                       "Got a FileBackendStoreOpHandle for the wrong backend." );
+                               throw new InvalidArgumentException( "Expected handle for this file backend." );
                        }
                }
+
                $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
                foreach ( $fileOpHandles as $fileOpHandle ) {
                        $fileOpHandle->closeResources();
index 631f6fd..ae0ad6f 100644 (file)
@@ -287,7 +287,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
@@ -353,7 +353,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
@@ -401,7 +401,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually write the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
@@ -460,7 +460,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually move the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
@@ -500,7 +500,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually delete the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
@@ -556,7 +556,7 @@ class SwiftFileBackend extends FileBackendStore {
                if ( !empty( $params['async'] ) ) { // deferred
                        $status->value = $opHandle;
                } else { // actually change the object in Swift
-                       $status->merge( current( $this->doExecuteOpHandlesInternal( [ $opHandle ] ) ) );
+                       $status->merge( current( $this->executeOpHandlesInternal( [ $opHandle ] ) ) );
                }
 
                return $status;
index 372d868..1fd9b57 100644 (file)
        "rcfilters-activefilters": "Active filters",
        "rcfilters-restore-default-filters": "Restore default filters",
        "rcfilters-clear-all-filters": "Clear all filters",
+       "rcfilters-clear-filters-to-defaults": "Set filters to defaults",
        "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.",
index f123189..3116163 100644 (file)
        "rcfilters-activefilters": "Title for the filters selection showing the active filters.",
        "rcfilters-restore-default-filters": "Label for the button that resets filters to defaults",
        "rcfilters-clear-all-filters": "Title for the button that clears all filters",
+       "rcfilters-clear-filters-to-defaults": "Title for the button that sets filters to default",
        "rcfilters-search-placeholder": "Placeholder for the filter search input.",
        "rcfilters-invalid-filter": "A label for an invalid filter.",
        "rcfilters-empty-filter": "Placeholder for the filter list when no filters were chosen.",
index 392cdb3..f57f8c8 100644 (file)
@@ -1795,6 +1795,7 @@ return [
                        'rcfilters-activefilters',
                        'rcfilters-restore-default-filters',
                        'rcfilters-clear-all-filters',
+                       'rcfilters-clear-filters-to-defaults',
                        'rcfilters-search-placeholder',
                        'rcfilters-invalid-filter',
                        'rcfilters-empty-filter',
index 944ebaa..3f461c7 100644 (file)
                this.resetButton.setLabel(
                        currFiltersAreEmpty ? mw.msg( 'rcfilters-restore-default-filters' ) : ''
                );
+               this.resetButton.setTitle(
+                       currFiltersAreEmpty ?
+                               mw.msg( 'rcfilters-clear-filters-to-defaults' ) :
+                               mw.msg( 'rcfilters-clear-all-filters' )
+               );
 
                this.resetButton.toggle( !hideResetButton );
                this.emptyFilterMessage.toggle( currFiltersAreEmpty );