]> git.mxchange.org Git - core.git/commitdiff
Another fix attempt for search criteria
authorRoland Häder <roland@mxchange.org>
Fri, 22 Feb 2013 05:26:08 +0000 (05:26 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 22 Feb 2013 05:26:08 +0000 (05:26 +0000)
inc/classes/main/criteria/search/class_SearchCriteria.php
inc/classes/main/database/databases/class_LocalFileDatabase.php

index 170986c0caf9efc6899ac670cf1e23247189b3ea..f9926f1241d47e04cdd4df85069b89d308021aba 100644 (file)
@@ -193,7 +193,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __LINE__ . ']: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
 
                // 'exclude' check
-               $isMatching = (((is_null($searchChoice)) || ($isMatching === TRUE)) && ((is_null($searchExclude)) || ($searchExclude != $value)));
+               $isMatching = (((is_null($searchChoice)) || ($isMatching === TRUE)) && (!is_null($searchExclude)) && ($searchExclude != $value));
 
                // Return result
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SEARCH-CRITERIA[' . __LINE__ . ']: key=' . $key . ',value=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
index ac5bbb9553d52ec6660c4a56fbcda8091715e8b7..e45b294a09e2bec3d1f6edd325508bcfefa1c3a8 100644 (file)
@@ -348,7 +348,7 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackendIn
 
                                // Read the file
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: dataFile=' . $dataFile . ',dataArray='.print_r($dataArray, TRUE));
 
                                // Is this an array?
                                if (is_array($dataArray)) {
@@ -359,11 +359,11 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackendIn
                                        foreach ($dataArray as $key => $value) {
                                                // Found one entry?
                                                $isFound = (($isFound === TRUE) && ($searchInstance->isCriteriaMatching($key, $value)));
-                                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
+                                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: key=' . $key . ',value=' . $value . ',isFound=' . intval($isFound));
                                        } // END - foreach
 
                                        // Is all found?
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: isFound=' . intval($isFound) . ',limitFound=' . $limitFound . ',limit=' . $searchInstance->getLimit());
                                        if ($isFound === TRUE) {
                                                // Shall we skip this entry?
                                                if ($searchInstance->getSkip() > 0) {