- return $db->selectField( 'image', '1', array( 'img_name' => $name ), __METHOD__ );
+ return $db->selectField( 'image', '1', [ 'img_name' => $name ], __METHOD__ );
* if the target title exists in the image table, or if both the
* original and target titles exist in the page table, append
* increasing version numbers until the target title exists in
* if the target title exists in the image table, or if both the
* original and target titles exist in the page table, append
* increasing version numbers until the target title exists in
// @todo FIXME: Should this use File::move()?
$this->beginTransaction( $db, __METHOD__ );
$db->update( 'image',
// @todo FIXME: Should this use File::move()?
$this->beginTransaction( $db, __METHOD__ );
$db->update( 'image',
- array( 'img_name' => $final ),
- array( 'img_name' => $orig ),
+ [ 'img_name' => $final ],
+ [ 'img_name' => $orig ],
- array( 'oi_name' => $final ),
- array( 'oi_name' => $orig ),
+ [ 'oi_name' => $final ],
+ [ 'oi_name' => $orig ],
- array( 'page_title' => $final ),
- array( 'page_title' => $orig, 'page_namespace' => NS_FILE ),
+ [ 'page_title' => $final ],
+ [ 'page_title' => $orig, 'page_namespace' => NS_FILE ],
private function buildSafeTitle( $name ) {
$x = preg_replace_callback(
'/([^' . Title::legalChars() . ']|~)/',
private function buildSafeTitle( $name ) {
$x = preg_replace_callback(
'/([^' . Title::legalChars() . ']|~)/',