From b0b8aee6deb924b13c5980b3199f331c5569a293 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 27 May 2008 16:10:43 +0000 Subject: [PATCH] Let's not return arrays of arrays of arrays here :O --- includes/Title.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 9829ee2d2f..c7ea91551f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2400,22 +2400,22 @@ class Title { return array(array('badtitletext')); } if( $this->equals( $nt ) ) { - $errors[] = array(array('selfmove')); + $errors[] = array('selfmove'); } if( !$this->isMovable() || !$nt->isMovable() ) { - $errors[] = array(array('immobile_namespace')); + $errors[] = array('immobile_namespace'); } $oldid = $this->getArticleID(); $newid = $nt->getArticleID(); if ( strlen( $nt->getDBkey() ) < 1 ) { - $errors[] = array(array('articleexists')); + $errors[] = array('articleexists'); } if ( ( '' == $this->getDBkey() ) || ( !$oldid ) || ( '' == $nt->getDBkey() ) ) { - $errors[] = array(array('badarticleerror')); + $errors[] = array('badarticleerror'); } // Image-specific checks @@ -2423,10 +2423,10 @@ class Title { $file = wfLocalFile( $this ); if( $file->exists() ) { if( $nt->getNamespace() != NS_IMAGE ) { - $errors[] = array(array('imagenocrossnamespace')); + $errors[] = array('imagenocrossnamespace'); } if( !File::checkExtensionCompatibility( $file, $nt->getDbKey() ) ) { - $errors[] = array(array('imagetypemismatch')); + $errors[] = array('imagetypemismatch'); } } } @@ -2443,7 +2443,7 @@ class Title { global $wgUser; $err = null; if( !wfRunHooks( 'AbortMove', array( $this, $nt, $wgUser, &$err ) ) ) { - $errors[] = array(array('hookaborted', $err)); + $errors[] = array('hookaborted', $err); } # The move is allowed only if (1) the target doesn't exist, or @@ -2452,13 +2452,13 @@ class Title { if ( 0 != $newid ) { # Target exists; check for validity if ( ! $this->isValidMoveTarget( $nt ) ) { - $errors[] = array(array('articleexists')); + $errors[] = array('articleexists'); } } else { $tp = $nt->getTitleProtection(); $right = ( $tp['pt_create_perm'] == 'sysop' ) ? 'protect' : $tp['pt_create_perm']; if ( $tp and !$wgUser->isAllowed( $right ) ) { - $errors[] = array(array('cantmove-titleprotected')); + $errors[] = array('cantmove-titleprotected'); } } if(empty($errors)) -- 2.20.1