From: Alexander Ebert Date: Tue, 31 Jan 2012 15:10:19 +0000 (+0100) Subject: Processed some TODOs X-Git-Tag: 2.0.0_Beta_1~1369 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88a2d636bc4642ae2734b2eb14245f38b629a6c3;p=GitHub%2FWoltLab%2FWCF.git Processed some TODOs --- diff --git a/wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php b/wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php index 1760b08b50..d461bdd1da 100644 --- a/wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php +++ b/wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php @@ -25,8 +25,7 @@ class UserOptionCategory extends DatabaseObject { protected static $databaseTableIndexName = 'categoryID'; /** - * @todo Methode so beibehalten und effektiv DatabaseObject::__construct() klonen - * oder generell so etwas mit einem zusätzlichen Query abfragen? + * @see wcf\data\DatabaseObject::__construct() */ public function __construct($categoryID, $row = null, UserOptionCategory $category = null) { if ($categoryID !== null) { diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index e298344b31..b4728f450a 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -385,11 +385,7 @@ class WCF { } /** - * Initialises applications. - * - * @todo Determine all required applications as such connected - * with each other. Ensure all applications implement the - * 'Application' interface. + * Initializes applications. */ protected function initApplications() { if (PACKAGE_ID == 1) return; @@ -435,8 +431,16 @@ class WCF { } } else { + // get package name for better readability + $sql = "SELECT package + FROM wcf".WCF_N."_package + WHERE packageID = ?"; + $statement = self::getDB()->prepareStatement($sql); + $statement->execute(array($application->packageID)); + $row = $statement->fetchArray(); + unset(self::$autoloadDirectories[$abbreviation]); - throw new exception\SystemException('Unable to run '.$row->package.', '.$className.' missing.'); //TODO: undefined variable + throw new exception\SystemException("Unable to run '".$row['package']."', '".$className."' is missing or does not implement 'wcf\system\application\IApplication'."); } // load application settings if not within ACP diff --git a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php index 3e3b67cc71..fe7201b40d 100644 --- a/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php @@ -286,7 +286,7 @@ class PostgreSQLDatabaseEditor extends DatabaseEditor { * @see wcf\system\database\editor\DatabaseEditor::dropForeignKey() */ public function dropForeignKey($tableName, $indexName) { - // TODO: implement this function + // TODO: Could it be, that this method is not required because Postgre is clever enough to delete references anyway? } /** diff --git a/wcfsetup/install/files/lib/system/package/PackageUninstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageUninstallationNodeBuilder.class.php index ef912ee07b..401ccf5446 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUninstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUninstallationNodeBuilder.class.php @@ -6,8 +6,6 @@ use wcf\system\WCF; /** * PackageUninstallationNodeBuilder creates a logical node-based uninstallation tree. - * - * @todo Change to use Prepared Statements, see line 42 * * @author Alexander Ebert * @copyright 2001-2011 WoltLab GmbH diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 3476aa7ca4..74b0b90a08 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -483,8 +483,6 @@ abstract class CronjobUtil { * @param string $startDom * @param string $startMonth * @param string $startDow - * - * @todo Move code to seperate class, e.g. CronjobUtil */ public static function validate($startMinute, $startHour, $startDom, $startMonth, $startDow) { self::validateAttribute('startMinute', $startMinute); @@ -499,7 +497,6 @@ abstract class CronjobUtil { * * @param string $name * @param string $value - * @todo Move code to seperate class, e.g. CronjobUtil */ protected static function validateAttribute($name, $value) { if ($value === '') {