*
* @return boolean true
*/
-
+
function isReadOnly($args)
{
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
$xml = trim(file_get_contents('php://input'));
if (empty($xml)) {
+ // TRANS: Client error displayed attempting to post an empty API notice.
$this->clientError(_('Atom post must not be empty.'));
}
$dom = DOMDocument::loadXML($xml);
if (!$dom) {
+ // TRANS: Client error displayed attempting to post an API that is not well-formed XML.
$this->clientError(_('Atom post must be well-formed XML.'));
}
} else {
// @fixme fetch from $sourceUrl?
// TRANS: Client error displayed when posting a notice without content through the API.
+ // TRANS: %d is the notice ID (number).
$this->clientError(sprintf(_('No content for notice %d.'),
$note->id));
return;
$options['groups'] = $uri;
} else {
// @fixme: hook for discovery here
- common_log(LOG_WARNING, sprintf(_('AtomPub post with unknown attention URI %s'), $uri));
+ common_log(LOG_WARNING, sprintf('AtomPub post with unknown attention URI %s', $uri));
}
}
}