* 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();
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;
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;
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;
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;
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;
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;
"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.",
"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.",
'rcfilters-activefilters',
'rcfilters-restore-default-filters',
'rcfilters-clear-all-filters',
+ 'rcfilters-clear-filters-to-defaults',
'rcfilters-search-placeholder',
'rcfilters-invalid-filter',
'rcfilters-empty-filter',
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 );