X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fdatabase%2Fdatabases%2Fclass_LocalFileDatabase.php;h=881831054de5d5241ca2806420d09e2058b8cda6;hp=16e6bee0047b3c1e01de9a23b6b5ab3be1c444aa;hb=e6352b71e923a760d626d6fd32f6223e4c8740fd;hpb=681f2bb28774ae9a46a992597b439a3d47ef2a3c diff --git a/inc/classes/main/database/databases/class_LocalFileDatabase.php b/inc/classes/main/database/databases/class_LocalFileDatabase.php index 16e6bee0..88183105 100644 --- a/inc/classes/main/database/databases/class_LocalFileDatabase.php +++ b/inc/classes/main/database/databases/class_LocalFileDatabase.php @@ -340,14 +340,19 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackend { * @throws SqlException If an 'SQL error' occurs */ public function querySelect ($tableName, LocalSearchCriteria $searchInstance) { + // Debug message + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!'); + // The result is null by any errors $resultData = NULL; // Create full path name $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/'; - // A 'select' query is not that easy on local files, so first try to - // find the 'table' which is in fact a directory on the server + /* + * A 'select' query is not that easy on local files, so first try to + * find the 'table' which is in fact a directory on the server + */ try { // Get a directory pointer instance $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($pathName)); @@ -365,6 +370,9 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackend { // Read the directory with some exceptions while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) { + // Debug message + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',this->getFileExtension()=' . $this->getFileExtension()); + // Does the extension match? if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) { // Skip this file!