add some changes master
authorStricted <info@nexus-irc.de>
Sat, 11 Oct 2014 20:15:04 +0000 (22:15 +0200)
committerStricted <info@nexus-irc.de>
Sat, 11 Oct 2014 20:15:04 +0000 (22:15 +0200)
APC.class.php
db.class.php

index 2328aa431617b0a9e654771718783edf6bdf9703..f3a289ebede358c0f0e6ecd395669fc8f3946ed6 100644 (file)
@@ -59,7 +59,7 @@ class APC {
        public function fetch ($key) {
                if ($this->exists($key)) {
                        $cacheTime = $this->getCacheTime($key);
-                       if ($cacheTime['ttl'] > 0 && (TIME_NOW - $cacheTime['mtime']) > $cacheTime['ttl']) {
+                       if ($cacheTime['ttl'] > 0 && (time() - $cacheTime['mtime']) > $cacheTime['ttl']) {
                                $this->delete($key);
                                return null;
                        }
index 664d6d5d395d3866e87ab9334a43695cb4961f5b..9874ed34f61416975ebc0c04830aabc96a05a715 100644 (file)
@@ -159,5 +159,20 @@ class DB {
        public function error () {
                return $this->error;
        }
+       
+       /**
+        * call PDO methods
+        *
+        * @param       string  $name
+        * @param       array   $arguments
+        * @return      mixed
+        */
+       public function __call($name, $arguments) {
+               if (!method_exists($this->conn, $name)) {
+                       throw new Exception("unknown method '".$name."'");
+               }
+
+               return call_user_func_array(array($this->conn, $name), $arguments);
+       }
 }
 ?>