From: Matthias Schmidt Date: Fri, 7 May 2021 10:01:41 +0000 (+0200) Subject: Remove obsolete commented-out code (#4200) X-Git-Tag: 5.4.0_Alpha_2~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=63bdf809b763951184fa7b79662a3487e7a2d943;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete commented-out code (#4200) All code has been commented out for at least 5 years, some code even from the very beginning. Close #4139 --- diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php index e8bcfd124f..4d8dc42f5b 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php @@ -141,10 +141,8 @@ class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor } } - //for ($i = 0; $i < 2; $i++) { $br = $this->getDocument()->createElement('br'); $paragraph->appendChild($br); - //} } DOMUtil::removeNode($paragraph, true); diff --git a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php index d4be8d1c2b..04db323929 100644 --- a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php @@ -125,11 +125,6 @@ class ZipWriter // store the compressed data immediately following the file header $header .= $compressedData; - // complete the file record by adding an additional footer directly following the file data - //$header .= pack("V", $crc); - //$header .= pack("V", $sizeCompressed); - //$header .= pack("V", $sizeUncompressed); - // store the completed file record in the $headers array $this->headers[] = $header; 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 b2f7c06adb..1298eebf78 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php @@ -104,7 +104,7 @@ class SQLPackageInstallationPlugin extends AbstractPackageInstallationPlugin // delete or alter tables foreach ($entries as $entry) { // don't alter table if it should be dropped - if (!empty($entry['sqlColumn'])/* || !empty($entry['sqlIndex'])*/) { + if (!empty($entry['sqlColumn'])) { $isDropped = false; foreach ($entries as $entry2) { if ( diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 20957fa556..5c099e4978 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -1541,7 +1541,7 @@ class TemplateScriptingCompiler break; case 'object access': - if (/*strpos($values[$i], '$') !== false || */ \strpos($values[$i], '@@') !== false) { + if (\strpos($values[$i], '@@') !== false) { throw new SystemException( static::formatSyntaxError( "unexpected '->" . $values[$i] . "' in tag '" . $tag . "'", diff --git a/wcfsetup/install/files/lib/util/CronjobUtil.class.php b/wcfsetup/install/files/lib/util/CronjobUtil.class.php index 869138034f..a76875f67b 100644 --- a/wcfsetup/install/files/lib/util/CronjobUtil.class.php +++ b/wcfsetup/install/files/lib/util/CronjobUtil.class.php @@ -603,9 +603,6 @@ final class CronjobUtil // perform the actual regex pattern matching. $range = '(((' . $pattern . ')|(\*\/' . $step . ')?)|(((' . $pattern . ')-(' . $pattern . '))(\/' . $step . ')?))'; - // $longPattern prototype: ^\d+(,\d)*$ - // $longPattern = '/^(?= 0; $i--) { for ($i = 0, $max = \max(\count($current), \count($target)); $i < $max; $i++) { if (isset($current[$i]) && isset($target[$i])) { if ($current[$i] != $target[$i]) { @@ -505,7 +504,6 @@ final class FileUtil } $sourceFile = new GZipFile($gzipped, 'rb'); - //$filesize = $sourceFile->getFileSize(); $targetFile = new File($destination); while (!$sourceFile->eof()) { $targetFile->write($sourceFile->read(512), 512);