Change-Id: Ic65b7b2f1c2396246a3825c8d06d42bd6d06c37e
* Get extra parameters for the query string when redirecting after
* successful save.
*
* Get extra parameters for the query string when redirecting after
* successful save.
*
*/
public function getExtraSuccessRedirectParameters() {
return [];
*/
public function getExtraSuccessRedirectParameters() {
return [];
*
* a) Create a new file in storage with the contents of a string
* @code
*
* a) Create a new file in storage with the contents of a string
* @code
* 'op' => 'create',
* 'dst' => <storage path>,
* 'content' => <string of new file contents>,
* 'overwrite' => <boolean>,
* 'overwriteSame' => <boolean>,
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'create',
* 'dst' => <storage path>,
* 'content' => <string of new file contents>,
* 'overwrite' => <boolean>,
* 'overwriteSame' => <boolean>,
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* b) Copy a file system file into storage
* @code
* @endcode
*
* b) Copy a file system file into storage
* @code
* 'op' => 'store',
* 'src' => <file system path, FSFile, or TempFSFile>,
* 'dst' => <storage path>,
* 'overwrite' => <boolean>,
* 'overwriteSame' => <boolean>,
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'store',
* 'src' => <file system path, FSFile, or TempFSFile>,
* 'dst' => <storage path>,
* 'overwrite' => <boolean>,
* 'overwriteSame' => <boolean>,
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* c) Copy a file within storage
* @code
* @endcode
*
* c) Copy a file within storage
* @code
* 'op' => 'copy',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'op' => 'copy',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'overwriteSame' => <boolean>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* 'overwriteSame' => <boolean>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* d) Move a file within storage
* @code
* @endcode
*
* d) Move a file within storage
* @code
* 'op' => 'move',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'op' => 'move',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'overwriteSame' => <boolean>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* 'overwriteSame' => <boolean>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* e) Delete a file within storage
* @code
* @endcode
*
* e) Delete a file within storage
* @code
* 'op' => 'delete',
* 'src' => <storage path>,
* 'ignoreMissingSource' => <boolean>
* 'op' => 'delete',
* 'src' => <storage path>,
* 'ignoreMissingSource' => <boolean>
* @endcode
*
* f) Update metadata for a file within storage
* @code
* @endcode
*
* f) Update metadata for a file within storage
* @code
* 'op' => 'describe',
* 'src' => <storage path>,
* 'headers' => <HTTP header name/value map>
* 'op' => 'describe',
* 'src' => <storage path>,
* 'headers' => <HTTP header name/value map>
* @endcode
*
* g) Do nothing (no-op)
* @code
* @endcode
*
* g) Do nothing (no-op)
* @code
* @endcode
*
* Boolean flags for operations (operation-specific):
* @endcode
*
* Boolean flags for operations (operation-specific):
*
* a) Create a new file in storage with the contents of a string
* @code
*
* a) Create a new file in storage with the contents of a string
* @code
* 'op' => 'create',
* 'dst' => <storage path>,
* 'content' => <string of new file contents>,
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'create',
* 'dst' => <storage path>,
* 'content' => <string of new file contents>,
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* b) Copy a file system file into storage
* @code
* @endcode
*
* b) Copy a file system file into storage
* @code
* 'op' => 'store',
* 'src' => <file system path, FSFile, or TempFSFile>,
* 'dst' => <storage path>,
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'store',
* 'src' => <file system path, FSFile, or TempFSFile>,
* 'dst' => <storage path>,
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* c) Copy a file within storage
* @code
* @endcode
*
* c) Copy a file within storage
* @code
* 'op' => 'copy',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'copy',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* d) Move a file within storage
* @code
* @endcode
*
* d) Move a file within storage
* @code
* 'op' => 'move',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* 'op' => 'move',
* 'src' => <storage path>,
* 'dst' => <storage path>,
* 'ignoreMissingSource' => <boolean>, # since 1.21
* 'headers' => <HTTP header name/value map> # since 1.21
* @endcode
*
* e) Delete a file within storage
* @code
* @endcode
*
* e) Delete a file within storage
* @code
* 'op' => 'delete',
* 'src' => <storage path>,
* 'ignoreMissingSource' => <boolean>
* 'op' => 'delete',
* 'src' => <storage path>,
* 'ignoreMissingSource' => <boolean>
* @endcode
*
* f) Update metadata for a file within storage
* @code
* @endcode
*
* f) Update metadata for a file within storage
* @code
* 'op' => 'describe',
* 'src' => <storage path>,
* 'headers' => <HTTP header name/value map>
* 'op' => 'describe',
* 'src' => <storage path>,
* 'headers' => <HTTP header name/value map>
* @endcode
*
* g) Do nothing (no-op)
* @code
* @endcode
*
* g) Do nothing (no-op)
* @code
* @endcode
*
* @par Boolean flags for operations (operation-specific):
* @endcode
*
* @par Boolean flags for operations (operation-specific):
* @param array $items An array of titles, or an array of findFile() options with
* the "title" option giving the title. Example:
*
* @param array $items An array of titles, or an array of findFile() options with
* the "title" option giving the title. Example:
*
- * $findItem = array( 'title' => $title, 'private' => true );
- * $findBatch = array( $findItem );
+ * $findItem = [ 'title' => $title, 'private' => true ];
+ * $findBatch = [ $findItem ];
* $repo->findFiles( $findBatch );
*
* No title should appear in $items twice, as the result use titles as keys
* $repo->findFiles( $findBatch );
*
* No title should appear in $items twice, as the result use titles as keys
- * $wgForeignFileRepos[] = array(
+ * $wgForeignFileRepos[] = [
* 'class' => 'ForeignAPIRepo',
* 'name' => 'shared',
* 'apibase' => 'https://en.wikipedia.org/w/api.php',
* 'fetchDescription' => true, // Optional
* 'descriptionCacheExpiry' => 3600,
* 'class' => 'ForeignAPIRepo',
* 'name' => 'shared',
* 'apibase' => 'https://en.wikipedia.org/w/api.php',
* 'fetchDescription' => true, // Optional
* 'descriptionCacheExpiry' => 3600,
* @code
* $ php maintenance/eval.php
* > $queue = JobQueueGroup::singleton();
* @code
* $ php maintenance/eval.php
* > $queue = JobQueueGroup::singleton();
- * > $job = new NullJob( Title::newMainPage(), array( 'lives' => 10 ) );
+ * > $job = new NullJob( Title::newMainPage(), [ 'lives' => 10 ] );
* > $queue->push( $job );
* @endcode
* You can then confirm the job has been enqueued by using the showJobs.php
* > $queue->push( $job );
* @endcode
* You can then confirm the job has been enqueued by using the showJobs.php
$protectDescription = '';
foreach ( array_filter( $limit ) as $action => $restrictions ) {
$protectDescription = '';
foreach ( array_filter( $limit ) as $action => $restrictions ) {
- # $action is one of $wgRestrictionTypes = array( 'create', 'edit', 'move', 'upload' ).
+ # $action is one of $wgRestrictionTypes = [ 'create', 'edit', 'move', 'upload' ].
# All possible message keys are listed here for easier grepping:
# * restriction-create
# * restriction-edit
# * restriction-move
# * restriction-upload
$actionText = wfMessage( 'restriction-' . $action )->inContentLanguage()->text();
# All possible message keys are listed here for easier grepping:
# * restriction-create
# * restriction-edit
# * restriction-move
# * restriction-upload
$actionText = wfMessage( 'restriction-' . $action )->inContentLanguage()->text();
- # $restrictions is one of $wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop' ),
+ # $restrictions is one of $wgRestrictionLevels = [ '', 'autoconfirmed', 'sysop' ],
# with '' filtered out. All possible message keys are listed below:
# * protect-level-autoconfirmed
# * protect-level-sysop
# with '' filtered out. All possible message keys are listed below:
# * protect-level-autoconfirmed
# * protect-level-sysop
* Scale a file (probably with a locally installed imagemagick, or similar)
* and output it to STDOUT.
* @param File $file
* Scale a file (probably with a locally installed imagemagick, or similar)
* and output it to STDOUT.
* @param File $file
- * @param array $params Scaling parameters ( e.g. array( width => '50' ) );
+ * @param array $params Scaling parameters ( e.g. [ width => '50' ] );
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException|UploadStashFileNotFoundException
* @return bool Success
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException|UploadStashFileNotFoundException
* @return bool Success
* client to cache it forever.
*
* @param File $file
* client to cache it forever.
*
* @param File $file
- * @param array $params Scaling parameters ( e.g. array( width => '50' ) );
+ * @param array $params Scaling parameters ( e.g. [ width => '50' ] );
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException
* @return bool Success
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException
* @return bool Success
/**
* Determine which of the MediaWiki and MediaWiki_talk namespace pages exist.
/**
* Determine which of the MediaWiki and MediaWiki_talk namespace pages exist.
- * Returns array( 'pages' => ..., 'talks' => ... ), where the subarrays have
+ * Returns [ 'pages' => ..., 'talks' => ... ], where the subarrays have
* an entry for each existing page, with the key being the message name and
* value arbitrary.
*
* an entry for each existing page, with the key being the message name and
* value arbitrary.
*
* updated value within the database row.
*
* Sample Response:
* updated value within the database row.
*
* Sample Response:
* 'some_col' => 'new value',
* 'other_col' => 99,
* 'some_col' => 'new value',
* 'other_col' => 99,
*
* @param stdClass $row A row from the database
* @return array Map of column names to updated value within the
*
* @param stdClass $row A row from the database
* @return array Map of column names to updated value within the