X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Foembed.php;h=0d8be55656a0899c80cd0ac6d87c654a468a245f;hb=59a0b2a82da418f688faf182407146d9e7a7af7a;hp=09d68a446e58945fb425242e5d925b0eb3f4094c;hpb=834acaaa794254dfb9dc7e57dab498001d975d11;p=quix0rs-gnu-social.git diff --git a/actions/oembed.php b/actions/oembed.php index 09d68a446e..0d8be55656 100644 --- a/actions/oembed.php +++ b/actions/oembed.php @@ -61,7 +61,7 @@ class OembedAction extends Action $proxy_args = $r->map($path); if (!$proxy_args) { - $this->serverError(_("$path not found."), 404); + $this->serverError(sprintf(_('"%s" not found.'),$path), 404); } $oembed=array(); $oembed['version']='1.0'; @@ -73,7 +73,7 @@ class OembedAction extends Action $id = $proxy_args['notice']; $notice = Notice::staticGet($id); if(empty($notice)){ - $this->serverError(_("Notice $id not found."), 404); + $this->serverError(sprintf(_("Notice %s not found."),$id), 404); } $profile = $notice->getProfile(); if (empty($profile)) { @@ -92,7 +92,7 @@ class OembedAction extends Action $id = $proxy_args['attachment']; $attachment = File::staticGet($id); if(empty($attachment)){ - $this->serverError(_("Attachment $id not found."), 404); + $this->serverError(sprintf(_('Attachment %s not found.'),$id), 404); } if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){ // Proxy the existing oembed information @@ -133,7 +133,7 @@ class OembedAction extends Action if($attachment->title) $oembed['title']=$attachment->title; break; default: - $this->serverError(_("$path not supported for oembed requests."), 501); + $this->serverError(sprintf(_('"%s" not supported for oembed requests.'),$path), 501); } switch($args['format']){ case 'xml': @@ -215,4 +215,15 @@ class OembedAction extends Action return; } + /** + * Is this action read-only? + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + function isReadOnly($args) + { + return true; + } }