Merge "mw.language.convertPlural: Check if matching form exists"
[lhc/web/wiklou.git] / includes / media / FormatMetadata.php
index 1b1841c..74e51cf 100644 (file)
@@ -105,7 +105,7 @@ class FormatMetadata extends ContextSource {
                        // This seems ugly to wrap non-array's in an array just to unwrap again,
                        // especially when most of the time it is not an array
                        if ( !is_array( $tags[$tag] ) ) {
-                               $vals = Array( $vals );
+                               $vals = array( $vals );
                        }
 
                        // _type is a special value to say what array type
@@ -1479,6 +1479,7 @@ class FormatMetadata extends ContextSource {
 
                // If revision deleted, exit immediately
                if ( $file->isDeleted( File::DELETED_FILE ) ) {
+                       wfProfileOut( __METHOD__ );
                        return array();
                }
 
@@ -1616,8 +1617,7 @@ class FormatMetadata extends ContextSource {
         * @return mixed value in best language, null if there were no languages at all
         * @since 1.23
         */
-       protected function resolveMultilangValue( $value )
-       {
+       protected function resolveMultilangValue( $value ) {
                if (
                        !is_array( $value )
                        || !isset( $value['_type'] )
@@ -1731,8 +1731,7 @@ class FormatMetadata extends ContextSource {
         * @return array
         * @since 1.23
         */
-       protected function getPriorityLanguages()
-       {
+       protected function getPriorityLanguages() {
                $priorityLanguages = Language::getFallbacksIncludingSiteLanguage( $this->getLanguage()->getCode() );
                $priorityLanguages = array_merge( (array) $this->getLanguage()->getCode(), $priorityLanguages[0], $priorityLanguages[1] );
                return $priorityLanguages;