]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/attachment.php
Some files got updated coding style
[quix0rs-gnu-social.git] / actions / attachment.php
index 45aa78728a2510d08182371950e2e0f66112cc9d..b532b81d88438ddbf5a91b3a5e854129137531fb 100644 (file)
@@ -60,18 +60,17 @@ class AttachmentAction extends Action
      * @return success flag
      */
 
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
 
         if ($id = $this->trimmed('attachment')) {
-            $this->attachment = File::staticGet($id);
+            $this->attachment = File::getKV($id);
         }
 
         if (empty($this->attachment)) {
             // TRANS: Client error displayed trying to get a non-existing attachment.
             $this->clientError(_('No such attachment.'), 404);
-            return false;
         }
         return true;
     }
@@ -124,13 +123,11 @@ class AttachmentAction extends Action
      *
      * 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)) {
 
@@ -143,15 +140,6 @@ class AttachmentAction extends Action
         }
     }
 
-    /**
-     * Don't show local navigation
-     *
-     * @return void
-     */
-    function showLocalNavBlock()
-    {
-    }
-
     /**
      * Fill the content area of the page
      *
@@ -182,7 +170,9 @@ class AttachmentAction extends Action
     function showSections() {
         $ns = new AttachmentNoticeSection($this);
         $ns->show();
-        $atcs = new AttachmentTagCloudSection($this);
-        $atcs->show();
+        if (!common_config('performance', 'high')) {
+            $atcs = new AttachmentTagCloudSection($this);
+            $atcs->show();
+        }
     }
 }