浏览代码

enable logging

andre 1 年之前
父节点
当前提交
5514172407
共有 2 个文件被更改,包括 27 次插入9 次删除
  1. 0 9
      core/App/Controllers/Instances/HttpController.php
  2. 27 0
      core/App/Controllers/Router.php

+ 0 - 9
core/App/Controllers/Instances/HttpController.php

@@ -49,15 +49,6 @@ abstract class HttpController implements DefaultController
     public function execute($params = null)
     {
         $this->setParams($params);
-
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $this->router->isControllerCallable(),
-            'Debug Controller',
-            $this->isAdminContextValid()
-        );
-
         if (!$this->router->isControllerCallable() || !$this->isAdminContextValid())
         {
             return $this->controllerResult = $this->getPageNotFound();

+ 27 - 0
core/App/Controllers/Router.php

@@ -85,16 +85,43 @@ class Router
     {
         if (!class_exists($this->controllerClass))
         {
+            
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                $this->controllerClass,
+                'Debug class_exists',
+                class_exists($this->controllerClass)
+            );
+
             return false;
         }
 
         if (!method_exists($this->controllerClass, $this->controllerMethod))
         {
+            
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                $this->controllerMethod,
+                'Debug method_exists',
+                method_exists($this->controllerClass, $this->controllerMethod)
+            );
+    
             return false;
         }
 
         if (!is_callable([$this->controllerClass, $this->controllerMethod]))
         {
+            
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                [$this->controllerClass, $this->controllerMethod],
+                'Debug Controller',
+                is_callable([$this->controllerClass, $this->controllerMethod])
+            );
+    
             return false;
         }