]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/classes/Bookmark.php
Syntax and minor fixes
[quix0rs-gnu-social.git] / plugins / Bookmark / classes / Bookmark.php
index e92fd33449453a6d91d53d4bbbc1e81b9c992b23..cdbdf526cae733953ccef6e7e835787c8ea262bf 100644 (file)
@@ -69,9 +69,9 @@ class Bookmark extends Managed_DataObject
                 'description' => array('type' => 'text'),
                 'created' => array('type' => 'datetime', 'not null' => true),
             ),
-            'primary key' => array('id'),
+            'primary key' => array('uri'),
             'unique keys' => array(
-                'bookmark_uri_key' => array('uri'),
+                'bookmark_id_key' => array('id'),
             ),
             'foreign keys' => array(
                 'bookmark_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
@@ -94,8 +94,7 @@ class Bookmark extends Managed_DataObject
      */
     static public function fromStored(Notice $stored)
     {
-        $class = get_called_class();
-        return self::getByPK(array('uri', $stored->getUri()));
+        return self::getByPK(array('uri' => $stored->getUri()));
     }
 
     /**