Remove obsolete commented-out code (#4200)
authorMatthias Schmidt <gravatronics@live.com>
Fri, 7 May 2021 10:01:41 +0000 (12:01 +0200)
committerGitHub <noreply@github.com>
Fri, 7 May 2021 10:01:41 +0000 (12:01 +0200)
All code has been commented out for at least 5 years, some code even from the very beginning.

Close #4139

wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php
wcfsetup/install/files/lib/system/io/ZipWriter.class.php
wcfsetup/install/files/lib/system/package/plugin/SQLPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php
wcfsetup/install/files/lib/util/CronjobUtil.class.php
wcfsetup/install/files/lib/util/ExifUtil.class.php
wcfsetup/install/files/lib/util/FileUtil.class.php

index e8bcfd124f8adfdc9bfdb9bb57cfef0be50515a4..4d8dc42f5b86f4b6532a6f2deecbf36fffabea0a 100644 (file)
@@ -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);
index d4be8d1c2be43c7eaa3235394293e9a8570ee1c8..04db323929f6e6968fa8743a296cc87276a416ae 100644 (file)
@@ -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;
 
index b2f7c06adb592e32c11e455d99a6bc85f0bd9a55..1298eebf7860697835336fe90efd8a87d7e50d83 100644 (file)
@@ -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 (
index 20957fa55647a24307c84b31ceff890d17cd23a3..5c099e4978b79de03cd7cd9e79a4997f58d9df15 100644 (file)
@@ -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 . "'",
index 869138034f640d66016f38bb60577f6bc711c780..a76875f67b132c4284ee6c570d8fcdb6efcafe9e 100644 (file)
@@ -603,9 +603,6 @@ final class CronjobUtil
         // perform the actual regex pattern matching.
         $range = '(((' . $pattern . ')|(\*\/' . $step . ')?)|(((' . $pattern . ')-(' . $pattern . '))(\/' . $step . ')?))';
 
-        // $longPattern prototype: ^\d+(,\d)*$
-        // $longPattern = '/^(?<!,)'.$range.'+(,'.$range.')*$/i'; // with assertions?
-        // $longPattern = '/^'.$range.'+(,'.$range.')*$/i'; / does not work on some php installations
         $longPattern = '/^' . $range . '(,' . $range . ')*$/i';
 
         if ($value != '*' && !\preg_match($longPattern, $value)) {
index 31b49b46cb1619d00cf3781508a91f722ae251d8..255fed7e3da9af1c70816defe36ae68d2e2b007a 100644 (file)
@@ -222,11 +222,6 @@ final class ExifUtil
         if (isset($rawExifData['FocalLength']) && \is_string($rawExifData['FocalLength'])) {
             $exifData['FocalLength'] = self::convertExifRational($rawExifData['FocalLength']);
         }
-        /*if (isset($rawExifData['ShutterSpeedValue']) && is_string($rawExifData['ShutterSpeedValue'])) {
-            // To convert this value to ordinary 'Shutter Speed'; calculate this value's power of 2, then reciprocal.
-            // For example, if value is '4', shutter speed is 1/(2^4)=1/16 second. (signed rational)
-            $exifData['ShutterSpeedValue'] = '1/' . round(pow(2, self::convertExifRational($rawExifData['ShutterSpeedValue'])), 0);
-        }*/
         if (isset($rawExifData['ISOSpeedRatings'])) {
             // CCD sensitivity equivalent to Ag-Hr film speedrate. (unsigned short)
             $exifData['ISOSpeedRatings'] = \intval($rawExifData['ISOSpeedRatings']);
index 29d8171f6d3a604b106e0d9a3877e93a50f8cf25..7fe477a814a225caec756a692fc9fb6c4f3eaf6a 100644 (file)
@@ -195,7 +195,6 @@ final class FileUtil
         $target = \explode('/', $targetDir);
 
         $relPath = '';
-        //for ($i = max(count($current), count($target)) - 1; $i >= 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);