]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' into cacheplugin
authorEvan Prodromou <evan@status.net>
Sun, 3 Jan 2010 05:47:56 +0000 (19:47 -1000)
committerEvan Prodromou <evan@status.net>
Sun, 3 Jan 2010 05:47:56 +0000 (19:47 -1000)
classes/Memcached_DataObject.php
classes/Notice.php

index 4f81bef75c4fb4da016919fd3baf30c8c7262371..1608720d14072980187db8ba0cfb682a9d2d0334 100644 (file)
@@ -23,7 +23,7 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
 
 class Memcached_DataObject extends DB_DataObject
 {
-    /**
+   /**
      * Destructor to free global memory resources associated with
      * this data object when it's unset or goes out of scope.
      * DB_DataObject doesn't do this yet by itself.
@@ -62,14 +62,14 @@ class Memcached_DataObject extends DB_DataObject
         } else {
             $i = DB_DataObject::factory($cls);
             if (empty($i)) {
-                return null;
+                return false;
             }
             $result = $i->get($k, $v);
             if ($result) {
                 $i->encache();
                 return $i;
             } else {
-                return null;
+                return false;
             }
         }
     }
@@ -122,7 +122,7 @@ class Memcached_DataObject extends DB_DataObject
     }
 
     static function cacheKey($cls, $k, $v) {
-        if (is_object($cls) || is_object($j) || is_object($v)) {
+        if (is_object($cls) || is_object($k) || is_object($v)) {
             $e = new Exception();
             common_log(LOG_ERR, __METHOD__ . ' object in param: ' .
                 str_replace("\n", " ", $e->getTraceAsString()));
@@ -262,18 +262,6 @@ class Memcached_DataObject extends DB_DataObject
         return new ArrayWrapper($cached);
     }
 
-    function cleanup()
-    {
-        global $_DB_DATAOBJECT;
-
-        if (isset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid])) {
-            unset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid]);
-        }
-        if (isset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid])) {
-            unset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid]);
-        }
-    }
-
     // We overload so that 'SET NAMES "utf8"' is called for
     // each connection
 
index fe3f3c0170365b69ae6168451326e7d842ea53ab..3e55bd6fa5b1c6e0294730883ed551b77ad8142f 100644 (file)
@@ -214,7 +214,7 @@ class Notice extends Memcached_DataObject
             extract($options);
         }
 
-        if (empty($is_local)) {
+        if (!isset($is_local)) {
             $is_local = Notice::LOCAL_PUBLIC;
         }