From: Roland Häder Date: Sat, 5 Dec 2020 23:57:54 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=24f7306962861b210395c0fb41a129862e13b7ec;p=hub.git Continued: - removed deprecated ?> PHP tag close - improved some logger messages - updated core framework Signed-off-by: Roland Häder --- diff --git a/application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php b/application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php index f8784f211..8cc1e41e7 100644 --- a/application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php +++ b/application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php @@ -129,7 +129,5 @@ class MonitorPoolIterator extends BaseIterator implements Iterator, Registerable // Return result return $isValid; } -} -// [EOF] -?> +} diff --git a/application/hub/classes/iterator/pool/shutdown/class_ShutdownPoolIterator.php b/application/hub/classes/iterator/pool/shutdown/class_ShutdownPoolIterator.php index 9300f66ae..2ed3dec88 100644 --- a/application/hub/classes/iterator/pool/shutdown/class_ShutdownPoolIterator.php +++ b/application/hub/classes/iterator/pool/shutdown/class_ShutdownPoolIterator.php @@ -126,7 +126,5 @@ class ShutdownPoolIterator extends BaseIterator implements Iterator { // Return result return $isValid; } -} -// [EOF] -?> +} diff --git a/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php b/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php index 60aaf6501..325d19d53 100644 --- a/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php +++ b/application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php @@ -165,22 +165,20 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R // Is it valid? /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: CALLED!'); if (!$this->getDirectoryInstance()->getDirectoryIteratorInstance()->valid()) { - // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Rewinding iterator ...'); - // Rewind to start + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: Rewinding iterator ...'); $this->getDirectoryInstance()->getDirectoryIteratorInstance()->rewind(); } // Read next entry - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: this->csvFileImported=' . print_r($this->csvFileImported, TRUE)); - $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(array('.htaccess', '.', '..'), $this->csvFileImported)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: this->csvFileImported=%s', print_r($this->csvFileImported, TRUE))); + $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(['.htaccess', '.', '..'], $this->csvFileImported)); // Is it empty or wrong file extension? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: directoryEntry(%d)=%s', strlen($directoryEntry), $directoryEntry)); if ((empty($directoryEntry)) || (substr($directoryEntry, -4, 4) != '.csv')) { // Skip further processing - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!'); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: directoryEntry(%d)=%s, returning FALSE ... - EXIT!', strlen($directoryEntry), $directoryEntry)); return FALSE; } @@ -326,18 +324,11 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R // Read full "CSV line" $csvData = $csvFileInstance->readCsvFileLine($this->columnSeparator); - // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: csvData[' . gettype($csvData) . ']=' . print_r($csvData, TRUE)); - - // Expect always an array - assert(is_array($csvData)); - // Is the array empty? + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: csvData[%s]=%s', gettype($csvData), print_r($csvData, TRUE))); if (count($csvData) == 0) { - // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: File ' . $csvFileInstance->getFilename() . ' has been fully read.'); - // Try to close it by actually unsetting (destructing) it + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: File "%s" has been fully read.', $csvFileInstance->getFilename())); unset($csvFileInstance); // This file as been fully read, so don't push it back on stack. diff --git a/core b/core index c1841c5d8..5a6770f3b 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c1841c5d8ad644456ea408caf315e858d89fc555 +Subproject commit 5a6770f3b6d3da3e22297844d8077dc2aba4663b