]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php
WIP:
[core.git] / framework / main / classes / database / backend / lfdb_legacy / class_CachedLocalFileDatabase.php
index b2d9041e256553ff8af60a71d4cf4cea11f6b50f..3c021c7deaa75ef0409b63e951a4221682f856df 100644 (file)
@@ -391,7 +391,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                        $idx = 1;
 
                        // Read the directory with some exceptions
-                       while (($fileInfoInstance = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
+                       while (($fileInfoInstance = $directoryInstance->readDirectoryExcept(['.gitkeep', 'info.' . $this->getFileExtension()])) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
                                // Does the extension match?
                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: fileInfoInstance->extension=%s,this->fileExtension=%s', $fileInfoInstance->getExtension(), $this->getFileExtension()));
                                if ($fileInfoInstance->getExtension() !== $this->getFileExtension()) {
@@ -413,9 +413,6 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                                        // Search in the criteria with FMFW (First Matches, First Wins)
                                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: data[]=%d', count($dataArray)));
                                        foreach ($dataArray as $key => $value) {
-                                               // Make sure value is not bool
-                                               assert(!is_bool($value));
-
                                                // Found one entry?
                                                $isFound = (($isFound === true) && ($searchInstance->isCriteriaMatching($key, $value)));
                                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: key=%s,value[%s]=%s,isFound=%s', $key, gettype($value), $value, intval($isFound)));
@@ -547,7 +544,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                        $searchInstance = $dataSetInstance->getSearchInstance();
 
                        // Read the directory with some exceptions
-                       while (($fileInfoInstance = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
+                       while (($fileInfoInstance = $directoryInstance->readDirectoryExcept(['.gitkeep', 'info.' . $this->getFileExtension()])) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
                                // Does the extension match?
                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: fileInfoInstance->extension=' . $fileInfoInstance->getExtension() . ',this->getFileExtension()=' . $this->getFileExtension());
                                if ($fileInfoInstance->getExtension() !== $this->getFileExtension()) {
@@ -568,9 +565,6 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
 
                                        // Search in the criteria with FMFW (First Matches, First Wins)
                                        foreach ($dataArray as $key => $value) {
-                                               // Make sure value is not bool
-                                               assert(!is_bool($value));
-
                                                // Found one entry?
                                                $isFound = (($isFound === true) && ($searchInstance->isCriteriaMatching($key, $value)));
                                        }
@@ -704,7 +698,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                        $count = 0;
 
                        // Read the directory with some exceptions
-                       while ($fileInfoInstance = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) {
+                       while ($fileInfoInstance = $directoryInstance->readDirectoryExcept(['.gitkeep', 'info.' . $this->getFileExtension()])) {
                                // Does the extension match?
                                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: fileInfoInstance->extension=' . $fileInfoInstance->getExtension() . ',this->getFileExtension()=' . $this->getFileExtension());
                                if ($fileInfoInstance->getExtension() !== $this->getFileExtension()) {