]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/database/class_BaseDatabaseWrapper.php
To much 'Deny from all' removed :(
[core.git] / inc / classes / main / database / class_BaseDatabaseWrapper.php
index 9b21800cc21b2186493d32bab3e505773c5bdaa8..a7debada0d6b27942537da9badf56a553c047d60 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -30,7 +30,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
        /**
         * Current table name to use
         */
-       private $tableName = "unknown";
+       private $tableName = 'unknown';
 
        /**
         * Protected constructor
@@ -43,10 +43,6 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
 
                // Initialize the cache instance
                $this->initCacheInstance();
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
@@ -76,7 +72,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                // Does this key exists in cache?
                if ($this->cacheInstance->offsetExists($cacheKey)) {
                        // Then use this result
-                       $result = $cacheInstance->offsetGet($cacheKey);
+                       $result = $this->cacheInstance->offsetGet($cacheKey);
                } else {
                        // Now it's time to ask the database layer for this select statement
                        $result = $this->getDatabaseInstance()->doSelectByTableCriteria($this->getTableName(), $criteriaInstance);
@@ -88,7 +84,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        } else {
                                // This invalid result must be wrapped
                                $result = array(
-                                       'status'                => "invalid",
+                                       'status'                => 'invalid',
                                        'exception'             => $this->getDatabaseInstance()->getLastException()
                                );
                        }
@@ -108,7 +104,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
         * @return      $numRows                        Numbers of rows of database entries
         */
        public function doSelectCountByCriteria (Criteria $criteriaInstance) {
-               // Total numbers is zero by default
+               // Total numbers is -1 so we can distinglish between failed and valid queries
                $numRows = 0;
 
                // Get the result from above method