From 32f4daf44daa88df1b8e06a5e45a17f1f228d40a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 7 Mar 2011 14:20:55 -0500 Subject: [PATCH] Notice saves its object type --- classes/Notice.php | 8 ++++++++ classes/statusnet.ini | 1 + 2 files changed, 9 insertions(+) diff --git a/classes/Notice.php b/classes/Notice.php index 157fdf2dc4..7be63b4e9f 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -72,6 +72,7 @@ class Notice extends Memcached_DataObject public $location_id; // int(4) public $location_ns; // int(4) public $repeat_of; // int(4) + public $object_type; // varchar(255) /* Static get */ 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 * notice in place of extracting links from content * boolean 'distribute' whether to distribute the notice, default true + * string 'object_type' URL of the associated object type (default ActivityObject::NOTE) * * @fixme tag override * @@ -360,6 +362,12 @@ class Notice extends Memcached_DataObject $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))) { // XXX: some of these functions write to the DB diff --git a/classes/statusnet.ini b/classes/statusnet.ini index bf8d173805..338e5c5aea 100644 --- a/classes/statusnet.ini +++ b/classes/statusnet.ini @@ -336,6 +336,7 @@ lon = 1 location_id = 1 location_ns = 1 repeat_of = 1 +object_type = 2 [notice__keys] id = N -- 2.39.5