Insert simple return
authorOlaf Braun <info@braun-development.de>
Fri, 10 Nov 2023 08:28:53 +0000 (09:28 +0100)
committerOlaf Braun <info@braun-development.de>
Fri, 10 Nov 2023 08:28:53 +0000 (09:28 +0100)
wcfsetup/install/files/lib/data/TI18nDatabaseObjectAction.class.php

index 5e66fd17d56d9def9034ea6f8d6d4994460835eb..9862c7cfb6a03f84417f65f83928f363e876c475 100644 (file)
@@ -41,25 +41,26 @@ trait TI18nDatabaseObjectAction
     private function deleteI18nItems(array $langaugeItems): void
     {
         if ($langaugeItems !== []) {
-            //find language category id
-            $sql = "SELECT  languageCategoryID
+            return;
+        }
+        //find language category id
+        $sql = "SELECT  languageCategoryID
                 FROM    wcf1_language_category
                 WHERE   languageCategory = ?";
-            $statement = WCF::getDB()->prepare($sql, 1);
-            $statement->execute([$this->getLanguageCategory()]);
-            $languageCategoryID = $statement->fetchSingleColumn();
+        $statement = WCF::getDB()->prepare($sql, 1);
+        $statement->execute([$this->getLanguageCategory()]);
+        $languageCategoryID = $statement->fetchSingleColumn();
 
-            $con = new PreparedStatementConditionBuilder();
-            $con->add('languageItem IN (?)', [$langaugeItems]);
-            $con->add('packageID = ?', [$this->getPackageID()]);
-            $con->add('languageCategoryID = ?', [$languageCategoryID]);
+        $con = new PreparedStatementConditionBuilder();
+        $con->add('languageItem IN (?)', [$langaugeItems]);
+        $con->add('packageID = ?', [$this->getPackageID()]);
+        $con->add('languageCategoryID = ?', [$languageCategoryID]);
 
-            $sql = "DELETE FROM wcf1_language_item " . $con;
-            $statement = WCF::getDB()->prepare($sql);
-            $statement->execute($con->getParameters());
+        $sql = "DELETE FROM wcf1_language_item " . $con;
+        $statement = WCF::getDB()->prepare($sql);
+        $statement->execute($con->getParameters());
 
-            LanguageFactory::getInstance()->deleteLanguageCache();
-        }
+        LanguageFactory::getInstance()->deleteLanguageCache();
     }
 
     /**