From af93754ec99d8748677dc2cfd92137a8698a90fa Mon Sep 17 00:00:00 2001
From: Frédéric Guillot <fred@kanboard.net>
Date: Sat, 15 Nov 2014 18:42:49 -0500
Subject: Attach events only for board controller

---
 app/Controller/Base.php | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'app')

diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 06e35e03..b0252ecb 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -101,6 +101,16 @@ abstract class Base
         $this->template = new Template;
     }
 
+    /**
+     * Destructor
+     *
+     * @access public
+     */
+    public function __destruct()
+    {
+        // $this->container['logger']->addDebug(var_export($this->container['db']->getLogMessages(), true));
+    }
+
     /**
      * Load automatically models
      *
@@ -151,7 +161,9 @@ abstract class Base
         }
 
         // Attach events
-        $this->attachEvents();
+        if ($controller === 'board') {
+            $this->attachEvents();
+        }
     }
 
     /**
-- 
cgit v1.2.3