Fix DatabaseBase::replaceVars for PHP 5.3
authorMarius Hoch <hoo@online.de>
Thu, 4 Dec 2014 22:14:00 +0000 (23:14 +0100)
committerMarius Hoch <hoo@online.de>
Thu, 4 Dec 2014 22:14:00 +0000 (23:14 +0100)
Change-Id: I78a535abfe3f444b2ccb99638a63b6f16c9f18af

includes/db/Database.php

index a805fa5..6c53f6a 100644 (file)
@@ -2423,12 +2423,16 @@ abstract class DatabaseBase implements IDatabase {
        }
 
        /**
-        * Get the name of an index in a given table
+        * Get the name of an index in a given table.
         *
+        * @protected Don't use outside of DatabaseBase and childs
         * @param string $index
         * @return string
         */
-       protected function indexName( $index ) {
+       public function indexName( $index ) {
+               // @FIXME: Make this protected once we move away from PHP 5.3
+               // Needs to be public because of usage in closure (in DatabaseBase::replaceVars)
+
                // Backwards-compatibility hack
                $renamed = array(
                        'ar_usertext_timestamp' => 'usertext_timestamp',