Notice saves its object type
This commit is contained in:
parent
618a658985
commit
32f4daf44d
@ -72,6 +72,7 @@ class Notice extends Memcached_DataObject
|
|||||||
public $location_id; // int(4)
|
public $location_id; // int(4)
|
||||||
public $location_ns; // int(4)
|
public $location_ns; // int(4)
|
||||||
public $repeat_of; // int(4)
|
public $repeat_of; // int(4)
|
||||||
|
public $object_type; // varchar(255)
|
||||||
|
|
||||||
/* Static get */
|
/* Static get */
|
||||||
function staticGet($k,$v=NULL)
|
function staticGet($k,$v=NULL)
|
||||||
@ -241,6 +242,7 @@ class Notice extends Memcached_DataObject
|
|||||||
* array 'urls' list of attached/referred URLs to save with the
|
* array 'urls' list of attached/referred URLs to save with the
|
||||||
* notice in place of extracting links from content
|
* notice in place of extracting links from content
|
||||||
* boolean 'distribute' whether to distribute the notice, default true
|
* boolean 'distribute' whether to distribute the notice, default true
|
||||||
|
* string 'object_type' URL of the associated object type (default ActivityObject::NOTE)
|
||||||
*
|
*
|
||||||
* @fixme tag override
|
* @fixme tag override
|
||||||
*
|
*
|
||||||
@ -360,6 +362,12 @@ class Notice extends Memcached_DataObject
|
|||||||
$notice->rendered = common_render_content($final, $notice);
|
$notice->rendered = common_render_content($final, $notice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($object_type)) {
|
||||||
|
$notice->object_type = ActivityObject::NOTE;
|
||||||
|
} else {
|
||||||
|
$notice->object_type = $object_type;
|
||||||
|
}
|
||||||
|
|
||||||
if (Event::handle('StartNoticeSave', array(&$notice))) {
|
if (Event::handle('StartNoticeSave', array(&$notice))) {
|
||||||
|
|
||||||
// XXX: some of these functions write to the DB
|
// XXX: some of these functions write to the DB
|
||||||
|
@ -336,6 +336,7 @@ lon = 1
|
|||||||
location_id = 1
|
location_id = 1
|
||||||
location_ns = 1
|
location_ns = 1
|
||||||
repeat_of = 1
|
repeat_of = 1
|
||||||
|
object_type = 2
|
||||||
|
|
||||||
[notice__keys]
|
[notice__keys]
|
||||||
id = N
|
id = N
|
||||||
|
Loading…
Reference in New Issue
Block a user