Merge "Array to string conversion in TransformationalImageHandler.php:167"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 17 Sep 2014 17:29:22 +0000 (17:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 17 Sep 2014 17:29:22 +0000 (17:29 +0000)
docs/hooks.txt
includes/Title.php
includes/media/TransformationalImageHandler.php

index d5fb2af..f4b8ef2 100644 (file)
@@ -2594,6 +2594,10 @@ database result.
 &$titleArray: set this to an object to override the default object returned
 $res: database result used to create the object
 
+'TitleExists': Called when determining whether a page exists at a given title.
+$title: The title being tested.
+&$exists: Whether the title exists.
+
 'TitleQuickPermissions': Called from Title::checkQuickPermissions to add to
 or override the quick permissions check.
 $title: The Title object being accessed
index 8727b74..74d78ba 100644 (file)
@@ -4333,7 +4333,9 @@ class Title {
         * @return bool
         */
        public function exists() {
-               return $this->getArticleID() != 0;
+               $exists = $this->getArticleID() != 0;
+               wfRunHooks( 'TitleExists', array( $this, &$exists ) );
+               return $exists;
        }
 
        /**
index 671f0c5..3e3be3d 100644 (file)
@@ -577,7 +577,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
         */
        public function rotate( $file, $params ) {
                return new MediaTransformError( 'thumbnail_error', 0, 0,
-                       "$scaler rotation not implemented" );
+                       get_class( $this ) . ' rotation not implemented' );
        }
 
        /**