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;
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;
}
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];
}
// 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;
$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);
}
}
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);
}
}
}
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);
}
}
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);
}
}
$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) {
}
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
// 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");
// 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();
}
// 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();
}
}
}
- throw new SystemException("missing attribute 'languagecode' in language file", 13023);
+ throw new SystemException("missing attribute 'languagecode' in language file");
}
/**
// 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
}
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
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'));
// 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
$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
*/
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]);
*/
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
// 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];
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
// 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");
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']();
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
$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");
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");
<div>
<p><?php echo $this->getDescription(); ?></p>
- <?php if ($this->getCode()) { ?><p>You get more information about the problem in the official WoltLab knowledge base: <a href="http://www.woltlab.com/help/?code=<?php echo intval($this->getCode()); ?>">http://www.woltlab.com/help/?code=<?php echo intval($this->getCode()); ?></a></p><?php } ?>
-
+
<h2>Information:</h2>
<p>
<b>error message:</b> <?php echo StringUtil::encodeHTML($this->getMessage()); ?><br>
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);
}
}
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);
$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);
}
}
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);
}
}
}
$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);
}
}
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);
}
}
$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);
}
}
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;
}
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];
}
// 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;
$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
$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
$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."'"));
}
}
}
// 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."'"));
}
}
$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
$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;
}
$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 =
$this->getSMTPStatus();
if ($this->statusCode != 250) {
- throw new SystemException($this->formatError("message sending failed"), 17005);
+ throw new SystemException($this->formatError("message sending failed"));
}
}
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."')");
}
}
}
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
// 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
$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;
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;
$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
$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
$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
// 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
));
$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
// 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
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 {
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.");
}
}
}
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.");
}
}
}
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.");
}
}
}
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.");
}
}
}
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.");
}
}
}
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.");
}
}
}
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 {
}
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
}
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
$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);
}
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;
$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']."'.");
}
}
$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']."'.");
}
}
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']);
// 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
// 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
// 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
// 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
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
// 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
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
$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
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)) {
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);
}
}
}
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);
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."'");
}
}
}
}
if (!isset($this->cache['styles'][$styleID])) {
- throw new SystemException('no default style defined', 100000);
+ throw new SystemException('no default style defined');
}
}
return PACKAGE_ID;
}
- throw new SystemException("Unable to find template '$templateName'", 12005);
+ throw new SystemException("Unable to find template '$templateName'");
}
/**
}
- throw new SystemException("Unable to find template '$templateName'", 12005);
+ throw new SystemException("Unable to find template '$templateName'");
}
/**
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;
*/
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;
// 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;
}
}
}
- 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));
}
/**
$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));
}
}
// 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;
// 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 = '';
// 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
// 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
$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], '(');
$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) {
$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];
$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) {
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];
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
$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';
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;
}
}
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
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
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
}
}
- 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
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
}
}
- 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
// 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));
}
}
}
}
- 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 ',':
}
}
- 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
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;
}
}
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();
}
$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));
}
}
*/
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 "<?php \$this->append(".$tagArgs['var'].", ".$tagArgs['value']."); ?>";
* @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()));
}
}
*/
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 "<?php \$this->assign(".$tagArgs['var'].", ".$tagArgs['value']."); ?>";
* @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()));
}
}
*/
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'])) {
* @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()));
}
}
$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();
*/
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 "<?php \$this->prepend(".$tagArgs['var'].", ".$tagArgs['value']."); ?>";
* @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()));
}
}
// 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 {
}
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']) {
}
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']) {
*/
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");
}
}
*/
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");
}
}
*/
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 = '';
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.');
}
}
}
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";
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]);