Fix DatabaseMysqlBase.php IDEA errors
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 3 Oct 2015 23:36:55 +0000 (16:36 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 4 Oct 2015 01:28:17 +0000 (18:28 -0700)
* Declare base mysqlRealEscapeString()
* Fix MySQLField::tableName() return value

Change-Id: I1277166e741e69cb1c045b3baa6ed8de664e9255

includes/db/DatabaseMysqlBase.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php

index ac7ce10..d2ccbf4 100644 (file)
@@ -572,6 +572,12 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                return $sQuoted;
        }
 
+       /**
+        * @param string $s
+        * @return mixed
+        */
+       abstract protected function mysqlRealEscapeString( $s );
+
        /**
         * MySQL uses `backticks` for identifier quoting instead of the sql standard "double quotes".
         *
@@ -1250,7 +1256,7 @@ class MySQLField implements Field {
         * @return string
         */
        function tableName() {
-               return $this->tableName;
+               return $this->tablename;
        }
 
        /**
index 42ea58e..8c09471 100644 (file)
@@ -79,6 +79,10 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase {
        protected function mysqlPing() {
        }
 
+       protected function mysqlRealEscapeString( $s ) {
+
+       }
+
        // From interface DatabaseType
        function insertId() {
        }