exit(1);
}
-require_once INSTALLDIR . '/lib/apiauth.php';
-
/**
* Feed of group memberships for a user, in ActivityStreams format
*
$profileId = $this->trimmed('profile');
- $this->_profile = Profile::staticGet('id', $profileId);
+ $this->_profile = Profile::getKV('id', $profileId);
if (empty($this->_profile)) {
// TRANS: Client exception.
if ($activity->verb != ActivityVerb::JOIN) {
// TRANS: Client error displayed when not using the join verb.
throw new ClientException(_('Can only handle join activities.'));
- return;
}
$groupObj = $activity->objects[0];
if ($groupObj->type != ActivityObject::GROUP) {
- // TRANS: Client exception thrown when trying favorite an object that is not a notice.
- throw new ClientException(_('Can only fave notices.'));
- return;
+ // TRANS: Client exception thrown when trying to join something which is not a group
+ throw new ClientException(_('Can only join groups.'));
}
- $group = User_group::staticGet('uri', $groupObj->id);
+ $group = User_group::getKV('uri', $groupObj->id);
if (empty($group)) {
// XXX: import from listed URL or something
*
* @return boolean is read only action?
*/
- function isReadOnly($args)
+ function isReadOnly(array $args=array())
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
$_SERVER['REQUEST_METHOD'] == 'HEAD') {