]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/attachment.php
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
[quix0rs-gnu-social.git] / actions / attachment.php
index b9187ff0810d470254f9887da074a8c4083ca06f..16ee723d96bb35c000008b64f0d8ee13a19cc786 100644 (file)
@@ -31,8 +31,6 @@ if (!defined('LACONICA')) {
     exit(1);
 }
 
-//require_once INSTALLDIR.'/lib/personalgroupnav.php';
-//require_once INSTALLDIR.'/lib/feedlist.php';
 require_once INSTALLDIR.'/lib/attachmentlist.php';
 
 /**
@@ -67,11 +65,11 @@ class AttachmentAction extends Action
     {
         parent::prepare($args);
 
-        $id = $this->arg('attachment');
-
-        $this->attachment = File::staticGet($id);
+        if ($id = $this->trimmed('attachment')) {
+            $this->attachment = File::staticGet($id);
+        }
 
-        if (!$this->attachment) {
+        if (empty($this->attachment)) {
             $this->clientError(_('No such attachment.'), 404);
             return false;
         }
@@ -178,10 +176,8 @@ class AttachmentAction extends Action
 
     function showContent()
     {
-        $this->elementStart('ul', array('class' => 'attachments'));
         $ali = new Attachment($this->attachment, $this);
         $cnt = $ali->show();
-        $this->elementEnd('ul');
     }
 
     /**