From e01240611f2a94d0a194235f2f83323049ad1a74 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 29 Oct 2011 13:01:05 -0400 Subject: Refs #3201 updates json river views and removed old search view --- engine/classes/ElggRiverItem.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engine/classes/ElggRiverItem.php') diff --git a/engine/classes/ElggRiverItem.php b/engine/classes/ElggRiverItem.php index cdb22239d..fcc8f9c85 100644 --- a/engine/classes/ElggRiverItem.php +++ b/engine/classes/ElggRiverItem.php @@ -28,8 +28,14 @@ class ElggRiverItem // throw exception } + // the casting is to support typed serialization like json + $int_types = array('id', 'subject_guid', 'object_guid', 'annotation_id', 'access_id', 'posted'); foreach ($object as $key => $value) { - $this->$key = $value; + if (in_array($key, $int_types)) { + $this->$key = (int)$value; + } else { + $this->$key = $value; + } } } -- cgit v1.2.3