mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 13:58:40 +01:00
formatting
This commit is contained in:
parent
9dcc98b2d5
commit
ad06fdf765
@ -159,7 +159,7 @@
|
|||||||
function _send_xmlrpc_ssl($method_name, $args, $url, $debug=True)
|
function _send_xmlrpc_ssl($method_name, $args, $url, $debug=True)
|
||||||
{
|
{
|
||||||
list($uri,$hostpart) = $this->_split_url($url);
|
list($uri,$hostpart) = $this->_split_url($url);
|
||||||
if(gettype($args) != 'array')
|
if(!is_array($args))
|
||||||
{
|
{
|
||||||
$arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string');
|
$arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string');
|
||||||
$f = CreateObject('phpgwapi.xmlrpcmsg', $method_name, $arr,'string');
|
$f = CreateObject('phpgwapi.xmlrpcmsg', $method_name, $arr,'string');
|
||||||
@ -168,7 +168,7 @@
|
|||||||
{
|
{
|
||||||
while(list($key,$val) = @each($args))
|
while(list($key,$val) = @each($args))
|
||||||
{
|
{
|
||||||
if(gettype($val) == 'array')
|
if(is_array($val))
|
||||||
{
|
{
|
||||||
while(list($x,$y) = each($val))
|
while(list($x,$y) = each($val))
|
||||||
{
|
{
|
||||||
@ -190,12 +190,12 @@
|
|||||||
$c->setCredentials($this->sessionid,$this->kp3);
|
$c->setCredentials($this->sessionid,$this->kp3);
|
||||||
$c->setDebug(0);
|
$c->setDebug(0);
|
||||||
$r = $c->send($f,0,'https');
|
$r = $c->send($f,0,'https');
|
||||||
if (!$r)
|
if(!$r)
|
||||||
{
|
{
|
||||||
$this->debug('send failed');
|
$this->debug('send failed');
|
||||||
}
|
}
|
||||||
$v = $r->value();
|
$v = $r->value();
|
||||||
if (!$r->faultCode())
|
if(!$r->faultCode())
|
||||||
{
|
{
|
||||||
$this->debug('<hr>I got this value back<br><pre>' . htmlentities($r->serialize()) . '</pre><hr>',$debug);
|
$this->debug('<hr>I got this value back<br><pre>' . htmlentities($r->serialize()) . '</pre><hr>',$debug);
|
||||||
$this->result = xmlrpc_decode($v);
|
$this->result = xmlrpc_decode($v);
|
||||||
@ -211,7 +211,7 @@
|
|||||||
function _send_xmlrpc_($method_name, $args, $url, $debug=True)
|
function _send_xmlrpc_($method_name, $args, $url, $debug=True)
|
||||||
{
|
{
|
||||||
list($uri,$hostpart) = $this->_split_url($url);
|
list($uri,$hostpart) = $this->_split_url($url);
|
||||||
if(gettype($args) != 'array')
|
if(!is_array($args))
|
||||||
{
|
{
|
||||||
$arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string');
|
$arr[] = CreateObject('phpgwapi.xmlrpcval',$args,'string');
|
||||||
$f = CreateObject('phpgwapi.xmlrpcmsg', $method_name, $arr,'string');
|
$f = CreateObject('phpgwapi.xmlrpcmsg', $method_name, $arr,'string');
|
||||||
@ -220,7 +220,7 @@
|
|||||||
{
|
{
|
||||||
while(list($key,$val) = @each($args))
|
while(list($key,$val) = @each($args))
|
||||||
{
|
{
|
||||||
if(gettype($val) == 'array')
|
if(is_array($val))
|
||||||
{
|
{
|
||||||
while(list($x,$y) = each($val))
|
while(list($x,$y) = each($val))
|
||||||
{
|
{
|
||||||
@ -243,12 +243,12 @@
|
|||||||
// _debug_array($c);
|
// _debug_array($c);
|
||||||
$c->setDebug(0);
|
$c->setDebug(0);
|
||||||
$r = $c->send($f);
|
$r = $c->send($f);
|
||||||
if (!$r)
|
if(!$r)
|
||||||
{
|
{
|
||||||
$this->debug('send failed');
|
$this->debug('send failed');
|
||||||
}
|
}
|
||||||
$v = $r->value();
|
$v = $r->value();
|
||||||
if (!$r->faultCode())
|
if(!$r->faultCode())
|
||||||
{
|
{
|
||||||
$this->debug('<hr>I got this value back<br><pre>' . htmlentities($r->serialize()) . '</pre><hr>',$debug);
|
$this->debug('<hr>I got this value back<br><pre>' . htmlentities($r->serialize()) . '</pre><hr>',$debug);
|
||||||
$this->result = xmlrpc_decode($v);
|
$this->result = xmlrpc_decode($v);
|
||||||
@ -265,7 +265,7 @@
|
|||||||
{
|
{
|
||||||
$method_name = str_replace('.','_',$method_name);
|
$method_name = str_replace('.','_',$method_name);
|
||||||
list($uri,$hostpart) = $this->_split_url($url);
|
list($uri,$hostpart) = $this->_split_url($url);
|
||||||
if(gettype($args) != 'array')
|
if(!is_array($args))
|
||||||
{
|
{
|
||||||
$arr[] = CreateObject('phpgwapi.soapval','','string',$args);
|
$arr[] = CreateObject('phpgwapi.soapval','','string',$args);
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@
|
|||||||
{
|
{
|
||||||
while(list($key,$val) = @each($args))
|
while(list($key,$val) = @each($args))
|
||||||
{
|
{
|
||||||
if(gettype($val) == 'array')
|
if(is_array($val))
|
||||||
{
|
{
|
||||||
while(list($x,$y) = each($val))
|
while(list($x,$y) = each($val))
|
||||||
{
|
{
|
||||||
@ -319,7 +319,7 @@
|
|||||||
{
|
{
|
||||||
while(list($key,$val) = @each($args))
|
while(list($key,$val) = @each($args))
|
||||||
{
|
{
|
||||||
if(gettype($val) == 'array')
|
if(is_array($val))
|
||||||
{
|
{
|
||||||
while(list($x,$y) = each($val))
|
while(list($x,$y) = each($val))
|
||||||
{
|
{
|
||||||
@ -375,7 +375,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_type = (is_long($_req)?'int':gettype($_req));
|
$_type = (is_long($_req) ? 'int' : gettype($_req));
|
||||||
if($recursed)
|
if($recursed)
|
||||||
{
|
{
|
||||||
return CreateObject('phpgwapi.soapval',$ext,$_type,$_req);
|
return CreateObject('phpgwapi.soapval',$ext,$_type,$_req);
|
||||||
@ -418,7 +418,7 @@
|
|||||||
{
|
{
|
||||||
$serverid = $this->serverid;
|
$serverid = $this->serverid;
|
||||||
}
|
}
|
||||||
if($serverid && gettype($this->server) == 'array')
|
if($serverid && is_array($this->server))
|
||||||
{
|
{
|
||||||
$sql = "UPDATE $this->table SET "
|
$sql = "UPDATE $this->table SET "
|
||||||
. "server_name='" . $this->server['server_name'] . "',"
|
. "server_name='" . $this->server['server_name'] . "',"
|
||||||
@ -440,7 +440,7 @@
|
|||||||
|
|
||||||
function create($server_info='')
|
function create($server_info='')
|
||||||
{
|
{
|
||||||
if(gettype($server_info) != 'array')
|
if(!is_array($server_info))
|
||||||
{
|
{
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -482,11 +482,11 @@
|
|||||||
|
|
||||||
function get_list($start='',$sort='',$order='',$query='',$offset='',&$total)
|
function get_list($start='',$sort='',$order='',$query='',$offset='',&$total)
|
||||||
{
|
{
|
||||||
if (!$sort)
|
if(!$sort)
|
||||||
{
|
{
|
||||||
$sort = 'DESC';
|
$sort = 'DESC';
|
||||||
}
|
}
|
||||||
if ($query)
|
if($query)
|
||||||
{
|
{
|
||||||
$whereclause = "WHERE server_name LIKE '%$query%'"
|
$whereclause = "WHERE server_name LIKE '%$query%'"
|
||||||
. "OR server_url LIKE '%$query%'"
|
. "OR server_url LIKE '%$query%'"
|
||||||
@ -494,7 +494,7 @@
|
|||||||
. "OR admin_name LIKE '%$query%'"
|
. "OR admin_name LIKE '%$query%'"
|
||||||
. "OR admin_email LIKE '%$query%'";
|
. "OR admin_email LIKE '%$query%'";
|
||||||
}
|
}
|
||||||
if ($order)
|
if($order)
|
||||||
{
|
{
|
||||||
$orderclause = 'ORDER BY ' . $order . ' ' . $sort;
|
$orderclause = 'ORDER BY ' . $order . ' ' . $sort;
|
||||||
}
|
}
|
||||||
@ -506,7 +506,7 @@
|
|||||||
$sql = "SELECT * FROM $this->table $whereclause $orderclause";
|
$sql = "SELECT * FROM $this->table $whereclause $orderclause";
|
||||||
$this->db->query($sql,__LINE__,__FILE__);
|
$this->db->query($sql,__LINE__,__FILE__);
|
||||||
|
|
||||||
while ($this->db->next_record())
|
while($this->db->next_record())
|
||||||
{
|
{
|
||||||
$this->servers[$this->db->f('server_name')]['server_id'] = $this->db->f('server_id');
|
$this->servers[$this->db->f('server_name')]['server_id'] = $this->db->f('server_id');
|
||||||
$this->servers[$this->db->f('server_name')]['server_name'] = $this->db->f('server_name');
|
$this->servers[$this->db->f('server_name')]['server_name'] = $this->db->f('server_name');
|
||||||
@ -525,7 +525,7 @@
|
|||||||
|
|
||||||
function formatted_list($server_id=0,$java=False,$local=False)
|
function formatted_list($server_id=0,$java=False,$local=False)
|
||||||
{
|
{
|
||||||
if ($java)
|
if($java)
|
||||||
{
|
{
|
||||||
$jselect = ' onChange="this.form.submit();"';
|
$jselect = ' onChange="this.form.submit();"';
|
||||||
}
|
}
|
||||||
@ -540,11 +540,11 @@
|
|||||||
|
|
||||||
$x = '';
|
$x = '';
|
||||||
$slist = $this->get_list('','','','','',$x);
|
$slist = $this->get_list('','','','','',$x);
|
||||||
while (list($key,$val) = each($slist))
|
while(list($key,$val) = each($slist))
|
||||||
{
|
{
|
||||||
$foundservers = True;
|
$foundservers = True;
|
||||||
$select .= '<option value="' . $val['server_id'] . '"';
|
$select .= '<option value="' . $val['server_id'] . '"';
|
||||||
if ($val['server_id'] == $server_id)
|
if($val['server_id'] == $server_id)
|
||||||
{
|
{
|
||||||
$select .= ' selected';
|
$select .= ' selected';
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@
|
|||||||
{
|
{
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if(gettype($serverdata) == 'integer')
|
if(is_int($serverdata))
|
||||||
{
|
{
|
||||||
$serverid = $serverdata;
|
$serverid = $serverdata;
|
||||||
settype($server_name,'string');
|
settype($server_name,'string');
|
||||||
@ -627,7 +627,7 @@
|
|||||||
/* TODO - Determine trust level here */
|
/* TODO - Determine trust level here */
|
||||||
function auth($serverdata='')
|
function auth($serverdata='')
|
||||||
{
|
{
|
||||||
if(!$serverdata || gettype($serverdata) != 'array')
|
if(!$serverdata || !is_array($serverdata))
|
||||||
{
|
{
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -639,7 +639,7 @@
|
|||||||
$this->db->query($sql,__LINE__,__FILE__);
|
$this->db->query($sql,__LINE__,__FILE__);
|
||||||
if($this->db->next_record())
|
if($this->db->next_record())
|
||||||
{
|
{
|
||||||
if ($username == $GLOBALS['phpgw_info']['server']['site_username'] &&
|
if($username == $GLOBALS['phpgw_info']['server']['site_username'] &&
|
||||||
$password == $GLOBALS['phpgw_info']['server']['site_password'] &&
|
$password == $GLOBALS['phpgw_info']['server']['site_password'] &&
|
||||||
$this->db->f('trust_rel') >= 1)
|
$this->db->f('trust_rel') >= 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user