From 3326dd642e3618be9bcf4c372fc89b03b5c20fc6 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Fri, 30 Nov 2001 04:46:50 +0000 Subject: [PATCH] This now uses the full path entered in the admin tool for peer servers. The default is used if none was entered, hopefully. (remove hardcoded path) Thought I fixed this already, but anyway... --- phpgwapi/inc/class.interserver.inc.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.interserver.inc.php b/phpgwapi/inc/class.interserver.inc.php index e0521769e5..ed0c9cf99a 100644 --- a/phpgwapi/inc/class.interserver.inc.php +++ b/phpgwapi/inc/class.interserver.inc.php @@ -38,6 +38,8 @@ var $authed = False; var $sessionid = ''; var $kp3 = ''; + + /* These are now entered as defaults if the admin forgot to enter the full URL */ var $urlparts = array( 'xmlrpc' => '/phpgroupware/xmlrpc.php', 'soap' => '/phpgroupware/soap.php' @@ -156,7 +158,7 @@ function _send_xmlrpc_ssl($method_name, $args, $url, $debug=True) { - list($uri,$hostpart) = $this->_split_url($url . $this->urlparts['xmlrpc']); + list($uri,$hostpart) = $this->_split_url($url); if(gettype($args) != 'array') { $arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string'); @@ -184,7 +186,7 @@ } $this->debug("
" . htmlentities($f->serialize()) . "
\n",$debug); - $c = CreateObject('phpgwapi.xmlrpc_client',$this->urlparts['xmlrpc'], $hostpart, 443); + $c = CreateObject('phpgwapi.xmlrpc_client',$uri, $hostpart, 443); $c->setCredentials($this->sessionid,$this->kp3); $c->setDebug(0); $r = $c->send($f,0,'https'); @@ -208,7 +210,7 @@ function _send_xmlrpc_($method_name, $args, $url, $debug=True) { - list($uri,$hostpart) = $this->_split_url($url . $this->urlparts['xmlrpc']); + list($uri,$hostpart) = $this->_split_url($url); if(gettype($args) != 'array') { $arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string'); @@ -236,7 +238,7 @@ } $this->debug('
' . htmlentities($f->serialize()) . '
' . "\n",$debug); - $c = CreateObject('phpgwapi.xmlrpc_client',$this->urlparts['xmlrpc'], $hostpart, 80); + $c = CreateObject('phpgwapi.xmlrpc_client',$uri, $hostpart, 80); $c->setCredentials($this->sessionid,$this->kp3); // _debug_array($c); $c->setDebug(0); @@ -262,7 +264,7 @@ function _send_soap_ssl($method_name, $args, $url, $debug=True) { $method_name = str_replace('.','_',$method_name); - list($uri,$hostpart) = $this->_split_url($url . $this->urlparts['soap']); + list($uri,$hostpart) = $this->_split_url($url); if(gettype($args) != 'array') { $arr[] = CreateObject('phpgwapi.soapval','','string',$args); @@ -307,7 +309,7 @@ function _send_soap_($method_name, $args, $url, $debug=True) { // $method_name = str_replace('.','_',$method_name); - list($uri,$hostpart) = $this->_split_url($url . $this->urlparts['soap']); + list($uri,$hostpart) = $this->_split_url($url); $this->build_request($args); /* if(gettype($args) != 'array') @@ -587,7 +589,7 @@ } if($serverid) { - $sql = "SELECT server_name FROM $this->table WHERE serverid=$serverid"; + $sql = "SELECT server_name FROM $this->table WHERE server_id=$serverid"; $this->db->query($sql,__LINE__,__FILE__); if($this->db->next_record()) {