label undefined variable issues with TODOs
authorTorben Brodt <t.brodt@gmail.com>
Sun, 29 Jan 2012 13:59:39 +0000 (14:59 +0100)
committerTorben Brodt <t.brodt@gmail.com>
Mon, 30 Jan 2012 20:16:26 +0000 (21:16 +0100)
14 files changed:
wcfsetup/install.php
wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php
wcfsetup/install/files/lib/data/package/installation/queue/PackageInstallationQueueAction.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
wcfsetup/install/files/lib/system/image/adapter/ImagickImageAdapter.class.php
wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php
wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php
wcfsetup/install/files/lib/system/option/SelectOptionType.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php

index 94a16960d0703e31e39f252877e313cc51f5be0a..9d63d0a035bb6501e8b28386a3edb8a5fcda8ed8 100644 (file)
@@ -370,7 +370,7 @@ class Tar {
                }
                
                if (!isset($this->contentList[$fileIndex])) {
-                       throw new SystemException("Tar: could find file '$index' in archive");
+                       throw new SystemException("Tar: could find file '$index' in archive"); //TODO: undefined variable
                }
                return $this->contentList[$fileIndex];
        }
index 0ad28dd7fefd57c4562ca648ffe1c11b5f6a3418..151828fee070b77a8c07ac98f70bae059dbe3618 100644 (file)
@@ -255,7 +255,7 @@ class UsersMassProcessingForm extends UserOptionListForm {
                                WCF::getSession()->checkPermissions(array('admin.user.canEditUser'));
                                
                                $userIDArray = $this->fetchUsers(function($userID, array $userData) {
-                                       $user = new UserEditor(new User(null, $row));
+                                       $user = new UserEditor(new User(null, $row)); //TODO: undefined variable
                                        $user->addToGroups($this->assignToGroupIDArray, false, false);
                                });
                                
index 75293ad9b0627e6bb296dc9a3e7e7140d8dc1c3b..eef6cb8a88b2494fc923967d516f65cb006af21a 100644 (file)
@@ -546,10 +546,10 @@ class LanguageEditor extends DatabaseObjectEditor {
                                // search and replace
                                $matches = 0;
                                if ($useRegex) {
-                                       $newValue = preg_replace('~'.$search.'~s'.(!$caseSensitive ? 'i' : ''), $replace, ($row['languageCustomItemValue'] ? $row['languageCustomItemValue'] : $row['languageItemValue']), -1, $matches);
+                                       $newValue = preg_replace('~'.$search.'~s'.(!$caseSensitive ? 'i' : ''), $replace, ($row['languageCustomItemValue'] ? $row['languageCustomItemValue'] : $row['languageItemValue']), -1, $matches); //TODO: undefined variable
                                }
                                else {
-                                       if ($caseSensitive) $newValue = StringUtil::replace($search, $replace, ($row['languageCustomItemValue'] ? $row['languageCustomItemValue'] : $row['languageItemValue']), $matches);
+                                       if ($caseSensitive) $newValue = StringUtil::replace($search, $replace, ($row['languageCustomItemValue'] ? $row['languageCustomItemValue'] : $row['languageItemValue']), $matches); //TODO: undefined variable
                                        else $newValue = StringUtil::replaceIgnoreCase($search, $replace, ($row['languageCustomItemValue'] ? $row['languageCustomItemValue'] : $row['languageItemValue']), $matches);
                                }
                                
index 2bc80de6d8367ca712d271ca9a3297b83018f326..c4ca751b8e0ae13bdcf0fffa723c465f04bea287 100644 (file)
@@ -26,7 +26,7 @@ class PackageInstallationQueueAction extends AbstractDatabaseObjectAction {
        public function validatePrepareQueue() {
                if (isset($this->parameters['packageID'])) $this->packageID = intval($this->parameters['packageID']);
                
-               $this->package = new Package($packageID);
+               $this->package = new Package($packageID); //TODO: undefined variable
                if (!$this->package->packageID) {
                        throw new ValidateActionException('Invalid package id');
                }
index 153a0a69f2a6d290c9805728957c8c228518c110..c95353e0729fdf3126c43e85100d1044a6f83fe5 100644 (file)
@@ -269,7 +269,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
                                $statement->execute(array($templateGroupName));
                                $row = $statement->fetchArray();
                                if (!$row['count']) break;
-                               $templateGroupName = $originalTemplatePackName . '_' . $i;
+                               $templateGroupName = $originalTemplatePackName . '_' . $i; //TODO: undefined variable
                                $i++;
                        }
                        while (true);
index d847b866a91c3513b90324ff4a637a366ff8dbb4..e298344b3121ac284e7053f52dafc9ae0cf24fde 100644 (file)
@@ -436,7 +436,7 @@ class WCF {
                }
                else {
                        unset(self::$autoloadDirectories[$abbreviation]);
-                       throw new exception\SystemException('Unable to run '.$row->package.', '.$className.' missing.');
+                       throw new exception\SystemException('Unable to run '.$row->package.', '.$className.' missing.'); //TODO: undefined variable
                }
                
                // load application settings if not within ACP
index e1950f1bdc7bd92b8effe52cd530937accdb2ad6..1855e3abbdef6b7e0e8e5d92803646ff4928c87a 100644 (file)
@@ -51,7 +51,7 @@ class MySQLDatabaseEditor extends DatabaseEditor {
                $statement = $this->dbObj->prepareStatement($sql);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       $indices[] = $index['Key_name'];
+                       $indices[] = $index['Key_name']; //TODO: undefined variable
                }
                
                return $indices;
index 9db0a8dc311cc15f1c53518b41d7fb0f053c4b2a..ec08ee8254a661b97eab37875bbab9a4ca30b449 100644 (file)
@@ -52,7 +52,7 @@ class ImagickImageAdapter implements IImageAdapter {
                        throw new SystemException("Object must be an instance of Imagick");
                }
                
-               $this->imagick = $imagick;
+               $this->imagick = $imagick; //TODO: undefined variable
                $this->height = $this->imagick->getImageHeight();
                $this->width = $this->imagick->getImageWidth();
        }
index fbeadcd12034e739472e5dd07508d514aae89464..4bc00b0de6c7675089addde0fe0db57bfd22cfbf 100644 (file)
@@ -148,7 +148,7 @@ class LanguageServerProcessor extends SingletonFactory {
                        // find location
                        if (preg_match('/location:([^\n]*)/i', $header, $match)) {
                                $location = trim($match[1]);
-                               if ($location != $url) {
+                               if ($location != $url) { //TODO: undefined variable
                                        $this->importLanguageFile($location, $packageList);
                                        return;
                                }
index 675438f03f2f0f59df1c64f4c96869a18e30c678..bcb0f10cc8eca6ac041097d9e2c3fa5f7cb5614a 100644 (file)
@@ -69,7 +69,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableUse
         * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()
         */
        public function getSearchFormElement(Option $option, $value) {
-               return $this->getFormElement($optionData, $value);
+               return $this->getFormElement($optionData, $value); //TODO: undefined variable
        }
        
        /**
index 14e1f74cbceb59d55a797bd65c6f6e4d0b9c8770..d773b61cac9021b4a0c6712793757817bebdf3b0 100644 (file)
@@ -35,7 +35,7 @@ class SelectOptionType extends RadioButtonOptionType {
         * @see wcf\system\option\ISearchableUserOption::getSearchFormElement()
         */
        public function getSearchFormElement(Option $option, $value) {
-               return $this->getFormElement($optionData, $value);
+               return $this->getFormElement($optionData, $value); //TODO: undefined variable
        }
        
        /**
index ff694f913b4d1b9c35236550bf08a5bd0fc802ae..ba4a40171ad5c7a0be96dc4c68ff5ebcb5223a3d 100644 (file)
@@ -409,7 +409,7 @@ class PackageInstallationSQLParser extends SQLParser {
         */
        protected function executeDropIndexStatement($tableName, $indexName) {
                if ($this->test) {
-                       if ($ownerPackageID = $this->getIndexOwnerID($tableName, $columnName)) {
+                       if ($ownerPackageID = $this->getIndexOwnerID($tableName, $columnName)) { //TODO: undefined variable
                                if ($ownerPackageID != $this->package->packageID) {
                                        throw new SystemException("Can not drop index '.$indexName.'. A package can only drop own indices.");
                                }
index 7634aad80d62a839093d5aa1dac47ebdceafdd51..dc1c9b4882f3c9745efd157048d94135d1326cb0 100644 (file)
@@ -178,7 +178,7 @@ class PackageInstallationScheduler {
                        $statement = WCF::getDB()->prepareStatement($sql);
                        $statement->execute($conditions->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               if (!isset($installedPackages[$row2['package']])) $installedPackages[$row2['package']] = array();
+                               if (!isset($installedPackages[$row2['package']])) $installedPackages[$row2['package']] = array(); //TODO: undefined variable
                                $installedPackages[$row2['package']][$row2['packageID']] = (isset($this->virtualPackageVersions[$row2['packageID']]) ? $this->virtualPackageVersions[$row2['packageID']] : $row2['packageVersion']);
                        }
                        
index 232589a0ad98e32421bc43316a2e45cebcce7ec2..b94a99a7084c7cede553dd5abc7086109739f927 100644 (file)
@@ -69,7 +69,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
                foreach ($items as $item) {
                        $statement->execute(array(
                                $item['attributes']['name'],
-                               $this->getDefinitionID($data['elements']['definitionname']),
+                               $this->getDefinitionID($data['elements']['definitionname']), //TODO: undefined variable
                                $this->installation->getPackageID()
                        ));
                }