|
|
@@ -1145,3 +1145,18 @@ function siteBuilderCheckLimit($params, $type) {
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Returns API Url .
|
|
|
+ *
|
|
|
+ * @param string $params common module parameters
|
|
|
+ * @param string $user
|
|
|
+ * @param string $params common module parameters
|
|
|
+ *
|
|
|
+ * @return string $apiUrl
|
|
|
+ */
|
|
|
+function getSiteBuilderApiURL($params) {
|
|
|
+ $httpPrefix = $params['serversecure'] ? 'https://' : 'http://';
|
|
|
+ $serverPort = $params['serverport'] ? '/' : ':' . $params['serverport'] . '/';
|
|
|
+ return $httpPrefix . $params['serverhostname'] . $serverPort;
|
|
|
+}
|