]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/attachment_thumbnail.php
We only allow (and have) MIME types in supported list
[quix0rs-gnu-social.git] / actions / attachment_thumbnail.php
index 7add8e278da5cb1cf3e54baebc7e103ec8ea3402..a90f8fd5f8aac8c7a3746ecb24deb3b763e8f7be 100644 (file)
@@ -27,7 +27,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -42,10 +42,8 @@ require_once INSTALLDIR.'/actions/attachment.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class Attachment_thumbnailAction extends AttachmentAction
 {
-
     function handle($args)
     {
         $this->showPage();
@@ -73,12 +71,10 @@ class Attachment_thumbnailAction extends AttachmentAction
      */
     function showCore()
     {
-        $file_thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
+        $file_thumbnail = File_thumbnail::getKV('file_id', $this->attachment->id);
         if (empty($file_thumbnail->url)) {
             return;
         }
         $this->element('img', array('src' => $file_thumbnail->url, 'alt' => 'Thumbnail'));
     }
-
 }
-