* @return success flag
*/
- function prepare($args)
+ protected function prepare(array $args=array())
{
parent::prepare($args);
return $a->title();
}
- function extraHead()
- {
- $this->element('link',array('rel'=>'alternate',
- 'type'=>'application/json+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'json', 'url'=>
- common_local_url('attachment',
- array('attachment' => $this->attachment->id)))),
- 'title'=>'oEmbed'),null);
- $this->element('link',array('rel'=>'alternate',
- 'type'=>'text/xml+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'xml','url'=>
- common_local_url('attachment',
- array('attachment' => $this->attachment->id)))),
- 'title'=>'oEmbed'),null);
- }
-
/**
* Handle input
*
* Only handles get, so just show the page.
*
- * @param array $args $_REQUEST data (unused)
- *
* @return void
*/
- function handle($args)
+ protected function handle()
{
- parent::handle($args);
+ parent::handle();
if (empty($this->attachment->filename)) {
-
// if it's not a local file, gtfo
-
common_redirect($this->attachment->url, 303);
-
- } else {
- $this->showPage();
}
+
+ $this->showPage();
}
/**