Revert incorrect changes on DatabaseObject
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 23 Oct 2024 06:28:38 +0000 (08:28 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 23 Oct 2024 06:28:38 +0000 (08:28 +0200)
wcfsetup/install/files/lib/data/DatabaseObject.class.php

index 705d71d8fe7b7d7aab12b8eb46358b38dae23abf..15200e9aa3294a636b3ce123acf62a6fd77a4d40 100644 (file)
@@ -135,22 +135,20 @@ abstract class DatabaseObject implements IIDObject, IStorableObject
         $classParts = \explode('\\', $className);
 
         if (static::$databaseTableName !== '') {
-            return $classParts[0] . '1_' . static::$databaseTableName;
+            return $classParts[0] . WCF_N . '_' . static::$databaseTableName;
         }
 
         static $databaseTableNames = [];
         if (!isset($databaseTableNames[$className])) {
-            $databaseTableNames[$className] = $classParts[0] . '1_' . \strtolower(
-                \implode(
-                    '_',
-                    \preg_split(
-                        '~(?=[A-Z](?=[a-z]))~',
-                        \array_pop($classParts),
-                        -1,
-                        \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY
-                    )
+            $databaseTableNames[$className] = $classParts[0] . WCF_N . '_' . \strtolower(\implode(
+                '_',
+                \preg_split(
+                    '~(?=[A-Z](?=[a-z]))~',
+                    \array_pop($classParts),
+                    -1,
+                    \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY
                 )
-            );
+            ));
         }
 
         return $databaseTableNames[$className];