From 859463788269566fc93241d05477042bbbbde8d3 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 30 Nov 2012 10:37:25 +0100 Subject: [PATCH] Removes automatic guessing of database object's database table name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … since it didn't work. --- .../files/lib/data/DatabaseObject.class.php | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/wcfsetup/install/files/lib/data/DatabaseObject.class.php b/wcfsetup/install/files/lib/data/DatabaseObject.class.php index 21236f3b99..63754472e3 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObject.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObject.class.php @@ -119,20 +119,6 @@ abstract class DatabaseObject implements IStorableObject { * @see wcf\data\IStorableObject::getDatabaseTableName() */ public static function getDatabaseTableName() { - if (empty(static::$databaseTableName)) { - $className = get_called_class(); - $className = substr($className, (strrpos($className, '\\') + 1)); - - preg_match_all('~((?:^|[A-Z])[a-z]+)~', $className, $matches); - foreach ($matches[1] as $part) { - if (!empty(static::$databaseTableName)) { - static::$databaseTableName .= '_'; - } - - static::$databaseTableName .= strtolower($part); - } - } - return 'wcf'.WCF_N.'_'.static::$databaseTableName; } @@ -140,20 +126,6 @@ abstract class DatabaseObject implements IStorableObject { * @see wcf\data\IStorableObject::getDatabaseTableAlias() */ public static function getDatabaseTableAlias() { - if (empty(static::$databaseTableName)) { - $className = get_called_class(); - $className = substr($className, (strrpos($className, '\\') + 1)); - - preg_match_all('~((?:^|[A-Z])[a-z]+)~', $className, $matches); - foreach ($matches[1] as $part) { - if (!empty(static::$databaseTableName)) { - static::$databaseTableName .= '_'; - } - - static::$databaseTableName .= strtolower($part); - } - } - return static::$databaseTableName; } -- 2.20.1