From ddda31038e0db5836f22cf22b61e4229b556c91e Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 16 Feb 2011 16:44:02 -0800 Subject: [PATCH] Use simple relative object and verb references --- lib/activity.php | 5 ++++- lib/activityobject.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/activity.php b/lib/activity.php index e6fefca28f..e1d5e25e5e 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -383,7 +383,10 @@ class Activity // updatedTime <-- should we use? spec says activity MAY have this // verb - $activity['verb'] = $this->verb; + // + // We can probably use the whole schema URL here but probably the + // relative simple name is easier to parse + $activity['verb'] = substr($this->verb, strrpos($this->verb, '/') + 1); // TODO: extensions (ActivityContext, OStatus stuff, etc.) diff --git a/lib/activityobject.php b/lib/activityobject.php index 17753f0df4..7847a5d640 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -683,7 +683,10 @@ class ActivityObject } // objectType - $object['type'] = $this->type; + // + // We can probably use the whole schema URL here but probably the + // relative simple name is easier to parse + $object['type'] = substr($this->type, strrpos($this->type, '/') + 1); // summary $object['summary'] = $this->summary; -- 2.39.2