]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/attachment.php
Removed 'bookmarklet' since we have Bookmark plugin
[quix0rs-gnu-social.git] / actions / attachment.php
index 56ecceb860e00cd31e51816abbbd43fa66fb8afc..d9cacb11931d560ddb662e00f365b7fd8032e5c2 100644 (file)
@@ -60,7 +60,7 @@ class AttachmentAction extends Action
      * @return success flag
      */
 
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -96,50 +96,23 @@ class AttachmentAction extends Action
         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();
     }
 
     /**