Browse Source

Merge branch 'noDownGrade' of andre/whmcsZimbraSingle into master

andre 4 năm trước cách đây
mục cha
commit
708c3b13f7

+ 110 - 0
Doc/files/zimbraaddressavailable.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>Documentation</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <base href="../">
+    <link rel="icon" href="images/favicon.ico"/>
+    <link rel="stylesheet" href="css/normalize.css">
+    <link rel="stylesheet" href="css/base.css">
+            <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
+        <link rel="stylesheet" href="css/template.css">
+        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
+                <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
+        <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/js/all.min.js" integrity="sha256-0vuk8LXoyrmCjp1f0O300qo1M75ZQyhH9X3J6d+scmk=" crossorigin="anonymous"></script>
+        <script src="js/search.js"></script>
+        <script defer src="js/searchIndex.js"></script>
+    </head>
+<body id="top">
+    <header class="phpdocumentor-header phpdocumentor-section">
+    <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
+    <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
+    <label class="phpdocumentor-header__menu-icon" for="menu-button">
+        <i class="fas fa-bars"></i>
+    </label>
+    <section data-search-form class="phpdocumentor-search">
+    <label>
+        <span class="visually-hidden">Search for</span>
+        <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+            <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
+            <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
+        </svg>
+        <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
+    </label>
+</section>
+
+    <nav class="phpdocumentor-topnav">
+    <ul class="phpdocumentor-topnav__menu">
+        </ul>
+</nav>
+</header>
+
+    <main class="phpdocumentor">
+        <div class="phpdocumentor-section">
+            <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
+<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
+    Menu
+</label>
+<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
+    
+    <section class="phpdocumentor-sidebar__category">
+        <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
+                                <h3 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/default.html"><abbr title="\">Global</abbr></a></h3>
+                                    </section>
+
+    
+    <section class="phpdocumentor-sidebar__category">
+        <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
+                <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
+        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
+        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
+    </section>
+
+    <section class="phpdocumentor-sidebar__category">
+        <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
+        <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
+    </section>
+</aside>
+
+            <div class="phpdocumentor-column -eight phpdocumentor-content">
+                    <ul class="phpdocumentor-breadcrumbs">
+            <li class="phpdocumentor-breadcrumb"><a href="packages/Default.html">Default</a></li>
+    </ul>
+
+    <article class="phpdocumentor-element -file">
+        <h2 class="phpdocumentor-content__title">zimbraAddressAvailable.php</h2>
+
+        
+
+
+
+
+
+        
+
+        
+    </article>
+                <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
+    <section class="phpdocumentor-search-results__dialog">
+        <header class="phpdocumentor-search-results__header">
+            <h2 class="phpdocumentor-search-results__title">Search results</h2>
+            <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
+        </header>
+        <section class="phpdocumentor-search-results__body">
+            <ul class="phpdocumentor-search-results__entries"></ul>
+        </section>
+    </section>
+</section>
+            </div>
+        </div>
+        <a href="files/zimbraaddressavailable.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
+
+    </main>
+
+    <script>
+        cssVars({});
+    </script>
+</body>
+</html>

+ 57 - 13
Doc/files/zimbrasingle.html

@@ -184,6 +184,13 @@
 </dt>
 </dt>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 
 
+            <dt class="phpdocumentor-table-of-contents__entry -function -">
+    <a href="namespaces/default.html#function_zimbraSingleUpdateQuota">zimbraSingleUpdateQuota()</a>
+    <span>
+                        &nbsp;: mixed    </span>
+</dt>
+<dd>Perform an update of customfields to prevent downgrades.</dd>
+
     </dl>
     </dl>
 
 
 
 
@@ -247,7 +254,7 @@
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">61</span>
+    <span class="phpdocumentor-element-found-in__line">60</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">server side password check</p>
         <p class="phpdocumentor-summary">server side password check</p>
@@ -285,7 +292,7 @@ in case that the client side check has been disabled</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">94</span>
+    <span class="phpdocumentor-element-found-in__line">93</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define module related meta data.</p>
         <p class="phpdocumentor-summary">Define module related meta data.</p>
@@ -326,7 +333,7 @@ settings.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">123</span>
+    <span class="phpdocumentor-element-found-in__line">122</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
@@ -383,7 +390,7 @@ existing server.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">175</span>
+    <span class="phpdocumentor-element-found-in__line">174</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
@@ -455,7 +462,7 @@ template or they will not be visible to the end user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">218</span>
+    <span class="phpdocumentor-element-found-in__line">222</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Usage Update</p>
         <p class="phpdocumentor-summary">Usage Update</p>
@@ -508,7 +515,7 @@ Run Manually: /admin/reports.php?report=disk_usage_summary&amp;action=updatestat
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">301</span>
+    <span class="phpdocumentor-element-found-in__line">304</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
@@ -564,7 +571,7 @@ active status.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">349</span>
+    <span class="phpdocumentor-element-found-in__line">352</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
@@ -623,7 +630,7 @@ configuration, this can be any of:</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">453</span>
+    <span class="phpdocumentor-element-found-in__line">451</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
@@ -677,7 +684,7 @@ user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">494</span>
+    <span class="phpdocumentor-element-found-in__line">492</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
@@ -731,7 +738,7 @@ can be called manually by admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">534</span>
+    <span class="phpdocumentor-element-found-in__line">532</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
@@ -784,7 +791,7 @@ overdue products if enabled, or requested manually by an admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">592</span>
+    <span class="phpdocumentor-element-found-in__line">590</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
@@ -840,7 +847,7 @@ products and configurable options.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">658</span>
+    <span class="phpdocumentor-element-found-in__line">664</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
@@ -891,7 +898,7 @@ Calls a function to create all necessary customfields for the order form using t
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">735</span>
+    <span class="phpdocumentor-element-found-in__line">747</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
@@ -935,6 +942,43 @@ Calls a function to create all necessary customfields for the order form using t
                         </dl>
                         </dl>
 
 
     
     
+</article>
+                    <article class="phpdocumentor-element -function - ">
+    <h4 class="phpdocumentor-element__name" id="function_zimbraSingleUpdateQuota">
+        zimbraSingleUpdateQuota()
+        <a href="namespaces/default.html#function_zimbraSingleUpdateQuota" class="headerlink"><i class="fas fa-link"></i></a>
+    </h4>
+    <aside class="phpdocumentor-element-found-in">
+    <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
+    :
+    <span class="phpdocumentor-element-found-in__line">813</span>
+</aside>
+
+        <p class="phpdocumentor-summary">Perform an update of customfields to prevent downgrades.</p>
+
+    <code class="phpdocumentor-code phpdocumentor-signature ">
+    <span class="phpdocumentor-signature__visibility"></span>
+                <span class="phpdocumentor-signature__name">zimbraSingleUpdateQuota</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$params</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
+
+        <section class="phpdocumentor-description"><p>Called in changePackage or createAccount functions.</p>
+</section>
+
+        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
+    <dl class="phpdocumentor-argument-list">
+                    <dt class="phpdocumentor-argument-list__entry">
+                <span class="phpdocumentor-signature__argument__name">$params</span>
+                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
+                            </dt>
+            <dd class="phpdocumentor-argument-list__definition">
+                    <section class="phpdocumentor-description"><p>common module parameters</p>
+</section>
+
+            </dd>
+            </dl>
+
+    
+
+    
 </article>
 </article>
             </section>
             </section>
 
 

+ 57 - 13
Doc/index.html

@@ -180,6 +180,13 @@
 </dt>
 </dt>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 
 
+            <dt class="phpdocumentor-table-of-contents__entry -function -">
+    <a href="namespaces/default.html#function_zimbraSingleUpdateQuota">zimbraSingleUpdateQuota()</a>
+    <span>
+                        &nbsp;: mixed    </span>
+</dt>
+<dd>Perform an update of customfields to prevent downgrades.</dd>
+
     </dl>
     </dl>
 
 
     
     
@@ -242,7 +249,7 @@
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">61</span>
+    <span class="phpdocumentor-element-found-in__line">60</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">server side password check</p>
         <p class="phpdocumentor-summary">server side password check</p>
@@ -280,7 +287,7 @@ in case that the client side check has been disabled</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">94</span>
+    <span class="phpdocumentor-element-found-in__line">93</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define module related meta data.</p>
         <p class="phpdocumentor-summary">Define module related meta data.</p>
@@ -321,7 +328,7 @@ settings.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">123</span>
+    <span class="phpdocumentor-element-found-in__line">122</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
@@ -378,7 +385,7 @@ existing server.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">175</span>
+    <span class="phpdocumentor-element-found-in__line">174</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
@@ -450,7 +457,7 @@ template or they will not be visible to the end user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">218</span>
+    <span class="phpdocumentor-element-found-in__line">222</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Usage Update</p>
         <p class="phpdocumentor-summary">Usage Update</p>
@@ -503,7 +510,7 @@ Run Manually: /admin/reports.php?report=disk_usage_summary&amp;action=updatestat
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">301</span>
+    <span class="phpdocumentor-element-found-in__line">304</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
@@ -559,7 +566,7 @@ active status.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">349</span>
+    <span class="phpdocumentor-element-found-in__line">352</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
@@ -618,7 +625,7 @@ configuration, this can be any of:</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">453</span>
+    <span class="phpdocumentor-element-found-in__line">451</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
@@ -672,7 +679,7 @@ user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">494</span>
+    <span class="phpdocumentor-element-found-in__line">492</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
@@ -726,7 +733,7 @@ can be called manually by admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">534</span>
+    <span class="phpdocumentor-element-found-in__line">532</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
@@ -779,7 +786,7 @@ overdue products if enabled, or requested manually by an admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">592</span>
+    <span class="phpdocumentor-element-found-in__line">590</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
@@ -835,7 +842,7 @@ products and configurable options.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">658</span>
+    <span class="phpdocumentor-element-found-in__line">664</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
@@ -886,7 +893,7 @@ Calls a function to create all necessary customfields for the order form using t
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">735</span>
+    <span class="phpdocumentor-element-found-in__line">747</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
@@ -930,6 +937,43 @@ Calls a function to create all necessary customfields for the order form using t
                         </dl>
                         </dl>
 
 
     
     
+</article>
+                    <article class="phpdocumentor-element -function - ">
+    <h4 class="phpdocumentor-element__name" id="function_zimbraSingleUpdateQuota">
+        zimbraSingleUpdateQuota()
+        <a href="namespaces/default.html#function_zimbraSingleUpdateQuota" class="headerlink"><i class="fas fa-link"></i></a>
+    </h4>
+    <aside class="phpdocumentor-element-found-in">
+    <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
+    :
+    <span class="phpdocumentor-element-found-in__line">813</span>
+</aside>
+
+        <p class="phpdocumentor-summary">Perform an update of customfields to prevent downgrades.</p>
+
+    <code class="phpdocumentor-code phpdocumentor-signature ">
+    <span class="phpdocumentor-signature__visibility"></span>
+                <span class="phpdocumentor-signature__name">zimbraSingleUpdateQuota</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$params</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
+
+        <section class="phpdocumentor-description"><p>Called in changePackage or createAccount functions.</p>
+</section>
+
+        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
+    <dl class="phpdocumentor-argument-list">
+                    <dt class="phpdocumentor-argument-list__entry">
+                <span class="phpdocumentor-signature__argument__name">$params</span>
+                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
+                            </dt>
+            <dd class="phpdocumentor-argument-list__definition">
+                    <section class="phpdocumentor-description"><p>common module parameters</p>
+</section>
+
+            </dd>
+            </dl>
+
+    
+
+    
 </article>
 </article>
             </section>
             </section>
 
 

+ 1 - 0
Doc/indices/files.html

@@ -73,6 +73,7 @@
     <h2>Files</h2>
     <h2>Files</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h3>Z</h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <h3>Z</h3>
         <ul class="phpdocumentor-list">
         <ul class="phpdocumentor-list">
+                    <li><a href="files/zimbraaddressavailable.html"><abbr title="zimbraAddressAvailable.php">zimbraAddressAvailable.php</abbr></a></li>
                     <li><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></li>
                     <li><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></li>
                 </ul>
                 </ul>
                             <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
                             <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">

+ 5 - 0
Doc/js/searchIndex.js

@@ -70,6 +70,11 @@ Search.appendIndex(
             "name": "zimbraSingle_ServiceSingleSignOn",
             "name": "zimbraSingle_ServiceSingleSignOn",
             "summary": "Perform\u0020single\u0020sign\u002Don\u0020for\u0020a\u0020given\u0020instance\u0020of\u0020a\u0020product\/service.",
             "summary": "Perform\u0020single\u0020sign\u002Don\u0020for\u0020a\u0020given\u0020instance\u0020of\u0020a\u0020product\/service.",
             "url": "namespaces/default.html#function_zimbraSingle_ServiceSingleSignOn"
             "url": "namespaces/default.html#function_zimbraSingle_ServiceSingleSignOn"
+        },                {
+            "fqsen": "\\zimbraSingleUpdateQuota\u0028\u0029",
+            "name": "zimbraSingleUpdateQuota",
+            "summary": "Perform\u0020an\u0020update\u0020of\u0020customfields\u0020to\u0020prevent\u0020downgrades.",
+            "url": "namespaces/default.html#function_zimbraSingleUpdateQuota"
         },                {
         },                {
             "fqsen": "\\",
             "fqsen": "\\",
             "name": "\\",
             "name": "\\",

+ 57 - 13
Doc/namespaces/default.html

@@ -183,6 +183,13 @@
 </dt>
 </dt>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 
 
+            <dt class="phpdocumentor-table-of-contents__entry -function -">
+    <a href="namespaces/default.html#function_zimbraSingleUpdateQuota">zimbraSingleUpdateQuota()</a>
+    <span>
+                        &nbsp;: mixed    </span>
+</dt>
+<dd>Perform an update of customfields to prevent downgrades.</dd>
+
     </dl>
     </dl>
 
 
         
         
@@ -245,7 +252,7 @@
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">61</span>
+    <span class="phpdocumentor-element-found-in__line">60</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">server side password check</p>
         <p class="phpdocumentor-summary">server side password check</p>
@@ -283,7 +290,7 @@ in case that the client side check has been disabled</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">94</span>
+    <span class="phpdocumentor-element-found-in__line">93</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define module related meta data.</p>
         <p class="phpdocumentor-summary">Define module related meta data.</p>
@@ -324,7 +331,7 @@ settings.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">123</span>
+    <span class="phpdocumentor-element-found-in__line">122</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
@@ -381,7 +388,7 @@ existing server.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">175</span>
+    <span class="phpdocumentor-element-found-in__line">174</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
@@ -453,7 +460,7 @@ template or they will not be visible to the end user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">218</span>
+    <span class="phpdocumentor-element-found-in__line">222</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Usage Update</p>
         <p class="phpdocumentor-summary">Usage Update</p>
@@ -506,7 +513,7 @@ Run Manually: /admin/reports.php?report=disk_usage_summary&amp;action=updatestat
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">301</span>
+    <span class="phpdocumentor-element-found-in__line">304</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
@@ -562,7 +569,7 @@ active status.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">349</span>
+    <span class="phpdocumentor-element-found-in__line">352</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
@@ -621,7 +628,7 @@ configuration, this can be any of:</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">453</span>
+    <span class="phpdocumentor-element-found-in__line">451</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
@@ -675,7 +682,7 @@ user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">494</span>
+    <span class="phpdocumentor-element-found-in__line">492</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
@@ -729,7 +736,7 @@ can be called manually by admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">534</span>
+    <span class="phpdocumentor-element-found-in__line">532</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
@@ -782,7 +789,7 @@ overdue products if enabled, or requested manually by an admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">592</span>
+    <span class="phpdocumentor-element-found-in__line">590</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
@@ -838,7 +845,7 @@ products and configurable options.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">658</span>
+    <span class="phpdocumentor-element-found-in__line">664</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
@@ -889,7 +896,7 @@ Calls a function to create all necessary customfields for the order form using t
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">735</span>
+    <span class="phpdocumentor-element-found-in__line">747</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
@@ -933,6 +940,43 @@ Calls a function to create all necessary customfields for the order form using t
                         </dl>
                         </dl>
 
 
     
     
+</article>
+                    <article class="phpdocumentor-element -function - ">
+    <h4 class="phpdocumentor-element__name" id="function_zimbraSingleUpdateQuota">
+        zimbraSingleUpdateQuota()
+        <a href="namespaces/default.html#function_zimbraSingleUpdateQuota" class="headerlink"><i class="fas fa-link"></i></a>
+    </h4>
+    <aside class="phpdocumentor-element-found-in">
+    <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
+    :
+    <span class="phpdocumentor-element-found-in__line">813</span>
+</aside>
+
+        <p class="phpdocumentor-summary">Perform an update of customfields to prevent downgrades.</p>
+
+    <code class="phpdocumentor-code phpdocumentor-signature ">
+    <span class="phpdocumentor-signature__visibility"></span>
+                <span class="phpdocumentor-signature__name">zimbraSingleUpdateQuota</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$params</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
+
+        <section class="phpdocumentor-description"><p>Called in changePackage or createAccount functions.</p>
+</section>
+
+        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
+    <dl class="phpdocumentor-argument-list">
+                    <dt class="phpdocumentor-argument-list__entry">
+                <span class="phpdocumentor-signature__argument__name">$params</span>
+                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
+                            </dt>
+            <dd class="phpdocumentor-argument-list__definition">
+                    <section class="phpdocumentor-description"><p>common module parameters</p>
+</section>
+
+            </dd>
+            </dl>
+
+    
+
+    
 </article>
 </article>
             </section>
             </section>
 
 

+ 57 - 13
Doc/packages/Default.html

@@ -183,6 +183,13 @@
 </dt>
 </dt>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 <dd>Perform single sign-on for a given instance of a product/service.</dd>
 
 
+            <dt class="phpdocumentor-table-of-contents__entry -function -">
+    <a href="namespaces/default.html#function_zimbraSingleUpdateQuota">zimbraSingleUpdateQuota()</a>
+    <span>
+                        &nbsp;: mixed    </span>
+</dt>
+<dd>Perform an update of customfields to prevent downgrades.</dd>
+
     </dl>
     </dl>
 
 
         
         
@@ -245,7 +252,7 @@
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">61</span>
+    <span class="phpdocumentor-element-found-in__line">60</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">server side password check</p>
         <p class="phpdocumentor-summary">server side password check</p>
@@ -283,7 +290,7 @@ in case that the client side check has been disabled</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">94</span>
+    <span class="phpdocumentor-element-found-in__line">93</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define module related meta data.</p>
         <p class="phpdocumentor-summary">Define module related meta data.</p>
@@ -324,7 +331,7 @@ settings.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">123</span>
+    <span class="phpdocumentor-element-found-in__line">122</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
         <p class="phpdocumentor-summary">Test connection to a Zimbra server with the given server parameters.</p>
@@ -381,7 +388,7 @@ existing server.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">175</span>
+    <span class="phpdocumentor-element-found-in__line">174</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
         <p class="phpdocumentor-summary">Client area output logic handling.</p>
@@ -453,7 +460,7 @@ template or they will not be visible to the end user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">218</span>
+    <span class="phpdocumentor-element-found-in__line">222</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Usage Update</p>
         <p class="phpdocumentor-summary">Usage Update</p>
@@ -506,7 +513,7 @@ Run Manually: /admin/reports.php?report=disk_usage_summary&amp;action=updatestat
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">301</span>
+    <span class="phpdocumentor-element-found-in__line">304</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Change the password for a Zimbra account.</p>
@@ -562,7 +569,7 @@ active status.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">349</span>
+    <span class="phpdocumentor-element-found-in__line">352</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
         <p class="phpdocumentor-summary">Provision a new instance of a Zimbra account.</p>
@@ -621,7 +628,7 @@ configuration, this can be any of:</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">453</span>
+    <span class="phpdocumentor-element-found-in__line">451</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status locked.</p>
@@ -675,7 +682,7 @@ user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">494</span>
+    <span class="phpdocumentor-element-found-in__line">492</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
         <p class="phpdocumentor-summary">Set a Zimbra account to status active.</p>
@@ -729,7 +736,7 @@ can be called manually by admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">534</span>
+    <span class="phpdocumentor-element-found-in__line">532</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
         <p class="phpdocumentor-summary">Removes a Zimbra account.</p>
@@ -782,7 +789,7 @@ overdue products if enabled, or requested manually by an admin user.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">592</span>
+    <span class="phpdocumentor-element-found-in__line">590</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
         <p class="phpdocumentor-summary">Set a new class of service for a Zimbra account.</p>
@@ -838,7 +845,7 @@ products and configurable options.</p>
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">658</span>
+    <span class="phpdocumentor-element-found-in__line">664</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
         <p class="phpdocumentor-summary">Define Zimbra product configuration options.</p>
@@ -889,7 +896,7 @@ Calls a function to create all necessary customfields for the order form using t
     <aside class="phpdocumentor-element-found-in">
     <aside class="phpdocumentor-element-found-in">
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
     :
     :
-    <span class="phpdocumentor-element-found-in__line">735</span>
+    <span class="phpdocumentor-element-found-in__line">747</span>
 </aside>
 </aside>
 
 
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
         <p class="phpdocumentor-summary">Perform single sign-on for a given instance of a product/service.</p>
@@ -933,6 +940,43 @@ Calls a function to create all necessary customfields for the order form using t
                         </dl>
                         </dl>
 
 
     
     
+</article>
+                    <article class="phpdocumentor-element -function - ">
+    <h4 class="phpdocumentor-element__name" id="function_zimbraSingleUpdateQuota">
+        zimbraSingleUpdateQuota()
+        <a href="namespaces/default.html#function_zimbraSingleUpdateQuota" class="headerlink"><i class="fas fa-link"></i></a>
+    </h4>
+    <aside class="phpdocumentor-element-found-in">
+    <abbr class="phpdocumentor-element-found-in__file" title="zimbraSingle.php"><a href="files/zimbrasingle.html"><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></a></abbr>
+    :
+    <span class="phpdocumentor-element-found-in__line">813</span>
+</aside>
+
+        <p class="phpdocumentor-summary">Perform an update of customfields to prevent downgrades.</p>
+
+    <code class="phpdocumentor-code phpdocumentor-signature ">
+    <span class="phpdocumentor-signature__visibility"></span>
+                <span class="phpdocumentor-signature__name">zimbraSingleUpdateQuota</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$params</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
+
+        <section class="phpdocumentor-description"><p>Called in changePackage or createAccount functions.</p>
+</section>
+
+        <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
+    <dl class="phpdocumentor-argument-list">
+                    <dt class="phpdocumentor-argument-list__entry">
+                <span class="phpdocumentor-signature__argument__name">$params</span>
+                : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
+                            </dt>
+            <dd class="phpdocumentor-argument-list__definition">
+                    <section class="phpdocumentor-description"><p>common module parameters</p>
+</section>
+
+            </dd>
+            </dl>
+
+    
+
+    
 </article>
 </article>
             </section>
             </section>
 
 

+ 25 - 1
Doc/reports/errors.html

@@ -77,9 +77,33 @@
 <div class="phpdocumentor-row">
 <div class="phpdocumentor-row">
     <h2 class="phpdocumentor-content__title">Errors</h2>
     <h2 class="phpdocumentor-content__title">Errors</h2>
 
 
+        <h3>Table of Contents</h3>
+    <table class="phpdocumentor-table_of_contents">
+                                            <tr>
+                    <td class="phpdocumentor-cell"><a href="reports/errors.html#zimbraSingle.php">zimbraSingle.php</a></td>
+                    <td class="phpdocumentor-cell">1</td>
+                </tr>
+                                    </table>
     
     
-            <div class="phpdocumentor-admonition phpdocumentor-admonition--success">No errors have been found in this project.</div>
     
     
+            <a id="zimbraSingle.php"></a>
+        <h3><abbr title="zimbraSingle.php">zimbraSingle.php</abbr></h3>
+        <table>
+            <thead>
+                <tr>
+                    <th class="phpdocumentor-heading">Type</th>
+                    <th class="phpdocumentor-heading">Line</th>
+                    <th class="phpdocumentor-heading">Description</th>
+                </tr>
+            </thead>
+            <tbody>
+                            <tr>
+                    <td class="phpdocumentor-cell">ERROR</td>
+                    <td class="phpdocumentor-cell">0</td>
+                    <td class="phpdocumentor-cell">Tag &quot;return&quot; with body &quot;@return *success* or an error&quot; has error &quot;\*success*&quot; is not a valid Fqsen.</td>
+                </tr>
+                        </tbody>
+        </table>
     </div>
     </div>
                 <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
                 <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
     <section class="phpdocumentor-search-results__dialog">
     <section class="phpdocumentor-search-results__dialog">

+ 0 - 19
clientarea.tpl

@@ -1,19 +0,0 @@
-<table width="100%" cellspacing="0" cellpadding="0" class="frame">
-  <tr>
-    <td>
-      <table width="100%" border="0" cellpadding="10" cellspacing="0" class="table table-striped table-framed">
-        <tr>
-          <td align='left'>Webmail</td>
-          <td align="left"><a href="{$webmailurl}" target="_blank">{$webmailurl}</a></td>
-        </tr>
-        <tr>
-          <td colspan=2>
-              <a href="/whmcs/clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1" class="btn btn-primary" target=_blank color="white">
-                <i class="fas fa-sign-in fa-fw"></i> Login to Zimbra
-              </a>
-          </td>
-        </tr>
-      </table>
-    </td>
-  </tr>
-</table>

+ 9 - 10
templates/orderforms/croster_mailbox/checkconfigureproduct.tpl → templates/checkconfigureproduct.tpl

@@ -1,5 +1,5 @@
 <script>
 <script>
-    function checkMailAddress ( mailname, maildomain) {
+    function checkMailAddress ( mailname, maildomain, pid) {
         var xhttp = new XMLHttpRequest();
         var xhttp = new XMLHttpRequest();
         xhttp.onreadystatechange = function() {
         xhttp.onreadystatechange = function() {
             if (this.readyState == 4 && this.status == 200) {
             if (this.readyState == 4 && this.status == 200) {
@@ -28,7 +28,7 @@
                 }
                 }
             }
             }
         };
         };
-        xhttp.open("GET", "modules/servers/zimbraSingle/zimbraAddressCheck.php?name=" + mailname + '&domain=' +maildomain, true);
+        xhttp.open("GET", "modules/servers/zimbraSingle/zimbraAddressAvailable.php?name=" + mailname + '&domain=' + maildomain + '&pid=' + pid, true);
         xhttp.send();
         xhttp.send();
     };
     };
     jQuery(document).ready(function(){
     jQuery(document).ready(function(){
@@ -37,16 +37,16 @@
         $(customFields[4]).prop("disabled",true);
         $(customFields[4]).prop("disabled",true);
         $(customFields[5]).prop("disabled",true);
         $(customFields[5]).prop("disabled",true);
         $(customFields[2]).blur(function () {
         $(customFields[2]).blur(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val());
+            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
         });
         });
         $(customFields[3]).change(function () {
         $(customFields[3]).change(function () {
-            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val());
+            checkMailAddress( $(customFields[2]).val(), $(customFields[3]).val(), {$productinfo['pid']});
         });
         });
         $(customFields[4]).focus (function () {
         $(customFields[4]).focus (function () {
             $("#hintHead").text('Tipps für ein gutes Passwort');
             $("#hintHead").text('Tipps für ein gutes Passwort');
             $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
             $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
             $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
             $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
-            $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % &amp; etc...)');
+            $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % + - etc...)');
             $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
             $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
         });
         });
         $(customFields[4]).keyup(function () {
         $(customFields[4]).keyup(function () {
@@ -69,7 +69,7 @@
                 numericOK = true;
                 numericOK = true;
                 $("#hintNumeric").text('');
                 $("#hintNumeric").text('');
             } else {
             } else {
-                numericOK = true;
+                numericOK = false;
                 $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
                 $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
             }
             }
             var symbols = pw.replace(/\W/g, "");
             var symbols = pw.replace(/\W/g, "");
@@ -78,8 +78,8 @@
                 symbolsOK = true;
                 symbolsOK = true;
                 $("#hintSymbols").text('');
                 $("#hintSymbols").text('');
             } else {
             } else {
-                symbolsOK = true;
-                $("#hintSymbols").text('Benutzen Sie auch mindestens eines der folgenden Symbole (# $ ! % &amp; etc...)');
+                symbolsOK = false;
+                $("#hintSymbols").text('Benutzen Sie auch mindestens ein Symbol oder Sonderzeichen (# $ ! % & + - etc...)');
             }
             }
             var upper = pw.replace(/[A-Z]/g, "");
             var upper = pw.replace(/[A-Z]/g, "");
             var numupper = (pw.length - upper.length);
             var numupper = (pw.length - upper.length);
@@ -119,5 +119,4 @@
             }
             }
         });
         });
     });
     });
-</script>
-
+</script>

+ 420 - 0
templates/clientarea.tpl

@@ -0,0 +1,420 @@
+{*
+ **********************************************************
+ * Developed by: Team Theme Metro
+ * Website: http://www.thememetro.com
+ * Customized ny thurdata
+ **********************************************************
+*}
+
+{if $modulechangepwresult}
+  {if $modulechangepwresult == "success"}
+    {include file="$template/includes/alert.tpl" type="success" msg=$modulechangepasswordmessage textcenter=true}
+  {elseif $modulechangepwresult == "error"}
+    {include file="$template/includes/alert.tpl" type="error" msg=$modulechangepasswordmessage|strip_tags textcenter=true}
+  {/if}
+{/if}
+
+{if $modulecustombuttonresult}
+  {if $modulecustombuttonresult == "success"}
+    {include file="$template/includes/alert.tpl" type="success" msg=$LANG.moduleactionsuccess textcenter=true idname="alertModuleCustomButtonSuccess"}
+  {else}
+    {include file="$template/includes/alert.tpl" type="error" msg=$LANG.moduleactionfailed|cat:' ':$modulecustombuttonresult textcenter=true idname="alertModuleCustomButtonFailed"}
+  {/if}
+{/if}
+{if $pendingcancellation}
+    {include file="$template/includes/alert.tpl" type="error" msg=$LANG.cancellationrequestedexplanation textcenter=true idname="alertPendingCancellation"}
+{/if}
+{if $unpaidInvoice}
+  <div class="alert alert-{if $unpaidInvoiceOverdue}danger{else}warning{/if}" id="alert{if $unpaidInvoiceOverdue}Overdue{else}Unpaid{/if}Invoice">
+    <div class="pull-right">
+      <a href="viewinvoice.php?id={$unpaidInvoice}" class="btn btn-xs btn-default">
+        {lang key='payInvoice'}
+      </a>
+    </div>
+    {$unpaidInvoiceMessage}
+  </div>
+{/if}
+<div class="tab-content margin-bottom">
+  <div class="tab-pane fade show active" id="tabOverview">
+    {if $tplOverviewTabOutput}
+			{$tplOverviewTabOutput}
+    {else}
+      <div class="section">
+        <div class="product-details">
+          <div class="row row-eq-height row-eq-height-sm">
+            <div class="col-md-6">
+              <div class="product-holder product-status-{$rawstatus|strtolower}">
+                <div class="product-content">
+                  <div class="product-image">
+    								<div class="feature-icon">
+											<img src="https://portal.thurdata.ch/templates/croster/assets/images/zimbra-only-logo.svg" class="img-fluid">
+										</div>
+                  </div>
+                  <h4><small>{$groupname}</small> - {$product}</h4>
+                  <div class="status-sticker-wrapper">
+                    <div class="status-sticker product-status-{$rawstatus|strtolower}">
+                      {$status}
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="col-md-6">
+              <div class="product-info">
+                <ul class="list-info list-v">
+                  <li>
+                    <span class="list-heading">{$LANG.clientareahostingregdate}</span>
+                    <span class="list-text">{$regdate}</span>
+                  </li>
+                  {if $firstpaymentamount neq $recurringamount}
+                    <li>
+                      <span class="list-heading">{$LANG.firstpaymentamount}</span>
+                      <span class="list-text">{$firstpaymentamount}</span>
+                    </li>
+                  {/if}
+                  {if $billingcycle != $LANG.orderpaymenttermonetime && $billingcycle != $LANG.orderfree}
+                    <li>
+                      <span class="list-heading">{$LANG.recurringamount}</span>
+                      <span class="list-text">{$recurringamount}</span>
+                    </li>
+                  {/if}
+                  <li>
+                    <span class="list-heading">{$LANG.orderbillingcycle}</span>
+                    <span class="list-text">{$billingcycle}</span>
+                  </li>
+                  {if $nextduedate == '-'}{else}
+                    <li>
+                      <span class="list-heading">{$LANG.clientareahostingnextduedate}</span>
+                      <span class="list-text">{$nextduedate}</span>
+                    </li>
+                  {/if}
+                  <li>
+                    <span class="list-heading">{$LANG.orderpaymentmethod}</span>
+                    <span class="list-text">{$paymentmethod}</span>
+                  </li>
+                </ul>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      {*
+        {if $showcancelbutton || $packagesupgrade}
+          <div class="row">
+            {if $packagesupgrade}
+              <div class="col-xs-{if $showcancelbutton}6{else}12{/if}">
+                <a href="upgrade.php?type=package&amp;id={$id}" class="btn btn-block btn-primary">{$LANG.upgrade}</a>
+              </div>
+            {/if}
+            {if $showcancelbutton}
+              <div class="col-xs-{if $packagesupgrade}6{else}12{/if}">
+                <a href="clientarea.php?action=cancel&amp;id={$id}" class="btn btn-block btn-danger {if $pendingcancellation}disabled{/if}">{if $pendingcancellation}{$LANG.cancellationrequested}{else}{$LANG.clientareacancelrequestbutton}{/if}</a>
+              </div>
+            {/if}
+          </div>
+        {/if}
+      *}
+      {if $systemStatus == 'Active'}
+        {foreach $hookOutput as $output}
+          <div class="section">
+            <div>
+              {$output}
+            </div>
+            <div class=" clearfix"></div>
+          </div>
+        {/foreach}
+        {if $domain || $moduleclientarea || $configurableoptions || $customfields || $lastupdate}
+          <div class="section">
+            <div class="card panel panel-tabs">
+              <div class="card-header">
+                <ul class="nav nav-pills card-header-pills flex-column flex-md-row">
+                  {if $domain}
+                    <li class="nav-item">
+                      <a href="#domain" data-toggle="tab" class="nav-link active"><i class="fas fa-globe fa-fw"></i> {if $type eq "server"}{lang key='sslserverinfo'}{elseif ($type eq "hostingaccount" || $type eq "reselleraccount") && $serverdata}{lang key='hostingInfo'}{else}{lang key='clientareahostingdomain'}{/if}</a>
+                    </li>
+                  {elseif $moduleclientarea}
+                    <li class="nav-item">
+                      <a href="#manage" data-toggle="tab" class="nav-link active"><i class="fas fa-globe fa-fw"></i> {lang key='manage'}</a>
+                    </li>
+                  {/if}
+                  {if $configurableoptions}
+                    <li class="nav-item">
+                      <a href="#configoptions" data-toggle="tab" class="nav-link{if !$domain && !$moduleclientarea} active{/if}"><i class="fas fa-cubes fa-fw"></i>Details</a>
+                    </li>
+                  {/if}
+                  {if $metricStats}
+                    <li class="nav-item">
+                      <a href="#metrics" data-toggle="tab" class="nav-link{if !$domain && !$moduleclientarea && !$configurableoptions} active{/if}"><i class="fas fa-chart-line fa-fw"></i> {lang key='metrics.title'}</a>
+                    </li>
+                  {/if}
+                  {if $customfields}
+                    <li class="nav-item">
+                      <a href="#additionalinfo" data-toggle="tab" class="nav-link{if !$domain && !$moduleclientarea && !$metricStats && !$configurableoptions} active{/if}"><i class="fas fa-info fa-fw"></i>Zugangsdaten</a>
+                    </li>
+                  {/if}
+                  {if $lastupdate}
+                    <li class="nav-item">
+                      <a href="#resourceusage" data-toggle="tab" class="nav-link{if !$domain && !$moduleclientarea && !$configurableoptions && !$customfields} active{/if}"><i class="fas fa-inbox fa-fw"></i> {lang key='resourceUsage'}</a>
+                    </li>
+                  {/if}
+                </ul>
+              </div>
+              <div class="card-body">
+                <div class="tab-content">
+                  {if $configurableoptions}
+                    <div class="tab-pane fade{if !$domain && !$moduleclientarea} show active{/if}" role="tabpanel" id="configoptions">
+                      <table width="100%" cellspacing="0" cellpadding="0" class="frame">
+                        <tr>
+                          <td>
+                            <table width="100%" border="0" cellpadding="10" cellspacing="0" class="table table-striped table-framed">
+                              <tr>
+                                <td align='left'>E-Mail Adresse</td>
+                                <td align="left">{$mailaddress}</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>E-Mail Speicher inklusive</td>
+                                <td align="left">{$basequota} GB</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>E-Mail Speicher zugebucht</td>
+                                <td align="left">{$addonquota} GB</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>E-Mail Speicher gesamt</td>
+                                <td align="left">{$userquota} GB</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Webmail</td>
+                                <td align="left"><a href="{$webmailurl}" target="_blank">{$webmailurl}</a></td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='center'>
+                                  <a href="{$systemurl}clientarea.php?action=productdetails&id={$serviceid}&dosinglesignon=1" class="btn btn-primary" target=_blank color="white">
+                                    <i class="fas fa-sign-in fa-fw"></i> Login to Zimbra
+                                  </a>
+                                </td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </div>
+                  {/if}
+                  {if $metricStats}
+                    <div class="tab-pane fade{if !$domain && !$moduleclientarea && !$configurableoptions} show active{/if}" role="tabpanel" id="metrics">
+                      {include file="$template/clientareaproductusagebilling.tpl"}
+                    </div>
+                  {/if}
+                  {if $customfields}
+                    <div class="tab-pane fade{if !$domain && !$moduleclientarea && !$configurableoptions && !$metricStats} show active{/if}" role="tabpanel" id="additionalinfo">
+                      <table width="100%" cellspacing="0" cellpadding="0" class="frame">
+                        <tr>
+                          <td colspan=2 align='left'>
+                            <h6 class="heading">Integrieren Sie Ihr Postfach auf Ihr Mobiltelefon oder Ihren PC</h6>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td colspan=2 align='left'>
+                            <h6 class="heading">Als Benutzernamen verwenden Sie immer Ihre E-Mail Adresse ({$mailaddress})</h6>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td colspan=2 align='left'>
+                            <hr>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td>
+                            <table width="100%" border="0" cellpadding="10" cellspacing="0" class="table table-striped table-framed">
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <h6 class="heading">Exchange ActivSync</h6>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Exchange Server</td>
+                                <td align="left">{$zimbraserver}</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Sicherheit</td>
+                                <td align="left">SSL/TLS</td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <hr>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <h6 class="heading">IMAP4</h6>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Name</td>
+                                <td align="left">{$zimbraserver}</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Type</td>
+                                <td align="left">IMAP</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Port</td>
+                                <td align="left">993</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Sicherheit</td>
+                                <td align="left">SSL/TLS</td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <hr>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <h6 class="heading">POP3</h6>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Name</td>
+                                <td align="left">{$zimbraserver}</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Type</td>
+                                <td align="left">POP3</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Port</td>
+                                <td align="left">995</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Sicherheit</td>
+                                <td align="left">SSL/TLS</td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <hr>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td colspan=2 align='left'>
+                                  <h6 class="heading">SMTP</h6>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Name</td>
+                                <td align="left">{$zimbraserver}</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Type</td>
+                                <td align="left">SMTP</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Server Port</td>
+                                <td align="left">25</td>
+                              </tr>
+                              <tr>
+                                <td align='left'>Sicherheit</td>
+                                <td align="left">STARTTLS</td>
+                              </tr>
+                            </table>
+                          </td>
+                        </tr>
+                      </table>
+                    </div>
+                  {/if}
+                  {if $lastupdate}
+                    <div class="tab-pane fade" role="tabpanel" id="resourceusage">
+                      <div class="col-sm-10 offset-sm-1">
+                        <div class="col-sm-6">
+                          <h4>{lang key='diskSpace'}</h4>
+                          <input type="text" value="{$diskpercent|substr:0:-1}" class="dial-usage" data-width="100" data-height="100" data-min="0" data-readOnly="true" />
+                          <p>{($diskusage / 1024)|round:1} GB / {($disklimit / 1024)|round:1} GB</p>
+                        </div>
+                      </div>
+                      <div class="clearfix">
+                      </div>
+                      <p class="text-muted">{lang key='clientarealastupdated'}: {$lastupdate}</p>
+                      <script src="{$BASE_PATH_JS}/jquery.knob.js"></script>
+                      <script>
+                        jQuery(function() {
+                          jQuery(".dial-usage").knob({
+                            'format': function(v) {
+                              alert(v);
+                            }
+                          });
+                        });
+                      </script>
+                    </div>
+                  {/if}
+                </div>
+              </div>
+            </div>
+          </div>
+        {/if}
+        {else}
+        <div class="alert-lg no-data">
+          <div class="icon">
+            <i class="fas fa-exclamation-triangle"></i>
+          </div>
+          <div class="text">
+            {if $suspendreason}
+              <strong>{$suspendreason}</strong><br />
+            {/if}
+            {$LANG.cPanel.packageNotActive} {$status}.<br />
+            {if $systemStatus eq "Pending"}
+              {$LANG.cPanel.statusPendingNotice}
+            {elseif $systemStatus eq "Suspended"}
+              {$LANG.cPanel.statusSuspendedNotice}
+            {/if}
+          </div>
+        </div>
+      {/if}
+    {/if}
+  </div>
+  <div class="tab-pane fade in" id="tabChangepw">
+  <div class="section">
+    <div class="section-header">
+      <h3>{$LANG.serverchangepassword}</h3>
+      <p class="desc">Hier können Sie Ihr Passwort für {$mailaddress} ändern</p>
+    </div>
+    <div class="section-body">
+      <div class="row">
+        <div class="col-sm-7">
+          <form class=" using-password-strength" method="post" action="{$smarty.server.PHP_SELF}?action=productdetails&id={$id}" role="form">
+            <input type="hidden" name="id" value="{$id}" />
+            <input type="hidden" name="modulechangepassword" value="true" />
+            <div class="TM-card">
+              <div id="newPassword1" class="form-group has-feedback">
+                <label for="inputNewPassword1" class="control-label">{$LANG.newpassword}</label>
+                <input type="password" class="form-control" id="inputNewPassword1" name="newpw" autocomplete="off" />
+                <span class="form-control-feedback glyphicon"></span>
+                {include file="$template/includes/thurpwcheck.tpl"}
+              </div>
+              <div class="alert alert-info">
+                  <div id='hints'>
+                      <strong id='hint2Head'></strong>
+                      <div id='hintLength'></div>
+                      <div id='hintNumeric'></div>
+                      <div id='hintSymbols'></div>
+                      <div id='hintUpperLower'></div>
+                  </div>
+              </div>
+              <div id="newPassword2" class="form-group has-feedback">
+                <label for="inputNewPassword2" class="control-label">{$LANG.confirmnewpassword}</label>
+                <input type="password" class="form-control" id="inputNewPassword2" name="confirmpw" autocomplete="off" />
+                <span class="form-control-feedback glyphicon"></span>
+                <div id="inputNewPassword2Msg">
+                </div>
+              </div>
+            </div>
+            <div class="form-actions">
+              <input class="btn btn-primary" type="submit" value="{$LANG.clientareasavechanges}" />
+            </div>
+          </form>
+        </div>
+      </div>
+    </div>
+  </div>
+  </div>
+</div>

+ 121 - 38
templates/orderforms/croster_mailbox/configureproduct.tpl → templates/configureproduct.tpl

@@ -13,7 +13,7 @@ var _localLang = {
 
 
 <div id="order-standard_cart">
 <div id="order-standard_cart">
 
 
-    <div class="row" style="position:relative;">
+    <div class="row">
 
 
         <div class="col-md-12">
         <div class="col-md-12">
 			{if file_exists("templates/orderforms/{$carttpl}/layouts/head.tpl")}
 			{if file_exists("templates/orderforms/{$carttpl}/layouts/head.tpl")}
@@ -33,8 +33,8 @@ var _localLang = {
                 <input type="hidden" name="configure" value="true" />
                 <input type="hidden" name="configure" value="true" />
                 <input type="hidden" name="i" value="{$i}" />
                 <input type="hidden" name="i" value="{$i}" />
 
 
-                <div class="row">
-                    <div class="col-md-9">
+                <div class="row ajaxcart_cont">
+                    <div class="col-md-8 col-lg-9">
 
 
                         <h3>{$LANG.orderForm.configureDesiredOptions}</h3>
                         <h3>{$LANG.orderForm.configureDesiredOptions}</h3>
 
 
@@ -45,7 +45,7 @@ var _localLang = {
 							</div>
 							</div>
                         </div>
                         </div>
 
 
-                        <div class="alert alert-danger hidden" role="alert" id="containerProductValidationErrors">
+                        <div class="alert alert-danger w-hidden" role="alert" id="containerProductValidationErrors">
                             <p>{$LANG.orderForm.correctErrors}:</p>
                             <p>{$LANG.orderForm.correctErrors}:</p>
                             <ul id="containerProductValidationErrorsList"></ul>
                             <ul id="containerProductValidationErrorsList"></ul>
                         </div>
                         </div>
@@ -53,8 +53,8 @@ var _localLang = {
                         {if $pricing.type eq "recurring"}
                         {if $pricing.type eq "recurring"}
                             <div class="field-container">
                             <div class="field-container">
                                 <div class="form-group">
                                 <div class="form-group">
-                                    <label for="inputBillingcycle">{$LANG.cartchoosecycle}</label>
-                                    <select name="billingcycle" id="inputBillingcycle" class="form-control select-inline" onchange="{if $configurableoptions}updateConfigurableOptions({$i}, this.value);{else}recalctotals();{/if}">
+                                    <label for="inputBillingcycle">{$LANG.cartchoosecycle}</label><br />
+                                    <select name="billingcycle" id="inputBillingcycle" class="form-control" onchange="{if $configurableoptions}updateConfigurableOptions({$i}, this.value);{else}recalctotals();{/if}">
                                         {if $pricing.monthly}
                                         {if $pricing.monthly}
                                             <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}>
                                             <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}>
                                                 {$pricing.monthly}
                                                 {$pricing.monthly}
@@ -104,7 +104,7 @@ var _localLang = {
                                         -
                                         -
                                         {if count($metric.pricing) > 1}
                                         {if count($metric.pricing) > 1}
                                             {$LANG.metrics.startingFrom} {$metric.lowestPrice} / {if $metric.unitName}{$metric.unitName}{else}{$LANG.metrics.unit}{/if}
                                             {$LANG.metrics.startingFrom} {$metric.lowestPrice} / {if $metric.unitName}{$metric.unitName}{else}{$LANG.metrics.unit}{/if}
-                                            <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#modalMetricPricing-{$metric.systemName}">
+                                            <button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#modalMetricPricing-{$metric.systemName}">
                                                 {$LANG.metrics.viewPricing}
                                                 {$LANG.metrics.viewPricing}
                                             </button>
                                             </button>
                                         {elseif count($metric.pricing) == 1}
                                         {elseif count($metric.pricing) == 1}
@@ -270,33 +270,100 @@ var _localLang = {
                         {/if}
                         {/if}
 
 
                         {if $customfields}
                         {if $customfields}
-			    {include file="./checkconfigureproduct.tpl"}
+            			    {include file="./checkconfigureproduct.tpl"}
                             <div class="sub-heading">
                             <div class="sub-heading">
                                 <span>{$LANG.orderadditionalrequiredinfo}</span>
                                 <span>{$LANG.orderadditionalrequiredinfo}</span>
                             </div>
                             </div>
-
                             <div class="field-container">
                             <div class="field-container">
-                                {foreach $customfields as $customfield}
+                            <table width="100%" border="0" cellpadding="10" cellspacing="0" class="table table-borderless">
+                              <tr>
+                                <td align='left'>
                                     <div class="form-group">
                                     <div class="form-group">
-                                        <label for="customfield{$customfield.id}">{$customfield.name}</label>
-                                        {$customfield.input}
-                                        {if $customfield.description}
+                                        <label for="customfield{$customfields[0].id}">{$customfields[0].name}</label>
+                                        {$customfields[0].input}
+                                        {if $customfields[0].description}
                                             <span class="field-help-text">
                                             <span class="field-help-text">
-                                                {$customfield.description}
+                                                {$customfields[0].description}
                                             </span>
                                             </span>
                                         {/if}
                                         {/if}
                                     </div>
                                     </div>
-                                {/foreach}
+                                </td>
+                                <td></td>
+                                <td align='left'>
+                                    <div class="form-group">
+                                        <label for="customfield{$customfields[1].id}">{$customfields[1].name}</label>
+                                        {$customfields[1].input}
+                                        {if $customfields[1].description}
+                                            <span class="field-help-text">
+                                                {$customfields[1].description}
+                                            </span>
+                                        {/if}
+                                    </div>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>
+                                    <div class="form-group">
+                                        <label for="customfield{$customfields[2].id}">{$customfields[2].name}</label>
+                                        {$customfields[2].input}
+                                        {if $customfields[2].description}
+                                            <span class="field-help-text">
+                                                {$customfields[2].description}
+                                            </span>
+                                        {/if}
+                                    </div>
+                                </td>
+                                <td style="vertical-align:middle;margin:0;padding:0;">
+                                    <font size=+2px>@</font>
+                                </td>
+                                <td align='left'>
+                                    <div class="form-group">
+                                        <label for="customfield{$customfields[3].id}">{$customfields[3].name}</label>
+                                        {$customfields[3].input}
+                                        {if $customfields[3].description}
+                                            <span class="field-help-text">
+                                                {$customfields[3].description}
+                                            </span>
+                                        {/if}
+                                    </div>
+                                </td>
+                              </tr>
+                              <tr>
+                                <td align='left'>
+                                    <div class="form-group">
+                                        <label for="customfield{$customfields[4].id}">{$customfields[4].name}</label>
+                                        {$customfields[4].input}
+                                        {if $customfields[4].description}
+                                            <span class="field-help-text">
+                                                {$customfields[4].description}
+                                            </span>
+                                        {/if}
+                                    </div>
+                                </td>
+                                <td></td>
+                                <td align='left'>
+                                    <div class="form-group">
+                                        <label for="customfield{$customfields[5].id}">{$customfields[5].name}</label>
+                                        {$customfields[5].input}
+                                        {if $customfields[5].description}
+                                            <span class="field-help-text">
+                                                {$customfields[5].description}
+                                            </span>
+                                        {/if}
+                                    </div>
+                                </td>
+                              </tr>
+                            </table>
                             </div>
                             </div>
-			    <div class="alert alert-info">
-				<div id='hints'>
-				    <strong id='hintHead'></strong>
+                            <div class="alert alert-info">
+                                <div id='hints'>
+                                    <strong id='hintHead'></strong>
                                     <div id='hintLength'></div>
                                     <div id='hintLength'></div>
                                     <div id='hintNumeric'></div>
                                     <div id='hintNumeric'></div>
                                     <div id='hintSymbols'></div>
                                     <div id='hintSymbols'></div>
                                     <div id='hintUpperLower'></div>
                                     <div id='hintUpperLower'></div>
-				</div>
-			    </div>
+                                </div>
+                            </div>
                         {/if}
                         {/if}
 
 
                         {if $addons || count($addonsPromoOutput) > 0}
                         {if $addons || count($addonsPromoOutput) > 0}
@@ -335,24 +402,26 @@ var _localLang = {
                         </div>
                         </div>
 
 
                     </div>
                     </div>
-                    <div class="col-md-3" id="scrollingPanelContainer">
-
-						<div id="orderSummary">
-                            <div class="order-summary">
-                                <div class="loader" id="orderSummaryLoader">
-                                    <i class="fas fa-fw fa-sync fa-spin"></i>
-                                </div>
-                                <h2>{$LANG.ordersummary}</h2>
-                                <div class="summary-container" id="producttotal"></div>
-                            </div>
-                            <div class="text-center">
-                                 <button type="submit" id="btnCompleteProductConfig" class="btn btn-primary btn-lg">
-                                    {$LANG.continue}
-                                    <i class="fas fa-arrow-circle-right"></i>
-                                </button>
-                            </div>
-                        </div>
-
+                    <div class="col-md-4 col-lg-3">
+						<div  id="sidebar">
+							<div class="sidebar__inner blocks cartsummary">
+								<div>
+									<div class="order-summary">
+										<div class="loader" id="orderSummaryLoader">
+											<i class="fas fa-fw fa-sync fa-spin"></i>
+										</div>
+										<h2>{$LANG.ordersummary}</h2>
+										<div class="summary-container" id="producttotal"></div>
+									</div>
+									<div class="text-center">
+										 <button type="submit" id="btnCompleteProductConfig" class="btn btn-primary btn-lg">
+											{$LANG.continue}
+											<i class="fas fa-arrow-circle-right"></i>
+										</button>
+									</div>
+								</div>
+							</div>
+						</div>
                     </div>
                     </div>
 
 
                 </div>
                 </div>
@@ -370,3 +439,17 @@ var _localLang = {
 <script language="javascript">
 <script language="javascript">
 	recalctotals();
 	recalctotals();
 </script>
 </script>
+
+
+<script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/{$carttpl}/js/ResizeSensor.js"></script>
+<script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/{$carttpl}/js/jquery.sticky-sidebar.min.js"></script>
+
+<script>
+    jQuery('#sidebar').stickySidebar({
+        topSpacing: 60,
+        bottomSpacing: 60,
+        minWidth: 992,
+        containerSelector: '.ajaxcart_cont',
+        innerWrapperSelector: '.sidebar__inner'
+    });
+</script>

+ 84 - 0
templates/thurpwcheck.tpl

@@ -0,0 +1,84 @@
+{literal}
+<script>
+    jQuery(document).ready(function(){
+        $(inputNewPassword2).prop("disabled",true);
+        $(inputNewPassword1).focus (function () {
+            $("#hintHead").text('Tipps für ein gutes Passwort');
+            $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
+            $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
+            $("#hintSymbols").text('Benutzen Sie auch mindestens ein Symbol (# $ ! + etc...)');
+            $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
+        });
+        $(inputNewPassword1).keyup(function () {
+            var pwlengthOK = false;
+            var numericOK = false;
+            var symbolsOK = false;
+            var upperOK = false;
+            var pw = $(inputNewPassword1).val();
+            var pwlength = (pw.length);
+            if (pwlength > 7) {
+                pwlengthOK = true;
+                $("#hintLength").text('');
+            } else {
+                pwlengthOK = false;
+                $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');
+            }
+            var numeric = pw.replace(/[0-9]/g, "");
+            var numnumeric = (pw.length - numeric.length);
+            if (numnumeric > 0) {
+                numericOK = true;
+                $("#hintNumeric").text('');
+            } else {
+                numericOK = false;
+                $("#hintNumeric").text('Benutzen Sie mindestens eine Zahl');
+            }
+            var symbols = pw.replace(/\W/g, "");
+            var numsymbols = (pw.length - symbols.length);
+            if (numsymbols > 0) {
+                symbolsOK = true;
+                $("#hintSymbols").text('');
+            } else {
+                symbolsOK = false;
+                $("#hintSymbols").text('Benutzen Sie auch mindestens ein Symbol (# $ ! + etc...)');
+            }
+            var upper = pw.replace(/[A-Z]/g, "");
+            var numupper = (pw.length - upper.length);
+            var lower = pw.replace(/[a-z]/g, "");
+            var numlower = (pw.length - lower.length);
+            if ((numupper > 0) && (numlower > 0)) {
+                upperlowerOK = true;
+                $("#hintUpperLower").text('');
+            } else {
+                upperlowerOK = false;
+                $("#hintUpperLower").text('Benutzen Sie Groß- und Kleinschreibung');
+            }
+            $(inputNewPassword1).removeClass('has-error has-warning has-success');
+            if (pwlengthOK && numericOK && symbolsOK && upperlowerOK) {
+                $(inputNewPassword2).prop("disabled",false);
+                $(inputNewPassword1).addClass('has-success');
+                $(inputNewPassword1).css('background-color', '#0f03');;
+                $("#hintHead").text('');
+            } else {
+                $(inputNewPassword2).prop("disabled",true);
+                $(inputNewPassword1).addClass('has-error');
+                $(inputNewPassword1).css('background-color', '#f003');;
+                $("#hintHead").text('Tipps für ein gutes Passwort');
+            }
+        });
+        $(inputNewPassword2).keyup(function () {
+            if ($(inputNewPassword2).val() == $(inputNewPassword1).val()) {
+                $("#btnCompleteProductConfig").prop("disabled",false);
+                $(inputNewPassword2).addClass('has-success');
+                $(inputNewPassword2).css('background-color', '#0f03');;
+                $("#hintHead").text('');
+            } else {
+                $("#btnCompleteProductConfig").prop("disabled",true);
+                $(inputNewPassword2).addClass('has-error');
+                $(inputNewPassword2).css('background-color', '#f003');;
+                $("#hintHead").text('Passworte stimmen nicht überein!');
+            }
+        });
+    });
+</script>
+{/literal}
+

+ 173 - 0
templates/upgrademailhosting.tpl

@@ -0,0 +1,173 @@
+{*
+ **********************************************************
+ * Developed by: Team Theme Metro
+ * Website: http://www.thememetro.com
+ **********************************************************
+*}
+
+{if $overdueinvoice}
+    {include file="$template/includes/alert.tpl" type="warning" msg=$LANG.upgradeerroroverdueinvoice}
+{elseif $existingupgradeinvoice}
+    {include file="$template/includes/alert.tpl" type="warning" msg=$LANG.upgradeexistingupgradeinvoice}
+{elseif $upgradenotavailable}
+    {include file="$template/includes/alert.tpl" type="warning" msg=$LANG.upgradeNotPossible textcenter=true}
+{/if}
+
+{if $overdueinvoice}
+
+
+
+{elseif $existingupgradeinvoice}
+
+    <p>
+        <a href="submitticket.php" class="btn btn-default btn-lg">{$LANG.submitticketdescription}</a>
+    </p>
+
+{elseif $upgradenotavailable}
+
+    <p>
+        <a href="submitticket.php" class="btn btn-default btn-lg">{$LANG.submitticketdescription}</a>
+    </p>
+
+{else}
+    {if $type eq "package"}
+		<div class="section">
+			<div class="section-header">
+				<h4>{$LANG.upgradecurrentconfig}:</h4>
+			</div>
+			<div class="section-body">
+				<div class="panel panel-default">
+					<div class="panel-body">
+						<strong>{$groupname} - {$productname}</strong> {if $domain} ({$domain}){/if}
+					</div>
+				</div>
+			</div>
+		</div>
+		
+		<div class="section">
+			<div class="section-header">
+				<h4>{$LANG.upgradenewconfig}:</h4>
+				<p class="desc">{$LANG.upgradechoosepackage}</p>
+			</div>
+			<div class="section-body">
+				<div class="row row-eq-height">
+					{foreach key=num item=upgradepackage from=$upgradepackages}
+						<div class="col-lg-4 mb-4">
+						<form method="post" action="{$smarty.server.PHP_SELF}">
+							<input type="hidden" name="step" value="2">
+							<input type="hidden" name="type" value="{$type}">
+							<input type="hidden" name="id" value="{$id}">
+							<input type="hidden" name="pid" value="{$upgradepackage.pid}">
+							<div class="card h-100">
+								<div class="card-body">
+									<h4 class="product-name mt-0">{$upgradepackage.groupname} - {$upgradepackage.name}</h4>
+										
+									<div class="product-content">
+										<ul class="product-features list-unstyled">
+											<li>
+												{$upgradepackage.description|replace:"<br/>":"</li>"}
+											</li>
+										</ul>
+									</div>
+								</div>
+								<div class="card-footer">
+									<div class="form-group">
+										{if $upgradepackage.pricing.type eq "free"}
+											{$LANG.orderfree}<br />
+											<input type="hidden" name="billingcycle" value="free">
+											{elseif $upgradepackage.pricing.type eq "onetime"}
+											{$upgradepackage.pricing.onetime} {$LANG.orderpaymenttermonetime}
+											<input type="hidden" name="billingcycle" value="onetime">
+										{elseif $upgradepackage.pricing.type eq "recurring"}
+											<select name="billingcycle" class="form-control">
+												{if $upgradepackage.pricing.monthly}<option value="monthly">{$upgradepackage.pricing.monthly}</option>{/if}
+												{if $upgradepackage.pricing.quarterly}<option value="quarterly">{$upgradepackage.pricing.quarterly}</option>{/if}
+												{if $upgradepackage.pricing.semiannually}<option value="semiannually">{$upgradepackage.pricing.semiannually}</option>{/if}
+												{if $upgradepackage.pricing.annually}<option value="annually">{$upgradepackage.pricing.annually}</option>{/if}
+												{if $upgradepackage.pricing.biennially}<option value="biennially">{$upgradepackage.pricing.biennially}</option>{/if}
+												{if $upgradepackage.pricing.triennially}<option value="triennially">{$upgradepackage.pricing.triennially}</option>{/if}
+											</select>
+										{/if}
+									</div>
+									<input type="submit" value="{$LANG.upgradedowngradechooseproduct}" class="btn btn-block btn-primary" /> 
+								</div>
+							</div>
+						</form>
+						</div>
+					{/foreach}
+				</div>
+			</div>
+		</div>
+
+    {elseif $type eq "configoptions"}
+        <p>Erweitern Sie Ihr Produkt</p>
+        {if $errormessage}
+            {include file="$template/includes/alert.tpl" type="error" errorshtml=$errormessage}
+        {/if}
+        <form method="post" action="{$smarty.server.PHP_SELF}">
+            <input type="hidden" name="step" value="2" />
+            <input type="hidden" name="type" value="{$type}" />
+            <input type="hidden" name="id" value="{$id}" />
+
+			<table class="table table-striped">
+				{foreach $configoptions as $configoption}
+					<tr>
+						<td>
+							<div class="form-group">
+								<div class="col-sm-12">
+									<div class="form-group">
+										<label for="inputConfigOption{$configoption.id}">{$configoption.optionname}</label>
+										{if $configoption.qtymaximum}
+											{if !$rangesliderincluded}
+												<script type="text/javascript" src="{$BASE_PATH_JS}/ion.rangeSlider.min.js"></script>
+												<link href="{$BASE_PATH_CSS}/ion.rangeSlider.css" rel="stylesheet">
+												<link href="{$BASE_PATH_CSS}/ion.rangeSlider.skinModern.css" rel="stylesheet">
+												{assign var='rangesliderincluded' value=true}
+											{/if}
+											<input type="text" name="configoption[{$configoption.id}]" value="{if $configoption.selectedqty}{$configoption.selectedqty}{else}{$configoption.qtyminimum}{/if}" id="inputConfigOption{$configoption.id}" class="form-control" />
+											<script>
+												var sliderTimeoutId = null;
+												var sliderRangeDifference = {$configoption.qtymaximum} - {$configoption.qtyminimum};
+												// The largest size that looks nice on most screens.
+												var sliderStepThreshold = 25;
+												// Check if there are too many to display individually.
+												var setLargerMarkers = sliderRangeDifference > sliderStepThreshold;
+
+												jQuery("#inputConfigOption{$configoption.id}").ionRangeSlider({
+													min: {$configoption.qtyminimum},
+													max: {$configoption.qtymaximum},
+													grid: true,
+													grid_snap: setLargerMarkers ? false : true,
+													onChange: function() {
+														if (sliderTimeoutId) {
+															clearTimeout(sliderTimeoutId);
+														}
+
+														sliderTimeoutId = setTimeout(function() {
+															sliderTimeoutId = null;
+															recalctotals();
+														}, 250);
+													}
+												});
+											</script>
+										{else}
+											<div>
+												<input type="number" name="configoption[{$configoption.id}]" value="{if $configoption.selectedqty}{$configoption.selectedqty}{else}{$configoption.qtyminimum}{/if}" id="inputConfigOption{$configoption.id}" min="{$configoption.qtyminimum}" onchange="recalctotals()" onkeyup="recalctotals()" class="form-control form-control-qty" />
+												<span class="form-control-static form-control-static-inline">
+													x {$configoption.options.0.name}
+												</span>
+											</div>
+										{/if}
+									</div>
+								</div>
+							</div>
+						</td>
+					</tr>
+				{/foreach}
+			</table>
+            <div class="form-actions">
+                <input type="submit" value="{$LANG.ordercontinuebutton}" class="btn btn-primary" />
+            </div>
+        </form>
+    {/if}
+{/if}

+ 1 - 2
zimbraAddressAvailable.php

@@ -44,8 +44,7 @@ $server = Capsule::table('tblservers')
 	->get();
 	->get();
 $accessData['zimbraServer'] = $server[0]->hostname;
 $accessData['zimbraServer'] = $server[0]->hostname;
 $accessData['adminUser'] = $server[0]->username;
 $accessData['adminUser'] = $server[0]->username;
-$adminPassCrypt = $server[0]->password;
-$adminPassDecrypt = localAPI('DecryptPassword', array('password2' => $adminPassCrypt));
+$adminPassDecrypt = localAPI('DecryptPassword', array('password2' => $server[0]->password));
 if ($adminPassDecrypt['result'] == 'success') {
 if ($adminPassDecrypt['result'] == 'success') {
 	$accessData['adminPass'] = $adminPassDecrypt['password'];
 	$accessData['adminPass'] = $adminPassDecrypt['password'];
 }
 }

+ 117 - 16
zimbraSingle.php

@@ -32,8 +32,7 @@ require_once(__DIR__ . '/api/Zm/Server.php');
  * @param string $needle key to search for values
  * @param string $needle key to search for values
  * @return array of values
  * @return array of values
  */
  */
-function zimbraSingleFindAll($haystack, $needle)
-{
+function zimbraSingleFindAll($haystack, $needle) {
     $values = array();
     $values = array();
     $iterator  = new RecursiveArrayIterator((array)$haystack);
     $iterator  = new RecursiveArrayIterator((array)$haystack);
     $recursive = new RecursiveIteratorIterator(
     $recursive = new RecursiveIteratorIterator(
@@ -198,10 +197,15 @@ function zimbraSingle_ClientArea($params) {
         );
         );
         return false;
         return false;
     }
     }
+    $clientInfo['basequota'] = $params['configoption2'] ? $params['configoption2'] : 1;
+    $clientInfo['addonquota'] = $params['configoptions']['addonQuota'] ? $params['configoptions']['addonQuota'] : 0;
+    $clientInfo['userquota'] = $clientInfo['basequota'] + $clientInfo['addonquota'];
+    $clientInfo['mailaddress'] = $params['username'];
     $webmailUrl = zimbraSingleFindAll($accountInfo, 'PUBLICMAILURL');
     $webmailUrl = zimbraSingleFindAll($accountInfo, 'PUBLICMAILURL');
     $clientInfo['webmailurl'] = $webmailUrl[0]['DATA'];
     $clientInfo['webmailurl'] = $webmailUrl[0]['DATA'];
+    $clientInfo['zimbraserver'] = parse_url($clientInfo['webmailurl'], PHP_URL_HOST);
     return array(
     return array(
-        'templatefile' => 'clientarea',
+        'tabOverviewReplacementTemplate' => 'templates/clientarea',
         'vars' => $clientInfo,
         'vars' => $clientInfo,
     );
     );
 }
 }
@@ -247,26 +251,25 @@ function zimbraSingle_UsageUpdate($params) {
             );
             );
             continue;
             continue;
         }
         }
-        $mboxObj = $apiAccountManager->getMailbox($product['username']);
-        if(is_a($mboxObj, 'Exception')) {
+        $mboxInfo = $apiAccountManager->getMailbox($product['username']);
+        if(is_a($mboxInfo, 'Exception')) {
             logModuleCall(
             logModuleCall(
                 'zimbrasingle',
                 'zimbrasingle',
                 __FUNCTION__,
                 __FUNCTION__,
                 $params,
                 $params,
                 'Error: could not fetch mailbox info for ' . $product['username'],
                 'Error: could not fetch mailbox info for ' . $product['username'],
-                $mboxObj
+                $mboxInfo
             );
             );
             continue;
             continue;
         }
         }
-        $mboxVars = get_object_vars($mboxObj);
-        $mboxSize = $mboxVars['S'];
+        $mboxSize = $mboxInfo['S'];
         try {
         try {
             Capsule::table('tblhosting')
             Capsule::table('tblhosting')
                 ->where('id', '=', $product['id'])
                 ->where('id', '=', $product['id'])
                 ->update(
                 ->update(
                     array(
                     array(
-                        'diskusage' => round($mboxSize / 1048576,2),
-                        'disklimit' => round($accountQuota / 1048576,2),
+                        'diskusage' => round($mboxSize / 1048576),
+                        'disklimit' => round($accountQuota / 1048576),
                         'lastupdate' => Capsule::raw('now()')
                         'lastupdate' => Capsule::raw('now()')
                     )
                     )
                 );
                 );
@@ -392,6 +395,10 @@ function zimbraSingle_CreateAccount($params) {
         return 'Error: could not find serviceclass ' . $params['configoption1'];
         return 'Error: could not find serviceclass ' . $params['configoption1'];
     }
     }
     $attrs['zimbraCOSId'] = $cosID;
     $attrs['zimbraCOSId'] = $cosID;
+	$baseQuota = $params['configoption2'] ? $params['configoption2'] : 1;
+    $addonQuota = $params['configoptions']['addonQuota'] ? $params['configoptions']['addonQuota'] : 0;
+    $newAddQuota = $params['configoptions']['newAddQuota'] ? $params['configoptions']['newAddQuota'] : 0;
+    $attrs['zimbraMailQuota'] = ($baseQuota + $addonQuota + $newAddQuota) * 1073741824;
     $zimbraID = $apiAccountManager->createAccount($params['username'], $params['password'], $attrs);
     $zimbraID = $apiAccountManager->createAccount($params['username'], $params['password'], $attrs);
     if(is_a($zimbraID, 'Exception')) {
     if(is_a($zimbraID, 'Exception')) {
         logModuleCall(
         logModuleCall(
@@ -422,6 +429,9 @@ function zimbraSingle_CreateAccount($params) {
         );
         );
         return 'Error: could save username & password in database';
         return 'Error: could save username & password in database';
     }
     }
+    if(zimbraSingleUpdateQuota($params) != 'success') {
+        return 'Error: could not update addonQuota in database';
+    };
     return 'success';
     return 'success';
 }
 }
 
 
@@ -602,22 +612,27 @@ function zimbraSingle_ChangePackage($params) {
         );
         );
         return 'Error: could not set class of service for '. $params['username'];
         return 'Error: could not set class of service for '. $params['username'];
     }
     }
-    $accountQuota = $apiAccountManager->getQuota($params['username']);
-    if(is_a($accountQuota, 'Exception')) {
+	$baseQuota = $params['configoption2'] ? $params['configoption2'] : 1;
+    $addonQuota = $params['configoptions']['addonQuota'] ? $params['configoptions']['addonQuota'] : 0;
+    $newAddQuota = $params['configoptions']['newAddQuota'] ? $params['configoptions']['newAddQuota'] : 0;
+    $attrs['zimbraMailQuota'] = ($baseQuota + $addonQuota +$newAddQuota) * 1073741824;
+    $response = $apiAccountManager->modifyAccount($params['username'], $attrs);
+    if(is_a($response, 'Exception')) {
         logModuleCall(
         logModuleCall(
             'zimbrasingle',
             'zimbrasingle',
             __FUNCTION__,
             __FUNCTION__,
             $params,
             $params,
-            'Error : could not find quota for ' . $params['username'],
-            $accountQuota
+            'Error: could not update mailbox quota for '. $params['username'],
+            $response
         );
         );
+        return 'Error: could not update mailbox quota for '. $params['username'];
     }
     }
     try {
     try {
         Capsule::table('tblhosting')
         Capsule::table('tblhosting')
             ->where('id', '=', $params['serviceid'])
             ->where('id', '=', $params['serviceid'])
             ->update(
             ->update(
                 array(
                 array(
-                    'disklimit' => $accountQuota,
+                    'disklimit' => $attrs['zimbraMailQuota'],
                 )
                 )
             );
             );
     } catch (\Exception $e) {
     } catch (\Exception $e) {
@@ -630,6 +645,9 @@ function zimbraSingle_ChangePackage($params) {
         );
         );
         return 'Error: could not update quota in database';
         return 'Error: could not update quota in database';
     }
     }
+    if(zimbraSingleUpdateQuota($params) != 'success') {
+        return 'Error: could not update addonQuota in database';
+    };
     return 'success';
     return 'success';
 }
 }
 
 
@@ -703,6 +721,13 @@ function zimbraSingle_ConfigOptions($params) {
         'Options' => implode(',', $cosNames),
         'Options' => implode(',', $cosNames),
         'Description' => 'Select COS',
         'Description' => 'Select COS',
     );
     );
+    $configOptions['quota'] = array(
+        'Type' => 'text',
+        'Description' => 'Basis Mailbox-Quota für dieses Produkt in GB',
+        'Default' => '5',
+        'Size' => '3',
+        'FriendlyName' => 'Mailbox Quota',
+    );
     return $configOptions;
     return $configOptions;
 }
 }
 
 
@@ -743,7 +768,7 @@ function zimbraSingle_ServiceSingleSignOn($params) {
             __FUNCTION__,
             __FUNCTION__,
             $params,
             $params,
             'Error : could not fetch options for ' . $params['customfields']['maildomain'],
             'Error : could not fetch options for ' . $params['customfields']['maildomain'],
-            $domainOptions->getMessage()
+            $domainOptions
         );
         );
         return array(
         return array(
             'success' => false,
             'success' => false,
@@ -775,3 +800,79 @@ function zimbraSingle_ServiceSingleSignOn($params) {
         'redirectTo' => $preauthURL,
         'redirectTo' => $preauthURL,
     );
     );
 }
 }
+
+/**
+ * Perform an update of customfields to prevent downgrades.
+ *
+ * Called in changePackage or createAccount functions.
+ *
+ * @param array $params common module parameters
+ *
+ * @return *success* or an error
+ */
+function zimbraSingleUpdateQuota($params) {
+    if(isset($params['configoptions']['addonQuota'])) {
+        $addonQuota = $params['configoptions']['addonQuota'] ? $params['configoptions']['addonQuota'] : 0 ;
+        $newAddQuota = $params['configoptions']['newAddQuota'] ? $params['configoptions']['newAddQuota'] : 0;
+        $addonQuota = $addonQuota + $newAddQuota;
+        $addonQuotaFieldIDObj = Capsule::table('tblproductconfigoptions')
+            ->join('tblhostingconfigoptions', 'tblproductconfigoptions.id', '=', 'tblhostingconfigoptions.configid')
+            ->where('tblhostingconfigoptions.relid', '=', $params['serviceid'])
+            ->where('tblproductconfigoptions.optionname', 'like', 'addonQuota%')
+            ->select('tblhostingconfigoptions.id', 'tblproductconfigoptions.qtymaximum')
+            ->get();
+        if($addonQuota > $addonQuotaFieldIDObj[0]->qtymaximum) {
+            logModuleCall(
+                'zimbrasingle',
+                __FUNCTION__,
+                $params,
+                'Info: someone is trying to exceed the maximum size',
+                ''
+            );
+            $addonQuota = $addonQuotaFieldIDObj[0]->qtymaximum;
+        }
+        try {
+            $updateAddonQuota = Capsule::table('tblhostingconfigoptions')
+                ->where('id', $addonQuotaFieldIDObj[0]->id)
+                ->update(
+                    [
+                        'qty' => $addonQuota,
+                    ]
+                );
+        } catch (\Exception $e) {
+            logModuleCall(
+                'zimbrasingle',
+                __FUNCTION__,
+                $updateAddonQuota,
+                'Error: could not save addonOuota in database.',
+                $e->getMessage()
+            );
+            return 'Error: could not save addonOuota in database.';
+        }
+        $newAddQuotaFieldIDObj = Capsule::table('tblproductconfigoptions')
+            ->join('tblhostingconfigoptions', 'tblproductconfigoptions.id', '=', 'tblhostingconfigoptions.configid')
+            ->where('tblhostingconfigoptions.relid', '=', $params['serviceid'])
+            ->where('tblproductconfigoptions.optionname', 'like', 'newAddQuota%')
+            ->select('tblhostingconfigoptions.id')
+            ->get();
+        try {
+            $updateNewAddQuota = Capsule::table('tblhostingconfigoptions')
+                ->where('id', $newAddQuotaFieldIDObj[0]->id)
+                ->update(
+                    [
+                        'qty' => '0',
+                    ]
+                );
+        } catch (\Exception $e) {
+            logModuleCall(
+                'zimbrasingle',
+                __FUNCTION__,
+                $updateNewAddQuota,
+                'Error: could not reset newAddOuota in database.',
+                $e->getMessage()
+            );
+            return 'Error: could not reset newAddOuota in database.';
+        }
+    }
+    return 'success';
+}