浏览代码

bugfix similar to kerioEmail (same gui)

andre 1 年之前
父节点
当前提交
e8b791b1ae

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

@@ -93,11 +93,6 @@ class Router
             return false;
         }
 
-        if (!is_callable([$this->controllerClass, $this->controllerMethod]))
-        {
-            return false;
-        }
-
         return true;
     }
 }

+ 2 - 2
core/Http/View/Smarty.php

@@ -18,12 +18,12 @@ class Smarty
     private $templateDIR;
     private $lang;
 
-    final private function __construct()
+    private function __construct()
     {
         $this->smarty = new \Smarty();
     }
 
-    final private function __clone()
+    private function __clone()
     {
         
     }

+ 1 - 1
core/UI/MainContainer.php

@@ -30,7 +30,7 @@ class MainContainer extends Container
         $this->prepareElemnentsContainers();
     }
 
-    public function addElement($element, $containerName = null)
+    public function addElement($element = null, $containerName = null)
     {
         if (is_string($element))
         {

+ 1 - 1
core/UI/MainContainerAjax.php

@@ -38,7 +38,7 @@ class MainContainerAjax extends MainContainer
         return $this;
     }
 
-    public function addElement($element)
+    public function addElement($element = null, $containerName = null)
     {
         if (is_string($element))
         {

+ 2 - 2
core/UI/Traits/ContainerElements.php

@@ -52,7 +52,7 @@ trait ContainerElements
 
         $this->addElementToContainer($element, $containerName);
 
-        if (!$element->wasInitialized() && $this->getRequestValue(ajax) == 1)
+        if (!$element->wasInitialized() && $this->getRequestValue("ajax") == 1)
         {
             $element->runInitContentProcess();
         }
@@ -233,7 +233,7 @@ trait ContainerElements
     {
         if (!$containerName)
         {
-            return count($this->elements) > 0;
+            return count((array)$this->elements) > 0;
         }
         
         if (in_array($containerName, $this->elementsContainers) && property_exists($this, $containerName))

+ 1 - 1
core/UI/ViewAjax.php

@@ -22,7 +22,7 @@ class ViewAjax extends View
     /**
      * Adds elements to the root element
      */
-    public function addElement($element)
+    public function addElement($element, $containerName = null)
     {
         return $this;
     }

+ 5 - 5
core/UI/Widget/DataTable/DataTable.php

@@ -93,7 +93,7 @@ class DataTable extends BaseContainer implements \ModulesGarden\Servers\ZimbraEm
         
     }
 
-    public function setName($name)
+    public function setName($name = null)
     {
         $this->name = $name;
         return $this;
@@ -126,7 +126,7 @@ class DataTable extends BaseContainer implements \ModulesGarden\Servers\ZimbraEm
         return $this;
     }
 
-    public function setData(\ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\DataSetInterface $data)
+    public function setData($data = [])
     {
         $this->recordsSet = $data;
         
@@ -135,7 +135,7 @@ class DataTable extends BaseContainer implements \ModulesGarden\Servers\ZimbraEm
 
     protected function getCount()
     {
-        return count($this->recordsSet->records);
+        return count($this->recordsSet);
     }
 
     protected function getRecords()
@@ -169,9 +169,9 @@ class DataTable extends BaseContainer implements \ModulesGarden\Servers\ZimbraEm
             return false;
         }
 
-        foreach ($this->recordsSet->records as $key => $row)
+        foreach ($this->recordsSet as $key => $row)
         {
-            $this->recordsSet->records[$key] = $this->replaceRowData($row, $replacementFunctions);
+            $this->recordsSet[$key] = $this->replaceRowData($row, $replacementFunctions);
         }
     }
 

+ 1 - 1
core/UI/Widget/Sidebar/SidebarItem.php

@@ -48,7 +48,7 @@ class SidebarItem extends BaseContainer
         return $this->id;
     }
 
-    public function setId($id)
+    public function setId($id = null)
     {
         $this->id = $id;
 

+ 1 - 1
vendor/symfony/http-foundation/HeaderBag.php

@@ -60,7 +60,7 @@ class HeaderBag implements \IteratorAggregate, \Countable
      *
      * @return array An array of headers
      */
-    public function all()
+    public function all(string $key = null)
     {
         return $this->headers;
     }

+ 1 - 1
vendor/symfony/http-foundation/ResponseHeaderBag.php

@@ -88,7 +88,7 @@ class ResponseHeaderBag extends HeaderBag
     /**
      * {@inheritdoc}
      */
-    public function all()
+    public function all(string $key = null)
     {
         $headers = parent::all();
         foreach ($this->getCookies() as $cookie) {

+ 6 - 4
zimbraEmail_mx.php

@@ -189,10 +189,12 @@ function ZimbraEmailCheckDNS($params)
         $vars['multiMX'] = FALSE;
     }
     $vars['selfDNS'] = FALSE;
-    for($i=$clientDomains['startnumber'];$i<=$clientDomains['numreturned'];$i++) {
-        if($params['domain'] == $clientDomains['domains']['domain'][$i]['domainname']) {
-            $vars['selfDNS'] = TRUE;
-            $vars['domainId'] = $clientDomains['domains']['domain'][$i]['id'];
+    if(!empty($clientDomains['domains'])) {
+        for($i=$clientDomains['startnumber'];$i<=$clientDomains['numreturned'];$i++) {
+            if($params['domain'] == $clientDomains['domains']['domain'][$i]['domainname']) {
+                $vars['selfDNS'] = TRUE;
+                $vars['domainId'] = $clientDomains['domains']['domain'][$i]['id'];
+            }
         }
     }
     if(empty($domainMX)){