]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
authorEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 07:23:30 +0000 (23:23 -0800)
committerEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 07:23:30 +0000 (23:23 -0800)
classes/Memcached_DataObject.php
plugins/UserFlag/User_flag_profile.php

index 04f75b775c7c0ac9df106634ac946a39931058d6..4e3cc5678867d26e6d2f6cf47b9cf1b9b1a51433 100644 (file)
@@ -146,7 +146,9 @@ class Memcached_DataObject extends DB_DataObject
     function insert()
     {
         $result = parent::insert();
-        $this->encache(); // in case of cached negative lookups
+        if ($result) {
+            $this->encache(); // in case of cached negative lookups
+        }
         return $result;
     }
 
index 063ed04eac961ac790762799fe3a10399f683073..bc4251cf7f11010d62128c4d196e0cd9602c86c7 100644 (file)
@@ -89,6 +89,17 @@ class User_flag_profile extends Memcached_DataObject
         return array('profile_id' => 'N', 'user_id' => 'N');
     }
 
+    /**
+     * return key definitions for DB_DataObject
+     *
+     * @return array key definitions
+     */
+
+    function keyTypes()
+    {
+        return $this->keys();
+    }
+
     /**
      * Get a single object with multiple keys
      *