Processed some TODOs
authorAlexander Ebert <ebert@woltlab.com>
Tue, 31 Jan 2012 15:10:19 +0000 (16:10 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 31 Jan 2012 15:10:19 +0000 (16:10 +0100)
wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/database/editor/PostgreSQLDatabaseEditor.class.php
wcfsetup/install/files/lib/system/package/PackageUninstallationNodeBuilder.class.php
wcfsetup/install/files/lib/util/CronjobUtil.class.php

index 1760b08b50a3999b814be71f3b71d19e393145ad..d461bdd1da85c985d33eb0e4483f681a00239816 100644 (file)
@@ -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) {
index e298344b3121ac284e7053f52dafc9ae0cf24fde..b4728f450af524346f414313b2cca265e3b69a53 100644 (file)
@@ -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
index 3e3b67cc71845496516d12a118bba12b63a12037..fe7201b40de9fc7bf5ef522bc138d494359e0c27 100644 (file)
@@ -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?
        }
        
        /**
index ef912ee07bdd934dc29626be16f1cc1bcacf2592..401ccf5446d0792013a4a74dfa11221fa9cf3998 100644 (file)
@@ -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
index 3476aa7ca404b7a5cb762216efac53b0436723f4..74b0b90a0870e79f94db6d0fb5c499b3b2e16ce9 100644 (file)
@@ -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 === '') {