From: Marcel Werk Date: Mon, 8 Aug 2011 12:46:25 +0000 (+0200) Subject: Error codes removed X-Git-Tag: 2.0.0_Beta_1~1903 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fe0b42b3a548b78848061c83fcdd53a9717a9aa;p=GitHub%2FWoltLab%2FWCF.git Error codes removed --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 9bce470740..919f4cfe4a 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -257,7 +257,7 @@ class BasicFileUtil { array_pop($tmpDir); $dir = implode('/', $tmpDir); - throw new SystemException('There is no access to the system temporary folder due to an unknown reason and no user specific temporary folder exists in '.INSTALL_SCRIPT_DIR.'! This is a misconfiguration of your webserver software! Please create a folder called '.$dir.' using your favorite ftp program, make it writable and then retry this installation.', 10000); + throw new SystemException('There is no access to the system temporary folder due to an unknown reason and no user specific temporary folder exists in '.INSTALL_SCRIPT_DIR.'! This is a misconfiguration of your webserver software! Please create a folder called '.$dir.' using your favorite ftp program, make it writable and then retry this installation.'); } return $dir; @@ -293,7 +293,7 @@ class Tar { public function __construct($archiveName) { $match = array(); if (!is_file($archiveName)) { - throw new SystemException("unable to find tar archive '".$archiveName."'", 11002); + throw new SystemException("unable to find tar archive '".$archiveName."'"); } $this->archiveName = $archiveName; @@ -366,7 +366,7 @@ class Tar { } if (!isset($this->contentList[$fileIndex])) { - throw new SystemException("Tar: could find file '$index' in archive", 11013); + throw new SystemException("Tar: could find file '$index' in archive"); } return $this->contentList[$fileIndex]; } @@ -474,7 +474,7 @@ class Tar { // check filesize if (filesize($destination) != $header['size']) { - throw new SystemException("Could not untar file '".$header['filename']."' to '".$destination."'. Maybe disk quota exceeded in folder '".dirname($destination)."'.", 11015); + throw new SystemException("Could not untar file '".$header['filename']."' to '".$destination."'. Maybe disk quota exceeded in folder '".dirname($destination)."'."); } return true; @@ -595,7 +595,7 @@ class File { $this->filename = $filename; $this->resource = fopen($filename, $mode); if ($this->resource === false) { - throw new SystemException('Can not open file ' . $filename, 11012); + throw new SystemException('Can not open file ' . $filename); } } @@ -616,7 +616,7 @@ class File { return call_user_func_array($function, $arguments); } else { - throw new SystemException('Can not call file method ' . $function, 11003); + throw new SystemException('Can not call file method ' . $function); } } } @@ -636,11 +636,11 @@ class ZipFile extends File { public function __construct($filename, $mode = 'wb') { $this->filename = $filename; if (!function_exists('gzopen')) { - throw new SystemException('Can not find functions of the zlib extension', 11004); + throw new SystemException('Can not find functions of the zlib extension'); } $this->resource = @gzopen($filename, $mode); if ($this->resource === false) { - throw new SystemException('Can not open file ' . $filename, 11012); + throw new SystemException('Can not open file ' . $filename); } } @@ -660,7 +660,7 @@ class ZipFile extends File { return call_user_func_array($function, $arguments); } else { - throw new SystemException('Can not call method ' . $function, 11003); + throw new SystemException('Can not call method ' . $function); } } @@ -720,7 +720,7 @@ if (!file_exists(TMP_DIR . 'install/files/lib/system/WCFSetup.class.php')) { $tar = new Tar(SETUP_FILE); $contentList = $tar->getContentList(); if (!count($contentList)) { - throw new SystemException("Can not unpack 'WCFSetup.tar.gz'. File is probably broken.", 11016); + throw new SystemException("Can not unpack 'WCFSetup.tar.gz'. File is probably broken."); } foreach ($contentList as $file) { @@ -748,7 +748,7 @@ if (!file_exists(TMP_DIR . 'install/files/lib/system/WCFSetup.class.php')) { } if (!class_exists('wcf\system\WCFSetup')) { - throw new SystemException("Can not find class 'WCFSetup'", 11006); + throw new SystemException("Can not find class 'WCFSetup'"); } // start setup diff --git a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php index 324f18c495..c67fb0c667 100755 --- a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php @@ -115,7 +115,7 @@ abstract class AbstractOptionListForm extends AbstractForm { // validate class if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\IOptionType')) { throw new SystemException("'".$className."' should implement wcf\system\option\IOptionType"); diff --git a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php index fbb6c10cef..5094c19161 100755 --- a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php @@ -191,10 +191,10 @@ class UserGroupAddForm extends AbstractOptionListForm { // create instance if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\IGroupOptionType')) { - throw new SystemException("'".$className."' should implement wcf\system\option\group\IGroupOptionType", 11001); + throw new SystemException("'".$className."' should implement wcf\system\option\group\IGroupOptionType"); } $this->typeObjects[$type] = new $className(); } diff --git a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php index b79e06bd8c..f275f474e8 100755 --- a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php @@ -303,13 +303,13 @@ class UserListPage extends SortablePage { // include class file $classPath = WCF_DIR.'lib/data/user/option/'.$className.'.class.php'; if (!file_exists($classPath)) { - throw new SystemException("unable to find class file '".$classPath."'", 11000); + throw new SystemException("unable to find class file '".$classPath."'"); } require_once($classPath); // create instance if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } $this->outputObjects[$className] = new $className(); } diff --git a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php index ce7c808c1d..f029106405 100644 --- a/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php +++ b/wcfsetup/install/files/lib/data/language/LanguageEditor.class.php @@ -325,7 +325,7 @@ class LanguageEditor extends DatabaseObjectEditor { } } - throw new SystemException("missing attribute 'languagecode' in language file", 13023); + throw new SystemException("missing attribute 'languagecode' in language file"); } /** diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index dbed8c4365..825d0a6ba6 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -116,7 +116,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject // search style.xml $i = $tar->getIndexByFilename(self::INFO_FILE); if ($i === false) { - throw new SystemException("unable to find required file '".self::INFO_FILE."' in style archive", 100001); + throw new SystemException("unable to find required file '".self::INFO_FILE."' in style archive"1); } // open style.xml @@ -161,16 +161,16 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject } if (empty($data['name'])) { - throw new SystemException("required tag 'stylename' is missing in '".self::INFO_FILE."'", 100002); + throw new SystemException("required tag 'stylename' is missing in '".self::INFO_FILE."'"2); } if (empty($data['variables'])) { - throw new SystemException("required tag 'variables' is missing in '".self::INFO_FILE."'", 100002); + throw new SystemException("required tag 'variables' is missing in '".self::INFO_FILE."'"2); } // search variables.xml $i = $tar->getIndexByFilename($data['variables']); if ($i === false) { - throw new SystemException("unable to find required file '".$data['variables']."' in style archive", 100001); + throw new SystemException("unable to find required file '".$data['variables']."' in style archive"1); } // open variables.xml diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index abae90261a..f5d64616ea 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -542,7 +542,7 @@ class WCF { if (class_exists($objectName)) { if (!(util\ClassUtil::isInstanceOf($objectName, 'wcf\system\SingletonFactory'))) { - throw new exception\SystemException("class '".$objectName."' does not implement the interface 'SingletonFactory'", 11010); + throw new exception\SystemException("class '".$objectName."' does not implement the interface 'SingletonFactory'"); } self::$coreObject[$className] = call_user_func(array($objectName, 'getInstance')); diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 492d70592c..1778490c66 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -778,7 +778,7 @@ class WCFSetup extends WCF { // check the file if (!file_exists($filename)) { - throw new SystemException("unable to find language file '".$filename."'", 11002); + throw new SystemException("unable to find language file '".$filename."'"); } // open the file @@ -994,7 +994,7 @@ class WCFSetup extends WCF { $row = $statement->fetchArray(); if (!$row['count']) { if (empty($wcfPackageFile)) { - throw new SystemException('the essential package com.woltlab.wcf is missing.', 11007); + throw new SystemException('the essential package com.woltlab.wcf is missing.'); } // register essential wcf package diff --git a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php index b3505de410..4cba243a56 100644 --- a/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php +++ b/wcfsetup/install/files/lib/system/cache/CacheHandler.class.php @@ -71,7 +71,7 @@ class CacheHandler extends SingletonFactory { */ public function clearResource($cache) { if (!isset($this->cacheResources[$cache])) { - throw new SystemException("cache resource '".$cache."' does not exist", 11005); + throw new SystemException("cache resource '".$cache."' does not exist"); } $this->getCacheSource()->delete($this->cacheResources[$cache]); @@ -96,7 +96,7 @@ class CacheHandler extends SingletonFactory { */ public function get($cache, $variable = '') { if (!isset($this->cacheResources[$cache])) { - throw new SystemException("unknown cache resource '".$cache."'", 11005); + throw new SystemException("unknown cache resource '".$cache."'"); } // try to get value @@ -108,14 +108,14 @@ class CacheHandler extends SingletonFactory { // try to get value again $value = $this->getCacheSource()->get($this->cacheResources[$cache]); if ($value === null) { - throw new SystemException("cache resource '".$cache."' does not exist", 11005); + throw new SystemException("cache resource '".$cache."' does not exist"); } } // return value if (!empty($variable)) { if (!isset($value[$variable])) { - throw new SystemException("variable '".$variable."' does not exist in cache resource '".$cache."'", 11008); + throw new SystemException("variable '".$variable."' does not exist in cache resource '".$cache."'"); } return $value[$variable]; @@ -134,7 +134,7 @@ class CacheHandler extends SingletonFactory { public function rebuild($cacheResource) { // instance cache class if (!class_exists($cacheResource['className'])) { - throw new SystemException("Unable to find class '".$cacheResource['className']."'", 11001); + throw new SystemException("Unable to find class '".$cacheResource['className']."'"); } // update file last modified time to avoid multiple users rebuilding cache at the same time diff --git a/wcfsetup/install/files/lib/system/cache/builder/CacheBuilderUserGroupPermission.class.php b/wcfsetup/install/files/lib/system/cache/builder/CacheBuilderUserGroupPermission.class.php index dcce109345..81e76303f7 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/CacheBuilderUserGroupPermission.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/CacheBuilderUserGroupPermission.class.php @@ -108,7 +108,7 @@ class CacheBuilderUserGroupPermission implements ICacheBuilder { // validate class if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } if (!ClassUtil::isInstanceOf($className, 'wcf\system\option\group\IGroupOptionType')) { throw new SystemException("'".$className."' should implement wcf\system\option\group\IGroupOptionType"); diff --git a/wcfsetup/install/files/lib/system/cleanup/CleanupHandler.class.php b/wcfsetup/install/files/lib/system/cleanup/CleanupHandler.class.php index 9e2df63221..0d920bf39c 100644 --- a/wcfsetup/install/files/lib/system/cleanup/CleanupHandler.class.php +++ b/wcfsetup/install/files/lib/system/cleanup/CleanupHandler.class.php @@ -107,12 +107,12 @@ class CleanupHandler { foreach ($adapters as $adapterData) { // validate class if (!class_exists($adapterData['className'])) { - throw new SystemException("unable to find class '".$adapterData['className']."'", 11001); + throw new SystemException("unable to find class '".$adapterData['className']."'"); } // validate interface if (!(ClassUtil::isInstanceOf($adapterData['className'], 'wcf\system\cleanup\ICleanupAdapter'))) { - throw new SystemException("class '".$adapterData['className']."' does not implement the interface 'wcf\system\cleanup\ICleanupAdapter'", 11010); + throw new SystemException("class '".$adapterData['className']."' does not implement the interface 'wcf\system\cleanup\ICleanupAdapter'"); } $adapter = new $adapterData['className'](); diff --git a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php index 3714104aa5..c8c308efe4 100644 --- a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php @@ -138,12 +138,12 @@ abstract class CronjobScheduler { protected static function executeCronjob(CronjobEditor $cronjobEditor, CronjobLogEditor $logEditor) { $className = $cronjobEditor->className; if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } // verify class signature if (!(ClassUtil::isInstanceOf($className, 'wcf\system\cronjob\ICronjob'))) { - throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\cronjob\ICronjob'", 11010); + throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\cronjob\ICronjob'"); } // execute cronjob diff --git a/wcfsetup/install/files/lib/system/event/EventHandler.class.php b/wcfsetup/install/files/lib/system/event/EventHandler.class.php index 3b954c89fd..4efb9d529a 100644 --- a/wcfsetup/install/files/lib/system/event/EventHandler.class.php +++ b/wcfsetup/install/files/lib/system/event/EventHandler.class.php @@ -100,7 +100,7 @@ class EventHandler extends SingletonFactory { $object = null; // instance action object if (!class_exists($action['listenerClassName'])) { - throw new SystemException("Unable to find class '".$action['listenerClassName']."'", 11001); + throw new SystemException("Unable to find class '".$action['listenerClassName']."'"); } if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) { throw new SystemException("'".$action['listenerClassName']."' should implement interface wcf\system\event\IEventListener"); @@ -165,7 +165,7 @@ class EventHandler extends SingletonFactory { else { // instance action object if (!class_exists($action['listenerClassName'])) { - throw new SystemException("Unable to find class '".$action['listenerClassName']."'", 11001); + throw new SystemException("Unable to find class '".$action['listenerClassName']."'"); } if (!ClassUtil::isInstanceOf($action['listenerClassName'], 'wcf\system\event\IEventListener')) { throw new SystemException("'".$action['listenerClassName']."' should implement interface wcf\system\event\IEventListener"); diff --git a/wcfsetup/install/files/lib/system/exception/SystemException.class.php b/wcfsetup/install/files/lib/system/exception/SystemException.class.php index b8034abfad..8a3efabf9d 100644 --- a/wcfsetup/install/files/lib/system/exception/SystemException.class.php +++ b/wcfsetup/install/files/lib/system/exception/SystemException.class.php @@ -125,8 +125,7 @@ class SystemException extends \Exception implements IPrintableException {

getDescription(); ?>

- getCode()) { ?>

You get more information about the problem in the official WoltLab knowledge base: http://www.woltlab.com/help/?code=getCode()); ?>

- +

Information:

error message: getMessage()); ?>
diff --git a/wcfsetup/install/files/lib/system/io/FTP.class.php b/wcfsetup/install/files/lib/system/io/FTP.class.php index d78c4107ed..be432616ed 100644 --- a/wcfsetup/install/files/lib/system/io/FTP.class.php +++ b/wcfsetup/install/files/lib/system/io/FTP.class.php @@ -29,7 +29,7 @@ class FTP { public function __construct($host = 'localhost', $port = 21, $timeout = 30) { $this->resource = ftp_connect($host, $port, $timeout); if ($this->resource === false) { - throw new SystemException('Can not connect to ' . $host, 11008); + throw new SystemException('Can not connect to ' . $host); } } @@ -42,7 +42,7 @@ class FTP { public function __call($function, $arguments) { array_unshift($arguments, $this->resource); if (!function_exists('ftp_'.$function)) { - throw new SystemException('Can not call method ' . $function, 11003); + throw new SystemException('Can not call method ' . $function); } return call_user_func_array('ftp_' . $function, $arguments); diff --git a/wcfsetup/install/files/lib/system/io/File.class.php b/wcfsetup/install/files/lib/system/io/File.class.php index 988dc38807..008a2b90dc 100644 --- a/wcfsetup/install/files/lib/system/io/File.class.php +++ b/wcfsetup/install/files/lib/system/io/File.class.php @@ -53,7 +53,7 @@ class File { $this->resource = fopen($filename, $mode); } if ($this->resource === false) { - throw new SystemException('Can not open file ' . $filename, 11012); + throw new SystemException('Can not open file ' . $filename); } } @@ -74,7 +74,7 @@ class File { return call_user_func_array($function, $arguments); } else { - throw new SystemException('Can not call file method ' . $function, 11003); + throw new SystemException('Can not call file method ' . $function); } } } diff --git a/wcfsetup/install/files/lib/system/io/GZipFile.class.php b/wcfsetup/install/files/lib/system/io/GZipFile.class.php index 3856c285c1..b4ee7e5a79 100644 --- a/wcfsetup/install/files/lib/system/io/GZipFile.class.php +++ b/wcfsetup/install/files/lib/system/io/GZipFile.class.php @@ -23,7 +23,7 @@ class GZipFile extends File { $this->filename = $filename; $this->resource = gzopen($filename, $mode); if ($this->resource === false) { - throw new SystemException('Can not open file ' . $filename, 11012); + throw new SystemException('Can not open file ' . $filename); } } @@ -43,7 +43,7 @@ class GZipFile extends File { return call_user_func_array($function, $arguments); } else { - throw new SystemException('Can not call method ' . $function, 11003); + throw new SystemException('Can not call method ' . $function); } } diff --git a/wcfsetup/install/files/lib/system/io/RemoteFile.class.php b/wcfsetup/install/files/lib/system/io/RemoteFile.class.php index 56ec39f280..2c141b3b35 100644 --- a/wcfsetup/install/files/lib/system/io/RemoteFile.class.php +++ b/wcfsetup/install/files/lib/system/io/RemoteFile.class.php @@ -56,7 +56,7 @@ class RemoteFile extends File { $this->resource = fsockopen($host, $port, $this->errorNumber, $this->errorDesc, $timeout); } if ($this->resource === false) { - throw new SystemException('Can not connect to ' . $host, 14000); + throw new SystemException('Can not connect to ' . $host); } } diff --git a/wcfsetup/install/files/lib/system/io/Tar.class.php b/wcfsetup/install/files/lib/system/io/Tar.class.php index d1611a7804..522a9eb201 100644 --- a/wcfsetup/install/files/lib/system/io/Tar.class.php +++ b/wcfsetup/install/files/lib/system/io/Tar.class.php @@ -73,7 +73,7 @@ class Tar { public function __construct($archiveName) { $match = array(); if (!is_file($archiveName)) { - throw new SystemException("unable to find tar archive '".$archiveName."'", 11002); + throw new SystemException("unable to find tar archive '".$archiveName."'"); } $this->archiveName = $archiveName; @@ -146,7 +146,7 @@ class Tar { } if (!isset($this->contentList[$fileIndex])) { - throw new SystemException("Tar: could find file '".$fileIndex."' in archive", 11013); + throw new SystemException("Tar: could find file '".$fileIndex."' in archive"); } return $this->contentList[$fileIndex]; } @@ -254,7 +254,7 @@ class Tar { // check filesize if (filesize($destination) != $header['size']) { - throw new SystemException("Could not untar file '".$header['filename']."' to '".$destination."'. Maybe disk quota exceeded in folder '".dirname($destination)."'.", 11015); + throw new SystemException("Could not untar file '".$header['filename']."' to '".$destination."'. Maybe disk quota exceeded in folder '".dirname($destination)."'."); } return true; diff --git a/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php b/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php index 89f1b95dff..d435aff9fd 100644 --- a/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php +++ b/wcfsetup/install/files/lib/system/language/LanguageServerProcessor.class.php @@ -85,7 +85,7 @@ class LanguageServerProcessor extends SingletonFactory { $remoteFile = new RemoteFile(($parsedURL['scheme'] == 'https' ? 'ssl://' : '').$host, $port, 30, $options); // the file to read. if (!isset($remoteFile)) { - throw new SystemException("cannot connect to http host '".$host."'", 14000); + throw new SystemException("cannot connect to http host '".$host."'"); } // build and send the http request diff --git a/wcfsetup/install/files/lib/system/mail/SMTPMailSender.class.php b/wcfsetup/install/files/lib/system/mail/SMTPMailSender.class.php index 0be21ab013..c8a0b84e05 100644 --- a/wcfsetup/install/files/lib/system/mail/SMTPMailSender.class.php +++ b/wcfsetup/install/files/lib/system/mail/SMTPMailSender.class.php @@ -41,7 +41,7 @@ class SMTPMailSender extends MailSender { $this->connection = new RemoteFile(MAIL_SMTP_HOST, MAIL_SMTP_PORT); $this->getSMTPStatus(); if ($this->statusCode != 220) { - throw new SystemException($this->formatError("can not connect to '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."'"), 17000); + throw new SystemException($this->formatError("can not connect to '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."'")); } // send ehlo @@ -58,7 +58,7 @@ class SMTPMailSender extends MailSender { $this->write('HELO '.$_SERVER['HTTP_HOST']); $this->getSMTPStatus(); if ($this->statusCode != 250) { - throw new SystemException($this->formatError("can not connect to '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."'"), 17000); + throw new SystemException($this->formatError("can not connect to '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."'")); } } } @@ -83,20 +83,20 @@ class SMTPMailSender extends MailSender { // checks if auth is supported if ($this->statusCode != 334) { - throw new SystemException($this->formatError("smtp mail server '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."' does not support user authentication"), 17001); + throw new SystemException($this->formatError("smtp mail server '".MAIL_SMTP_HOST.":".MAIL_SMTP_PORT."' does not support user authentication")); } // sending user information to smtp-server $this->write(base64_encode(MAIL_SMTP_USER)); $this->getSMTPStatus(); if ($this->statusCode != 334) { - throw new SystemException($this->formatError("unknown smtp user '".MAIL_SMTP_USER."'"), 17002); + throw new SystemException($this->formatError("unknown smtp user '".MAIL_SMTP_USER."'")); } $this->write(base64_encode(MAIL_SMTP_PASSWORD)); $this->getSMTPStatus(); if ($this->statusCode != 235) { - throw new SystemException($this->formatError("invalid password for smtp user '".MAIL_SMTP_USER."'"), 17003); + throw new SystemException($this->formatError("invalid password for smtp user '".MAIL_SMTP_USER."'")); } } @@ -118,7 +118,7 @@ class SMTPMailSender extends MailSender { $this->write('MAIL FROM:<'.$mail->getFrom().'>'); $this->getSMTPStatus(); if ($this->statusCode != 250) { - throw new SystemException($this->formatError("wrong from format '".$mail->getFrom()."'"), 17004); + throw new SystemException($this->formatError("wrong from format '".$mail->getFrom()."'")); } // recipients @@ -128,7 +128,7 @@ class SMTPMailSender extends MailSender { $this->getSMTPStatus(); if ($this->statusCode != 250 && $this->statusCode != 251) { if ($this->statusCode < 550) { - throw new SystemException($this->formatError("wrong recipient format '".$recipient."'"), 17004); + throw new SystemException($this->formatError("wrong recipient format '".$recipient."'")); } continue; } @@ -143,7 +143,7 @@ class SMTPMailSender extends MailSender { $this->write("DATA"); $this->getSMTPStatus(); if ($this->statusCode != 354 && $this->statusCode != 250) { - throw new SystemException($this->formatError("smtp error"), 17005); + throw new SystemException($this->formatError("smtp error")); } $header = @@ -160,7 +160,7 @@ class SMTPMailSender extends MailSender { $this->getSMTPStatus(); if ($this->statusCode != 250) { - throw new SystemException($this->formatError("message sending failed"), 17005); + throw new SystemException($this->formatError("message sending failed")); } } diff --git a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php index 0a44c7c32c..e74dc84697 100644 --- a/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php +++ b/wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php @@ -56,7 +56,7 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler { foreach ($fileNames as $key => $file) { if (isset($lockedFiles[$file]) && $packageID != $lockedFiles[$file]) { $owningPackage = new Package($lockedFiles[$file]); - throw new SystemException("A non-standalone package can't overwrite template files. Only an update from the package which owns the template can do that. (Package '".$this->packageInstallation->getPackage()->getPackage()."' tries to overwrite template '".$file."', which is owned by package '".$owningPackage->package."')", 13026); + throw new SystemException("A non-standalone package can't overwrite template files. Only an update from the package which owns the template can do that. (Package '".$this->packageInstallation->getPackage()->getPackage()."' tries to overwrite template '".$file."', which is owned by package '".$owningPackage->package."')"); } } } diff --git a/wcfsetup/install/files/lib/system/package/PackageArchive.class.php b/wcfsetup/install/files/lib/system/package/PackageArchive.class.php index 8ed0d7ff0a..e8eaf388aa 100644 --- a/wcfsetup/install/files/lib/system/package/PackageArchive.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageArchive.class.php @@ -136,7 +136,7 @@ class PackageArchive { public function openArchive() { // check whether archive exists and is a TAR archive if (!file_exists($this->archive)) { - throw new SystemException("unable to find package file '".$this->archive."'", 11002); + throw new SystemException("unable to find package file '".$this->archive."'"); } // open archive and read package information @@ -151,7 +151,7 @@ class PackageArchive { // search package.xml in package archive // throw error message if not found if ($this->tar->getIndexByFilename(self::INFO_FILE) === false) { - throw new SystemException("package information file '".(self::INFO_FILE)."' not found in '".$this->archive."'", 13000); + throw new SystemException("package information file '".(self::INFO_FILE)."' not found in '".$this->archive."'"); } // extract package.xml, parse with SimpleXML @@ -172,7 +172,7 @@ class PackageArchive { $packageName = $package->getAttribute('name'); if (!Package::isValidPackageName($packageName)) { // package name is not a valid package identifier - throw new SystemException("'".$packageName."' is not a valid package name.", 13002); + throw new SystemException("'".$packageName."' is not a valid package name."); } $this->packageInfo['name'] = $packageName; @@ -207,7 +207,7 @@ class PackageArchive { case 'plugin': if ($element->nodeValue && !Package::isValidPackageName($element->nodeValue)) { - throw new SystemException("'".$element->nodeValue."' is not a valid package name.", 13002); + throw new SystemException("'".$element->nodeValue."' is not a valid package name."); } $this->packageInfo['plugin'] = $element->nodeValue; @@ -248,7 +248,7 @@ class PackageArchive { $elements = $xpath->query('child::ns:requiredpackages/ns:requiredpackage', $package); foreach ($elements as $element) { if (!Package::isValidPackageName($element->nodeValue)) { - throw new SystemException("'".$element->nodeValue."' is not a valid package name.", 13002); + throw new SystemException("'".$element->nodeValue."' is not a valid package name."); } // read attributes @@ -265,7 +265,7 @@ class PackageArchive { $elements = $xpath->query('child::ns:optionalpackages/ns:optionalpackage', $package); foreach ($elements as $element) { if (!Package::isValidPackageName($element->nodeValue)) { - throw new SystemException("'".$element->nodeValue."' is not a valid package name.", 13002); + throw new SystemException("'".$element->nodeValue."' is not a valid package name."); } // read attributes @@ -282,7 +282,7 @@ class PackageArchive { $elements = $xpath->query('child::ns:excludedpackages/ns:excludedpackage', $package); foreach ($elements as $element) { if (!Package::isValidPackageName($element->nodeValue)) { - throw new SystemException("'".$element->nodeValue."' is not a valid package name.", 13002); + throw new SystemException("'".$element->nodeValue."' is not a valid package name."); } // read attributes @@ -766,7 +766,7 @@ class PackageArchive { // search the requested tar archive in our package archive. // throw error message if not found. if (($fileIndex = $this->tar->getIndexByFilename($filename)) === false) { - throw new SystemException("tar archive '".$filename."' not found in '".$this->archive."'.", 13007); + throw new SystemException("tar archive '".$filename."' not found in '".$this->archive."'."); } // requested tar archive was found diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index d7e7cc0983..bd74c77b8b 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -264,7 +264,7 @@ class PackageInstallationDispatcher { )); $row = $statement->fetchArray(); if (!$row || empty($row['requirement'])) { - throw new SystemException("can not find any available installations of required parent package '".$this->getArchive()->getPackageInfo('plugin')."'", 13012); + throw new SystemException("can not find any available installations of required parent package '".$this->getArchive()->getPackageInfo('plugin')."'"); } // save parent package @@ -311,13 +311,13 @@ class PackageInstallationDispatcher { // valdidate class definition $className = $row['className']; if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } $plugin = new $className($this, $nodeData); if (!($plugin instanceof \wcf\system\package\plugin\IPackageInstallationPlugin)) { - throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\package\plugin\IPackageInstallationPlugin'", 11010); + throw new SystemException("class '".$className."' does not implement the interface 'wcf\system\package\plugin\IPackageInstallationPlugin'"); } // execute PIP diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php index 8a25526ef5..ff694f913b 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php @@ -283,7 +283,7 @@ class PackageInstallationSQLParser extends SQLParser { if (in_array($tableName, $this->existingTables)) { if (isset($this->knownTables[$tableName])) { if ($this->knownTables[$tableName] != $this->package->packageID) { - throw new SystemException("Can not recreate table '.$tableName.'. A package can only overwrite own tables.", 13019); + throw new SystemException("Can not recreate table '.$tableName.'. A package can only overwrite own tables."); } } else { @@ -308,7 +308,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if (isset($this->knownTables[$tableName])) { if ($this->knownTables[$tableName] != $this->package->packageID && !in_array($this->knownTables[$tableName], $this->dependentPackageIDs)) { - throw new SystemException("Can not add column '".$columnName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment.", 13019); + throw new SystemException("Can not add column '".$columnName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment."); } } } @@ -328,7 +328,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if ($ownerPackageID = $this->getColumnOwnerID($tableName, $oldColumnName)) { if ($ownerPackageID != $this->package->packageID) { - throw new SystemException("Can not alter column '.$oldColumnName.'. A package can only change own columns.", 13019); + throw new SystemException("Can not alter column '.$oldColumnName.'. A package can only change own columns."); } } } @@ -351,7 +351,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if (isset($this->knownTables[$tableName])) { if ($this->knownTables[$tableName] != $this->package->packageID && !in_array($this->knownTables[$tableName], $this->dependentPackageIDs)) { - throw new SystemException("Can not add index '".$indexName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment.", 13019); + throw new SystemException("Can not add index '".$indexName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment."); } } } @@ -371,7 +371,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if (isset($this->knownTables[$tableName])) { if ($this->knownTables[$tableName] != $this->package->packageID && !in_array($this->knownTables[$tableName], $this->dependentPackageIDs)) { - throw new SystemException("Can not add foreign key '".$indexName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment.", 13019); + throw new SystemException("Can not add foreign key '".$indexName."' to table '.$tableName.'. An installion can only 'ADD' things to tables from the same package environment."); } } } @@ -391,7 +391,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if ($ownerPackageID = $this->getColumnOwnerID($tableName, $columnName)) { if ($ownerPackageID != $this->package->packageID) { - throw new SystemException("Can not drop column '.$columnName.'. A package can only drop own columns.", 13019); + throw new SystemException("Can not drop column '.$columnName.'. A package can only drop own columns."); } } } @@ -411,7 +411,7 @@ class PackageInstallationSQLParser extends SQLParser { if ($this->test) { if ($ownerPackageID = $this->getIndexOwnerID($tableName, $columnName)) { if ($ownerPackageID != $this->package->packageID) { - throw new SystemException("Can not drop index '.$indexName.'. A package can only drop own indices.", 13019); + throw new SystemException("Can not drop index '.$indexName.'. A package can only drop own indices."); } } } @@ -432,7 +432,7 @@ class PackageInstallationSQLParser extends SQLParser { if (in_array($tableName, $this->existingTables)) { if (isset($this->knownTables[$tableName])) { if ($this->knownTables[$tableName] != $this->package->packageID) { - throw new SystemException("Can not drop table '.$tableName.'. A package can only drop own tables.", 13019); + throw new SystemException("Can not drop table '.$tableName.'. A package can only drop own tables."); } } else { diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php index e1cd729f08..7634aad80d 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationScheduler.class.php @@ -241,7 +241,7 @@ class PackageInstallationScheduler { } if ($response['httpStatusCode'] != 200) { - throw new SystemException(WCF::getLanguage()->get('wcf.acp.packageUpdate.error.downloadFailed', array('$package' => $package)) . ' ('.$response['httpStatusLine'].')', 18009); + throw new SystemException(WCF::getLanguage()->get('wcf.acp.packageUpdate.error.downloadFailed', array('$package' => $package)) . ' ('.$response['httpStatusLine'].')'); } // write content to tmp file diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index 4a065bdfe5..b76916fa59 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -68,7 +68,7 @@ abstract class PackageUpdateDispatcher { } if ($response['httpStatusCode'] != 200) { - throw new SystemException(WCF::getLanguage()->get('wcf.acp.packageUpdate.error.listNotFound') . ' ('.$response['httpStatusLine'].')', 18009); + throw new SystemException(WCF::getLanguage()->get('wcf.acp.packageUpdate.error.listNotFound') . ' ('.$response['httpStatusLine'].')'); } // parse given package update xml @@ -220,7 +220,7 @@ abstract class PackageUpdateDispatcher { $packages = $xpath->query('/ns:section[@name=\'packages\']/ns:package'); foreach ($packages as $package) { if (!Package::isValidPackageName($package->getAttribute('name'))) { - throw new SystemException("'".$package->getAttribute('name')."' is not a valid package name.", 18004); + throw new SystemException("'".$package->getAttribute('name')."' is not a valid package name."); } $allNewPackages[$package->getAttribute('name')] = self::parsePackageUpdateXMLBlock($xpath, $package); @@ -714,7 +714,7 @@ abstract class PackageUpdateDispatcher { } if (!count($versions)) { - throw new SystemException("Can not find package '".$package."' in version '".$version."'", 18101); + throw new SystemException("Can not find package '".$package."' in version '".$version."'"); } return $versions; diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php index 978e144b12..967afab287 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php @@ -66,7 +66,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI $row = $statement->fetchArray(); if (!$row['count']) { - throw new SystemException("Unable to find parent 'menu item' with name '".$data['parentMenuItem']."' for 'menu item' with name '".$data['menuItem']."'.", 13011); + throw new SystemException("Unable to find parent 'menu item' with name '".$data['parentMenuItem']."' for 'menu item' with name '".$data['menuItem']."'."); } } diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php index c72581ec3d..40545811f1 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php @@ -132,7 +132,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag $row = $statement->fetchArray(); if (!$row['count']) { - throw new SystemException("Unable to find parent 'option category' with name '".$data['parentCategoryName']."' for category with name '".$data['categoryName']."'.", 13011); + throw new SystemException("Unable to find parent 'option category' with name '".$data['parentCategoryName']."' for category with name '".$data['categoryName']."'."); } } @@ -160,7 +160,7 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag if (!preg_match("/^[\w-\.]+$/", $data['name'])) { $matches = array(); preg_match_all("/(\W)/", $data['name'], $matches); - throw new SystemException("The user option '".$data['name']."' has at least one non-alphanumeric character (underscore is permitted): (".implode("), ( ", $matches[1]).").", 13024); + throw new SystemException("The user option '".$data['name']."' has at least one non-alphanumeric character (underscore is permitted): (".implode("), ( ", $matches[1]).")."); } $this->saveOption($data, $data['categoryname']); diff --git a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php index 0b8898c006..6b1a445ad2 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php @@ -230,7 +230,7 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta // Search the xml-file in the package archive. // Abort installation in case no file was found. if (($fileIndex = $this->installation->getArchive()->getTar()->getIndexByFilename($filename)) === false) { - throw new SystemException("xml file '".$filename."' not found in '".$this->installation->getArchive()->getArchive()."'", 13008); + throw new SystemException("xml file '".$filename."' not found in '".$this->installation->getArchive()->getArchive()."'"); } // Extract acpmenu file and parse with SimpleXML diff --git a/wcfsetup/install/files/lib/system/package/plugin/GroupOptionsPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/GroupOptionsPackageInstallationPlugin.class.php index eac4886e92..1b5556d0fd 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/GroupOptionsPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/GroupOptionsPackageInstallationPlugin.class.php @@ -64,7 +64,7 @@ class GroupOptionsPackageInstallationPlugin extends AbstractOptionPackageInstall // check if optionType exists $className = 'wcf\system\option\group\GroupOptionType'.ucfirst($optionType); if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } // collect additional tags and their values diff --git a/wcfsetup/install/files/lib/system/package/plugin/LanguagesPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/LanguagesPackageInstallationPlugin.class.php index bf72c33aab..c7fa6b2d86 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/LanguagesPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/LanguagesPackageInstallationPlugin.class.php @@ -235,7 +235,7 @@ class LanguagesPackageInstallationPlugin extends AbstractXMLPackageInstallationP // search language files in package archive // throw error message if not found if (($fileIndex = $this->installation->getArchive()->getTar()->getIndexByFilename($filename)) === false) { - throw new SystemException("language file '".$filename."' not found.", 13025); + throw new SystemException("language file '".$filename."' not found."); } // extract language file and parse with DOMDocument diff --git a/wcfsetup/install/files/lib/system/package/plugin/OptionsPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/OptionsPackageInstallationPlugin.class.php index b7d59b6b15..1bb184d6f0 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/OptionsPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/OptionsPackageInstallationPlugin.class.php @@ -47,7 +47,7 @@ class OptionsPackageInstallationPlugin extends AbstractOptionPackageInstallation // check if optionType exists $className = 'wcf\system\option\OptionType'.ucfirst($optionType); if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } // collect additional tags and their values diff --git a/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php index 95f34223a4..c64cb77471 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php @@ -140,7 +140,7 @@ class SQLPackageInstallationPlugin extends AbstractPackageInstallationPlugin { protected function getSQL($filename) { // search sql files in package archive if (($fileindex = $this->installation->getArchive()->getTar()->getIndexByFilename($filename)) === false) { - throw new SystemException("SQL file '".$filename."' not found.", 13016); + throw new SystemException("SQL file '".$filename."' not found."); } // extract sql file to string diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserOptionsPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserOptionsPackageInstallationPlugin.class.php index 8ef97e1ff1..dc4cada025 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserOptionsPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserOptionsPackageInstallationPlugin.class.php @@ -93,7 +93,7 @@ class UserOptionsPackageInstallationPlugin extends AbstractOptionPackageInstalla // check if optionType exists $className = 'wcf\system\option\OptionType'.ucfirst($optionType); if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11001); + throw new SystemException("unable to find class '".$className."'"); } // collect additional tags and their values diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 8d70f646ee..1f878132a9 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -62,7 +62,7 @@ class RequestHandler extends SingletonFactory { try { // validate class name if (!preg_match('~^[a-z0-9_]+$~i', $pageName)) { - throw new SystemException("Illegal class name '".$pageName."'", 11009); + throw new SystemException("Illegal class name '".$pageName."'"); } // find class @@ -71,7 +71,7 @@ class RequestHandler extends SingletonFactory { $className = 'wcf\\'.($isACP ? 'acp\\' : '').$pageType.'\\'.ucfirst($pageName).ucfirst($pageType); } if (!class_exists($className)) { - throw new SystemException("unable to find class '".$className."'", 11000); + throw new SystemException("unable to find class '".$className."'"); } // check whether the class is abstract diff --git a/wcfsetup/install/files/lib/system/setup/Installer.class.php b/wcfsetup/install/files/lib/system/setup/Installer.class.php index 4303dc9a41..208eacc5d6 100644 --- a/wcfsetup/install/files/lib/system/setup/Installer.class.php +++ b/wcfsetup/install/files/lib/system/setup/Installer.class.php @@ -40,7 +40,7 @@ class Installer { protected function createTargetDir() { if (!@is_dir($this->targetDir)) { if (!FileUtil::makePath($this->targetDir, (FileUtil::isApacheModule() ? 0777 : 0755))) { - throw new SystemException("Could not create dir '".$this->targetDir."'", 11011); + throw new SystemException("Could not create dir '".$this->targetDir."'"); } } if (FileUtil::isApacheModule() || !is_writeable($this->targetDir)) { @@ -57,7 +57,7 @@ class Installer { if (!@is_dir($this->targetDir.$dir)) { $oldumask = umask(0); if (!@mkdir($this->targetDir.$dir, 0755, true)) { - throw new SystemException("Could not create dir '".$this->targetDir.$dir."'", 11011); + throw new SystemException("Could not create dir '".$this->targetDir.$dir."'"); } umask($oldumask); } @@ -143,7 +143,7 @@ class Installer { } } if (count($errors) > 0) { - throw new SystemException('error(s) during the installation of the files.', 11111, $errors); + throw new SystemException('error(s) during the installation of the files.', $errors); } $this->logFiles($files); @@ -182,7 +182,7 @@ class Installer { protected function makeWriteable($target) { if (!preg_match('/^WIN/i', PHP_OS)) { if (!@chmod($target, 0777)) { - //throw new SystemException("Could not chmod file '".$target."'", 11005); + //throw new SystemException("Could not chmod file '".$target."'"); } } } diff --git a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php index e4a9c7e213..6919e3cf2a 100644 --- a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php @@ -91,7 +91,7 @@ class StyleHandler extends SingletonFactory { } if (!isset($this->cache['styles'][$styleID])) { - throw new SystemException('no default style defined', 100000); + throw new SystemException('no default style defined'); } } diff --git a/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php index ecc0987ffa..f34d2582c4 100644 --- a/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/SetupTemplateEngine.class.php @@ -41,7 +41,7 @@ class SetupTemplateEngine extends TemplateEngine { return PACKAGE_ID; } - throw new SystemException("Unable to find template '$templateName'", 12005); + throw new SystemException("Unable to find template '$templateName'"); } /** diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 1c22bfaf59..bf5ed4c674 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -352,7 +352,7 @@ class TemplateEngine extends SingletonFactory { } - throw new SystemException("Unable to find template '$templateName'", 12005); + throw new SystemException("Unable to find template '$templateName'"); } /** @@ -480,7 +480,7 @@ class TemplateEngine extends SingletonFactory { public function getSourceContent($sourceFilename) { $sourceContent = ''; if (!file_exists($sourceFilename) || (($sourceContent = @file_get_contents($sourceFilename)) === false)) { - throw new SystemException("Could not open template '$sourceFilename' for reading", 12005); + throw new SystemException("Could not open template '$sourceFilename' for reading"); } else { return $sourceContent; @@ -659,7 +659,7 @@ class TemplateEngine extends SingletonFactory { */ public function setCompileDir($compileDir) { if (!is_dir($compileDir)) { - throw new SystemException("'".$compileDir."' is not a valid dir", 11014); + throw new SystemException("'".$compileDir."' is not a valid dir"); } $this->compileDir = $compileDir; diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index d5cb921b05..fa6b4949b8 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -112,7 +112,7 @@ class TemplateScriptingCompiler { // throw error messages for unclosed tags if (count($this->tagStack) > 0) { foreach ($this->tagStack as $tagStack) { - throw new SystemException($this->formatSyntaxError('unclosed tag {'.$tagStack[0].'}', $this->currentIdentifier, $tagStack[1]), 12002); + throw new SystemException($this->formatSyntaxError('unclosed tag {'.$tagStack[0].'}', $this->currentIdentifier, $tagStack[1])); } return false; } @@ -282,7 +282,7 @@ class TemplateScriptingCompiler { } } - throw new SystemException($this->formatSyntaxError('unknown tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo), 12003); + throw new SystemException($this->formatSyntaxError('unknown tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo)); } /** @@ -381,7 +381,7 @@ class TemplateScriptingCompiler { $this->compilerPlugins[$className] = new $className(); if (!($this->compilerPlugins[$className] instanceof ITemplatePluginCompiler)) { - throw new SystemException($this->formatSyntaxError("Compiler plugin '".$tagCommand."' does not implement the interface 'ITemplatePluginCompiler'", $this->currentIdentifier), 11010); + throw new SystemException($this->formatSyntaxError("Compiler plugin '".$tagCommand."' does not implement the interface 'ITemplatePluginCompiler'", $this->currentIdentifier)); } } @@ -447,10 +447,10 @@ class TemplateScriptingCompiler { // check arguments if (!isset($args['loop'])) { - throw new SystemException($this->formatSyntaxError("missing 'loop' attribute in section tag", $this->currentIdentifier, $this->currentLineNo), 12001); + throw new SystemException($this->formatSyntaxError("missing 'loop' attribute in section tag", $this->currentIdentifier, $this->currentLineNo)); } if (!isset($args['name'])) { - throw new SystemException($this->formatSyntaxError("missing 'name' attribute in section tag", $this->currentIdentifier, $this->currentLineNo), 12001); + throw new SystemException($this->formatSyntaxError("missing 'name' attribute in section tag", $this->currentIdentifier, $this->currentLineNo)); } if (!isset($args['show'])) { $args['show'] = true; @@ -521,10 +521,10 @@ class TemplateScriptingCompiler { // check arguments if (!isset($args['from'])) { - throw new SystemException($this->formatSyntaxError("missing 'from' attribute in foreach tag", $this->currentIdentifier, $this->currentLineNo), 12001); + throw new SystemException($this->formatSyntaxError("missing 'from' attribute in foreach tag", $this->currentIdentifier, $this->currentLineNo)); } if (!isset($args['item'])) { - throw new SystemException($this->formatSyntaxError("missing 'item' attribute in foreach tag", $this->currentIdentifier, $this->currentLineNo), 12001); + throw new SystemException($this->formatSyntaxError("missing 'item' attribute in foreach tag", $this->currentIdentifier, $this->currentLineNo)); } $foreachProp = ''; @@ -569,7 +569,7 @@ class TemplateScriptingCompiler { // check arguments if (!isset($args['file'])) { - throw new SystemException($this->formatSyntaxError("missing 'file' attribute in include tag", $this->currentIdentifier, $this->currentLineNo), 12001); + throw new SystemException($this->formatSyntaxError("missing 'file' attribute in include tag", $this->currentIdentifier, $this->currentLineNo)); } // get filename @@ -642,7 +642,7 @@ class TemplateScriptingCompiler { // validate tag arguments if (!preg_match('~^(?:\s+\w+\s*=\s*[^=]*(?=\s|$))*$~s', $tagArgs)) { - throw new SystemException($this->formatSyntaxError('syntax error in tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo), 12000); + throw new SystemException($this->formatSyntaxError('syntax error in tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo)); } // parse tag arguments @@ -734,7 +734,7 @@ class TemplateScriptingCompiler { $operator = (isset($operators[$i]) ? $operators[$i] : null); if ($operator !== '!' && $values[$i] == '') { - throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo), 12000); + throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo)); } $leftParenthesis = StringUtil::countSubstring($values[$i], '('); @@ -745,7 +745,7 @@ class TemplateScriptingCompiler { $result .= str_repeat('(', $leftParenthesis - $rightParenthesis); if (str_replace('(', '', StringUtil::substring($values[$i], 0, $leftParenthesis - $rightParenthesis)) != '') { - throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo), 12000); + throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo)); } } else if ($leftParenthesis < $rightParenthesis) { @@ -753,7 +753,7 @@ class TemplateScriptingCompiler { $value = StringUtil::substring($values[$i], 0, $leftParenthesis - $rightParenthesis); if ($leftParentheses < 0 || str_replace(')', '', StringUtil::substring($values[$i], $leftParenthesis - $rightParenthesis)) != '') { - throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo), 12000); + throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo)); } } else $value = $values[$i]; @@ -762,7 +762,7 @@ class TemplateScriptingCompiler { $result .= $this->compileVariableTag($value, false); } catch (SystemException $e) { - throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo), 12000); + throw new SystemException($this->formatSyntaxError('syntax error in tag {'.($elseif ? 'elseif' : 'if').'}', $this->currentIdentifier, $this->currentLineNo)); } if ($leftParenthesis < $rightParenthesis) { @@ -925,7 +925,7 @@ class TemplateScriptingCompiler { case 'object access': if (/*strpos($values[$i], '$') !== false || */strpos($values[$i], '@@') !== false) { - throw new SystemException($this->formatSyntaxError("unexpected '->".$values[$i]."' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12003); + throw new SystemException($this->formatSyntaxError("unexpected '->".$values[$i]."' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); } if (strpos($values[$i], '$') !== false) $result .= '{'.$this->compileSimpleVariable($values[$i], $variableType).'}'; else $result .= $values[$i]; @@ -973,7 +973,7 @@ class TemplateScriptingCompiler { case 'modifier': if (strpos($values[$i], '$') !== false || strpos($values[$i], '@@') !== false) { - throw new SystemException($this->formatSyntaxError("unknown modifier '".$values[$i]."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unknown modifier '".$values[$i]."'", $this->currentIdentifier, $this->currentLineNo)); } // handle modifier name @@ -984,7 +984,7 @@ class TemplateScriptingCompiler { $this->autoloadPlugins[$modifierData['className']] = $modifierData['className']; } else if ((!function_exists($modifierData['name']) && !in_array($modifierData['name'], $this->unknownPHPFunctions)) || in_array($modifierData['name'], $this->disabledPHPFunctions)) { - throw new SystemException($this->formatSyntaxError("unknown modifier '".$values[$i]."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unknown modifier '".$values[$i]."'", $this->currentIdentifier, $this->currentLineNo)); } $statusStack[count($statusStack) - 1] = $status = 'modifier end'; @@ -994,7 +994,7 @@ class TemplateScriptingCompiler { case 'constant': case 'variable': case 'string': - throw new SystemException($this->formatSyntaxError('unknown tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo), 12003); + throw new SystemException($this->formatSyntaxError('unknown tag {'.$tag.'}', $this->currentIdentifier, $this->currentLineNo)); break; } } @@ -1010,7 +1010,7 @@ class TemplateScriptingCompiler { break; } - throw new SystemException($this->formatSyntaxError("unexpected '.' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '.' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // object access @@ -1021,7 +1021,7 @@ class TemplateScriptingCompiler { break; } - throw new SystemException($this->formatSyntaxError("unexpected '->' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '->' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // left parenthesis @@ -1039,7 +1039,7 @@ class TemplateScriptingCompiler { break; } - throw new SystemException($this->formatSyntaxError("unexpected '(' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '(' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // right parenthesis @@ -1054,7 +1054,7 @@ class TemplateScriptingCompiler { } } - throw new SystemException($this->formatSyntaxError("unexpected ')' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected ')' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // bracket open @@ -1066,7 +1066,7 @@ class TemplateScriptingCompiler { break; } - throw new SystemException($this->formatSyntaxError("unexpected '[' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '[' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // bracket close @@ -1081,7 +1081,7 @@ class TemplateScriptingCompiler { } } - throw new SystemException($this->formatSyntaxError("unexpected ']' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected ']' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // modifier @@ -1095,7 +1095,7 @@ class TemplateScriptingCompiler { // clear status stack while ($oldStatus = array_pop($statusStack)) { if ($oldStatus != 'variable' && $oldStatus != 'object' && $oldStatus != 'constant' && $oldStatus != 'string' && $oldStatus != 'modifier end') { - throw new SystemException($this->formatSyntaxError("unexpected '|' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '|' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); } } @@ -1118,7 +1118,7 @@ class TemplateScriptingCompiler { } } - throw new SystemException($this->formatSyntaxError("unexpected ':' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected ':' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; case ',': @@ -1134,7 +1134,7 @@ class TemplateScriptingCompiler { } } - throw new SystemException($this->formatSyntaxError("unexpected ',' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected ',' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; // math operators @@ -1150,7 +1150,7 @@ class TemplateScriptingCompiler { break; } - throw new SystemException($this->formatSyntaxError("unexpected '".$operator."' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo), 12004); + throw new SystemException($this->formatSyntaxError("unexpected '".$operator."' in tag '".$tag."'", $this->currentIdentifier, $this->currentLineNo)); break; } } @@ -1277,7 +1277,7 @@ class TemplateScriptingCompiler { if (!is_object($prefilter)) { $className = $this->template->getPluginClassName('prefilter', $prefilter); if (!class_exists($className)) { - throw new SystemException($this->formatSyntaxError('unable to find prefilter class '.$className, $this->currentIdentifier), 11001); + throw new SystemException($this->formatSyntaxError('unable to find prefilter class '.$className, $this->currentIdentifier)); } $prefilter = new $className(); } @@ -1286,7 +1286,7 @@ class TemplateScriptingCompiler { $string = $prefilter->execute($templateName, $string, $this); } else { - throw new SystemException($this->formatSyntaxError("Prefilter '".$prefilter."' does not implement the interface 'ITemplatePluginPrefilter'", $this->currentIdentifier), 11010); + throw new SystemException($this->formatSyntaxError("Prefilter '".$prefilter."' does not implement the interface 'ITemplatePluginPrefilter'", $this->currentIdentifier)); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAppend.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAppend.class.php index d0d9342c32..cbb480821a 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAppend.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAppend.class.php @@ -23,10 +23,10 @@ class TemplatePluginCompilerAppend implements ITemplatePluginCompiler { */ public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) { if (!isset($tagArgs['var'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in append tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in append tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } if (!isset($tagArgs['value'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in append tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in append tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } return "append(".$tagArgs['var'].", ".$tagArgs['value']."); ?>"; @@ -36,6 +36,6 @@ class TemplatePluginCompilerAppend implements ITemplatePluginCompiler { * @see wcf\system\template\ITemplatePluginCompiler::executeEnd() */ public function executeEnd(TemplateScriptingCompiler $compiler) { - throw new SystemException($compiler->formatSyntaxError("unknown tag {/append}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003); + throw new SystemException($compiler->formatSyntaxError("unknown tag {/append}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAssign.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAssign.class.php index f4c05938bf..9ae7d4da40 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAssign.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerAssign.class.php @@ -23,10 +23,10 @@ class TemplatePluginCompilerAssign implements ITemplatePluginCompiler { */ public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) { if (!isset($tagArgs['var'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in assign tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in assign tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } if (!isset($tagArgs['value'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in assign tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in assign tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } return "assign(".$tagArgs['var'].", ".$tagArgs['value']."); ?>"; @@ -36,6 +36,6 @@ class TemplatePluginCompilerAssign implements ITemplatePluginCompiler { * @see wcf\system\template\ITemplatePluginCompiler::executeEnd() */ public function executeEnd(TemplateScriptingCompiler $compiler) { - throw new SystemException($compiler->formatSyntaxError("unknown tag {/assign}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003); + throw new SystemException($compiler->formatSyntaxError("unknown tag {/assign}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerFetch.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerFetch.class.php index b398371417..378b7be0cf 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerFetch.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerFetch.class.php @@ -24,7 +24,7 @@ class TemplatePluginCompilerFetch implements ITemplatePluginCompiler { */ public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) { if (!isset($tagArgs['file'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'file' argument in fetch tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'file' argument in fetch tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } if (isset($tagArgs['assign'])) { @@ -39,6 +39,6 @@ class TemplatePluginCompilerFetch implements ITemplatePluginCompiler { * @see wcf\system\template\ITemplatePluginCompiler::executeEnd() */ public function executeEnd(TemplateScriptingCompiler $compiler) { - throw new SystemException($compiler->formatSyntaxError("unknown tag {/fetch}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003); + throw new SystemException($compiler->formatSyntaxError("unknown tag {/fetch}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerImplode.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerImplode.class.php index beaddf7209..25bb79a33b 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerImplode.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerImplode.class.php @@ -28,10 +28,10 @@ class TemplatePluginCompilerImplode implements ITemplatePluginCompiler { $compiler->pushTag('implode'); if (!isset($tagArgs['from'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'from' argument in implode tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'from' argument in implode tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } if (!isset($tagArgs['item'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'item' argument in implode tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'item' argument in implode tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } $hash = StringUtil::getRandomID(); diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerPrepend.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerPrepend.class.php index 3365c3c98e..4ac7471a21 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerPrepend.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginCompilerPrepend.class.php @@ -23,10 +23,10 @@ class TemplatePluginCompilerPrepend implements ITemplatePluginCompiler { */ public function executeStart($tagArgs, TemplateScriptingCompiler $compiler) { if (!isset($tagArgs['var'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in prepend tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'var' argument in prepend tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } if (!isset($tagArgs['value'])) { - throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in prepend tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12001); + throw new SystemException($compiler->formatSyntaxError("missing 'value' argument in prepend tag", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } return "prepend(".$tagArgs['var'].", ".$tagArgs['value']."); ?>"; @@ -36,6 +36,6 @@ class TemplatePluginCompilerPrepend implements ITemplatePluginCompiler { * @see wcf\system\template\ITemplatePluginCompiler::executeEnd() */ public function executeEnd(TemplateScriptingCompiler $compiler) { - throw new SystemException($compiler->formatSyntaxError("unknown tag {/prepend}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo()), 12003); + throw new SystemException($compiler->formatSyntaxError("unknown tag {/prepend}", $compiler->getCurrentIdentifier(), $compiler->getCurrentLineNo())); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionCycle.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionCycle.class.php index 54d15818cb..b6e9750fc0 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionCycle.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionCycle.class.php @@ -33,7 +33,7 @@ class TemplatePluginFunctionCycle implements ITemplatePluginFunction { // get values if (!isset($tagArgs['values']) ) { if (!isset($this->cycles[$name]['values'])) { - throw new SystemException("missing 'values' argument in cycle tag", 12001); + throw new SystemException("missing 'values' argument in cycle tag"); } } else { diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmlcheckboxes.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmlcheckboxes.class.php index 6a56d13af4..f80658a6da 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmlcheckboxes.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmlcheckboxes.class.php @@ -39,11 +39,11 @@ class TemplatePluginFunctionHtmlcheckboxes implements ITemplatePluginFunction { } if (!isset($tagArgs['options']) || !is_array($tagArgs['options'])) { - throw new SystemException("missing 'options' argument in htmlCheckboxes tag", 12001); + throw new SystemException("missing 'options' argument in htmlCheckboxes tag"); } if (!isset($tagArgs['name'])) { - throw new SystemException("missing 'name' argument in htmlCheckboxes tag", 12001); + throw new SystemException("missing 'name' argument in htmlCheckboxes tag"); } if (isset($tagArgs['disableEncoding']) && $tagArgs['disableEncoding']) { diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmloptions.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmloptions.class.php index 4f6e3d9e19..7fa8c19e9a 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmloptions.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionHtmloptions.class.php @@ -48,7 +48,7 @@ class TemplatePluginFunctionHtmloptions extends TemplatePluginFunctionHtmlcheckb } if (!isset($tagArgs['options']) || !is_array($tagArgs['options'])) { - throw new SystemException("missing 'options' argument in htmloptions tag", 12001); + throw new SystemException("missing 'options' argument in htmloptions tag"); } if (isset($tagArgs['disableEncoding']) && $tagArgs['disableEncoding']) { diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionPages.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionPages.class.php index 9529ebb001..86f85c6608 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionPages.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionPages.class.php @@ -67,10 +67,10 @@ class TemplatePluginFunctionPages implements ITemplatePluginFunction { */ public function execute($tagArgs, TemplateEngine $tplObj) { // needed params: link, page, pages - if (!isset($tagArgs['link'])) throw new SystemException("missing 'link' argument in pages tag", 12001); + if (!isset($tagArgs['link'])) throw new SystemException("missing 'link' argument in pages tag"); if (!isset($tagArgs['pages'])) { if (($tagArgs['pages'] = $tplObj->get('pages')) === null) { - throw new SystemException("missing 'pages' argument in pages tag", 12001); + throw new SystemException("missing 'pages' argument in pages tag"); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionSmallpages.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionSmallpages.class.php index ece6850f28..2a6d12dff5 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionSmallpages.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginFunctionSmallpages.class.php @@ -57,10 +57,10 @@ class TemplatePluginFunctionSmallpages implements ITemplatePluginFunction { */ public function execute($tagArgs, TemplateEngine $tplObj) { // needed params: link, pages - if (!isset($tagArgs['link'])) throw new SystemException("missing 'link' argument in pages tag", 12001); + if (!isset($tagArgs['link'])) throw new SystemException("missing 'link' argument in pages tag"); if (!isset($tagArgs['pages'])) { if (($tagArgs['pages'] = $tplObj->get('pages')) === null) { - throw new SystemException("missing 'pages' argument in pages tag", 12001); + throw new SystemException("missing 'pages' argument in pages tag"); } } diff --git a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginModifierConcat.class.php b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginModifierConcat.class.php index 80147cf27b..f8cd763686 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginModifierConcat.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/TemplatePluginModifierConcat.class.php @@ -24,7 +24,7 @@ class TemplatePluginModifierConcat implements ITemplatePluginModifier { */ public function execute($tagArgs, TemplateEngine $tplObj) { if (count($tagArgs) < 2) { - throw new SystemException("concat modifier needs two or more arguments", 12001); + throw new SystemException("concat modifier needs two or more arguments"); } $result = ''; diff --git a/wcfsetup/install/files/lib/util/BasicFileUtil.class.php b/wcfsetup/install/files/lib/util/BasicFileUtil.class.php index 33424a659c..894b09e2b3 100644 --- a/wcfsetup/install/files/lib/util/BasicFileUtil.class.php +++ b/wcfsetup/install/files/lib/util/BasicFileUtil.class.php @@ -63,7 +63,7 @@ class BasicFileUtil { else { if (ini_get('safe_mode')) $reason = "due to php safe_mode restrictions"; else $reason = "due to an unknown reason"; - throw new SystemException('There is no access to the system temporary folder '.$reason.' and no user specific temporary folder exists in '.WCF_DIR.'! This is a misconfiguration of your webserver software! Please create a folder called '.$path.' using your favorite ftp program, make it writable and then retry this installation.', 10000); + throw new SystemException('There is no access to the system temporary folder '.$reason.' and no user specific temporary folder exists in '.WCF_DIR.'! This is a misconfiguration of your webserver software! Please create a folder called '.$path.' using your favorite ftp program, make it writable and then retry this installation.'); } } } diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index 8fe02fbe04..5ff89223f0 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -374,7 +374,7 @@ class FileUtil { if (!isset($remoteFile)) { $localFile->close(); unlink($newFileName); - throw new SystemException("cannot connect to http host '".$host."'", 14000); + throw new SystemException("cannot connect to http host '".$host."'"); } // build and send the http request. $request = "GET ".$path.(!empty($parsedUrl['query']) ? '?'.$parsedUrl['query'] : '')." HTTP/1.0\r\n"; @@ -405,7 +405,7 @@ class FileUtil { if ($error !== false) { $localFile->close(); unlink($newFileName); - throw new SystemException("file ".$path." not found at host '".$host."'", 14001); + throw new SystemException("file ".$path." not found at host '".$host."'"); } // write to the target system. $localFile->write($readResponse[count($readResponse) - 1]);