From 8328d0643eaadd30fb969f51cf51a96f622a459d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 18 Nov 2013 13:30:58 -0500
Subject: [PATCH] Code improvements and some unification with browser detection code in javascript

---
 plugins/database_attachments/database_attachments.php |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php
index 47e2b52..5ec3514 100644
--- a/plugins/database_attachments/database_attachments.php
+++ b/plugins/database_attachments/database_attachments.php
@@ -13,7 +13,9 @@
  * @author Aleksander Machniak <alec@alec.pl>
  * @version @package_version@
  */
-require_once('plugins/filesystem_attachments/filesystem_attachments.php');
+
+require_once INSTALL_PATH . 'plugins/filesystem_attachments/filesystem_attachments.php';
+
 class database_attachments extends filesystem_attachments
 {
     // Cache object
@@ -84,14 +86,10 @@
      */
     function remove($args)
     {
-        $args['status'] = false;
-
         $cache  = $this->get_cache();
         $status = $cache->remove($args['id']);
 
-        if ($status) {
-            $args['status'] = true;
-        }
+        $args['status'] = true;
 
         return $args;
     }

--
Gitblit v1.9.1