andre 9 月之前
父節點
當前提交
5ca4a599ad
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      siteBuilder.php

+ 15 - 0
siteBuilder.php

@@ -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;
+}