andre hace 7 meses
padre
commit
8abdaf9618
Se han modificado 2 ficheros con 14 adiciones y 1 borrados
  1. 12 0
      api/sitebuilder.php
  2. 2 1
      siteBuilder.php

+ 12 - 0
api/sitebuilder.php

@@ -224,6 +224,18 @@ class ApiClient {
         return $this->sendRequest('GET', $url);
     }
   
+    /**
+     * Return users quota
+     *
+     * @param username:        The username under which the domain is deployed
+     *
+     * @return                  a json with ['status' => $httpCode,'response' => $response'];
+     */
+    public function getQuota($username) {
+        $url = "$this->apiUrl/getquota/$username";
+        return $this->sendRequest('GET', $url);
+    }
+     
     /**
      * Disables the prod webpage
      *

+ 2 - 1
siteBuilder.php

@@ -370,12 +370,13 @@ function siteBuilder_ClientArea($params) {
 		}
 		array_push($clientInfo['sites'],['name' => $site->name, 'sslSite' => $sslSite, 'enabled' => $site->enabled]);
 	}
+	$quota = $siteBuilder->getQuota($params['username']);
 	logModuleCall(
 		'siteBuilder',
 		__FUNCTION__,
 		$clientInfo,
 		'debug',
-		$sitesObj
+		$quota
 		);
 	return array(
         'tabOverviewReplacementTemplate' => 'clientarea',