Syntax and minor fixes
Deleted_notice and Bookmark getByPK assocative array for example.
This commit is contained in:
@@ -479,7 +479,7 @@ class BookmarkPlugin extends MicroAppPlugin
|
||||
{
|
||||
assert($obj->type == ActivityObject::BOOKMARK);
|
||||
|
||||
$bm = Bookmark::getByPK(array('uri', $obj->id));
|
||||
$bm = Bookmark::getByPK(array('uri' => $obj->id));
|
||||
|
||||
$out['displayName'] = $bm->getTitle();
|
||||
$out['targetUrl'] = $bm->getUrl();
|
||||
|
@@ -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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user