X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmysqlschema.php;h=f9552c1dcdefd5cef37c8d6ad69ab59aaf18cb2a;hb=698f5c7a20d5792b629404ce513d2fa2c2bab907;hp=4556953667d83c0586e1c2b34ce4f34c60dd605f;hpb=79ec565104b8d546e4f2ffca2f351fba1be753d2;p=quix0rs-gnu-social.git diff --git a/lib/mysqlschema.php b/lib/mysqlschema.php index 4556953667..f9552c1dcd 100644 --- a/lib/mysqlschema.php +++ b/lib/mysqlschema.php @@ -50,21 +50,6 @@ class MysqlSchema extends Schema static $_single = null; protected $conn = null; - /** - * Constructor. Only run once for singleton object. - */ - - protected function __construct() - { - // XXX: there should be an easier way to do this. - $user = new User(); - - $this->conn = $user->getDatabaseConnection(); - - $user->free(); - - unset($user); - } /** * Main public entry point. Use this to get @@ -348,7 +333,7 @@ class MysqlSchema extends Schema } if (empty($name)) { - $name = "$table_".implode("_", $columnNames)."_idx"; + $name = "{$table}_".implode("_", $columnNames)."_idx"; } $res = $this->conn->query("ALTER TABLE $table ".