function prepare($args)
{
+ // If we die, show short error messages.
+ StatusNet::setApi(true);
+
parent::prepare($args);
+
+ $cur = common_current_user();
+ if (!$cur) {
+ throw new ClientException('Access forbidden', true);
+ }
$this->groups=array();
$this->users=array();
$q = $this->arg('q');
print json_encode($result) . "\n";
}
}
+
+ /**
+ * Is this action read-only?
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+ function isReadOnly($args)
+ {
+ return true;
+ }
}