Explorar o código

add functions

andre %!s(int64=3) %!d(string=hai) anos
pai
achega
f55d30de28
Modificáronse 1 ficheiros con 4 adicións e 5 borrados
  1. 4 5
      cwp7.php

+ 4 - 5
cwp7.php

@@ -18,14 +18,13 @@ if (!defined('WHMCS')) {
 function cwp7_ConfigOptions() {
 function cwp7_ConfigOptions() {
     $whmcs = App::self();
     $whmcs = App::self();
     $serverGroupID = $whmcs->get_req_var('servergroup');
     $serverGroupID = $whmcs->get_req_var('servergroup');
-    $serverIDObj = Capsule::table('tblservergroupsrel')
+    $serverIDs = array(Capsule::table('tblservergroupsrel')
         ->select('serverid')
         ->select('serverid')
         ->where('groupid', '=', $serverGroupID)
         ->where('groupid', '=', $serverGroupID)
-        ->first();
-    $serverIDArray = $serverIDObj->serverid;
+        ->get());
     $server = Capsule::table('tblservers')
     $server = Capsule::table('tblservers')
         ->select('ipaddress', 'accesshash')
         ->select('ipaddress', 'accesshash')
-        ->where('id', $serverIDArray)
+        ->where('id', $serverIDs)
         ->where('active', '=', 1)
         ->where('active', '=', 1)
         ->get();
         ->get();
 	logModuleCall(
 	logModuleCall(
@@ -33,7 +32,7 @@ function cwp7_ConfigOptions() {
 		__FUNCTION__,
 		__FUNCTION__,
 		$server,
 		$server,
 		'Debug',
 		'Debug',
-		$serverIDObj
+		$serverIDs
 	);
 	);
 	$configarray = array(
 	$configarray = array(
 		"Package" => array( "Type" => "text", "Description" => "Package ID", "Default" => "1"),
 		"Package" => array( "Type" => "text", "Description" => "Package ID", "Default" => "1"),