$this->original = Notice::staticGet('id', $id);
if (empty($this->original)) {
- $this->clientError(_('No such notice'),
+ $this->clientError(_('No such notice.'),
400, $this->format);
return false;
}
$this->user = $this->auth_user;
if ($this->user->id == $notice->profile_id) {
- $this->clientError(_('Cannot repeat your own notice'));
+ $this->clientError(_('Cannot repeat your own notice.'));
400, $this->format);
return false;
}
$profile = $this->user->getProfile();
if ($profile->hasRepeated($id)) {
- $this->clientError(_('Already repeated that notice'),
+ $this->clientError(_('Already repeated that notice.'),
400, $this->format);
return false;
}
$this->original = Notice::staticGet('id', $id);
if (empty($this->original)) {
- $this->clientError(_('No such notice'),
+ $this->clientError(_('No such notice.'),
400, $this->format);
return false;
}
parent::prepare($args);
$this->id = $this->trimmed('notice');
if (empty($this->id)) {
- $this->clientError(_('No notice id'));
+ $this->clientError(_('No notice ID.'));
}
$notice = Notice::staticGet('id', $this->id);
if (empty($notice)) {
- $this->clientError(_('No notice'));
+ $this->clientError(_('No notice.'));
}
$atts = $notice->attachments();
if (empty($atts)) {
- $this->clientError(_('No attachments'));
+ $this->clientError(_('No attachments.'));
}
foreach ($atts as $att) {
if (!empty($att->filename)) {
}
}
if (empty($this->filerec)) {
- $this->clientError(_('No uploaded attachments'));
+ $this->clientError(_('No uploaded attachments.'));
}
return true;
}
}
if (!$nickname) {
- $this->clientError(_('No nickname'), 404);
+ $this->clientError(_('No nickname.'), 404);
return false;
}
$this->group = User_group::staticGet('nickname', $nickname);
if (!$this->group) {
- $this->clientError(_('No such group'), 404);
+ $this->clientError(_('No such group.'), 404);
return false;
}
{
parent::prepare($args);
if (!common_logged_in()) {
- $this->clientError(_('Not logged in'), 403);
+ $this->clientError(_('Not logged in.'), 403);
return false;
}
$id = $this->trimmed('id');
if (!$id) {
- $this->clientError(_('No id argument.'));
+ $this->clientError(_('No ID argument.'));
return false;
}
{
/**
* Is read only?
- *
+ *
* @return boolean true
*/
function isReadOnly($args)
- {
+ {
return true;
}
/**
* Class handler.
- *
+ *
* @param array $args array of arguments
*
* @return nothing
parent::handle($args);
$id = $this->trimmed('id');
if (!$id) {
- $this->clientError(_('No id.'));
+ $this->clientError(_('No ID.'));
}
$user = User::staticGet($id);
if (!$user) {
common_redirect($url, 303);
}
}
-
if ($action) {
common_redirect(common_local_url($action, $args), 303);
} else {
- $this->clientError(_("No return-to arguments"));
+ $this->clientError(_("No return-to arguments."));
}
}
function handlePost()
{
- $this->serverError(_("unimplemented method"));
+ $this->serverError(_("Unimplemented method."));
}
}
$response = $this->generateDenyResponse($request);
} else {
//invalid
- $this->clientError(sprintf(_m('You are not authorized to use the identity %s'),$request->identity),$code=403);
+ $this->clientError(sprintf(_m('You are not authorized to use the identity %s.'),$request->identity),$code=403);
}
} else {
$response = $this->oserver->handleRequest($request);
// verify that user is admin
if (!($user->id == 1))
- $this->clientError(_('only User #1 can update the template'), $code = 401);
+ $this->clientError(_('Only User #1 can update the template.'), $code = 401);
// open the old template
$tpl_file = $this->templateFolder() . '/index.html';