2011-10-26 Miguel de Dios <miguel.dedios@artica.es>

* include/xmlrpc, include/styles/menu.css,
	include/functions_update_manager.php, include/functions_config.php,
	operation/update_manager, operation/update_manager/update_manager.php,
	images/box_down.png, general/main_menu.php, godmode/update_manager,
	godmode/update_manager/update_manager.php, godmode/updatemanager: added
	first version of "Update Manager".

	* general/login_page.php: fixed the name of build var.
	


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5084 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-10-26 20:31:57 +00:00
parent f08875431b
commit cd56a85b64

View File

@ -1134,19 +1134,20 @@
* @access public * @access public
*/ */
function& send($msg, $timeout=0, $method='') function& send($msg, $timeout=0, $method='')
{ {
// if user deos not specify http protocol, use native method of this client // if user deos not specify http protocol, use native method of this client
// (i.e. method set during call to constructor) // (i.e. method set during call to constructor)
if($method == '') if($method == '')
{ {
$method = $this->method; $method = $this->method;
} }
if(is_array($msg)) if(is_array($msg))
{ {
// $msg is an array of xmlrpcmsg's // $msg is an array of xmlrpcmsg's
$r = $this->multicall($msg, $timeout, $method); $r = $this->multicall($msg, $timeout, $method);
return $r; //return $r;
} }
elseif(is_string($msg)) elseif(is_string($msg))
{ {
@ -1222,7 +1223,7 @@
$this->proxy_authtype $this->proxy_authtype
); );
} }
return $r; return $r;
} }
@ -1268,14 +1269,14 @@
} }
} }
else else
{ {
$encoding_hdr = ''; $encoding_hdr = '';
} }
// thanks to Grant Rauscher <grant7@firstworld.net> for this // thanks to Grant Rauscher <grant7@firstworld.net> for this
$credentials=''; $credentials='';
if($username!='') if($username!='')
{ {
$credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n"; $credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n";
if ($authtype != 1) if ($authtype != 1)
{ {
@ -1285,13 +1286,13 @@
$accepted_encoding = ''; $accepted_encoding = '';
if(is_array($this->accepted_compression) && count($this->accepted_compression)) if(is_array($this->accepted_compression) && count($this->accepted_compression))
{ {
$accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n"; $accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n";
} }
$proxy_credentials = ''; $proxy_credentials = '';
if($proxyhost) if($proxyhost)
{ {
if($proxyport == 0) if($proxyport == 0)
{ {
$proxyport = 8080; $proxyport = 8080;
@ -1371,28 +1372,28 @@
$fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr);
} }
if($fp) if($fp)
{ {
if($timeout>0 && function_exists('stream_set_timeout')) if($timeout>0 && function_exists('stream_set_timeout'))
{ {
stream_set_timeout($fp, $timeout); stream_set_timeout($fp, $timeout);
} }
} }
else else
{ {
$this->errstr='Connect error: '.$this->errstr; $this->errstr='Connect error: '.$this->errstr;
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')'); $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
return $r; return $r;
} }
if(!fputs($fp, $op, strlen($op))) if(!fputs($fp, $op, strlen($op)))
{ {
fclose($fp); fclose($fp);
$this->errstr='Write error'; $this->errstr='Write error';
$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr); $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
return $r; return $r;
} }
else else
{ {
// reset errno and errstr on succesful socket connection // reset errno and errstr on succesful socket connection
$this->errstr = ''; $this->errstr = '';
} }
@ -1406,6 +1407,7 @@
$ipd.=fread($fp, 32768); $ipd.=fread($fp, 32768);
} while(!feof($fp)); } while(!feof($fp));
fclose($fp); fclose($fp);
$r =& $msg->parseResponse($ipd, false, $this->return_type); $r =& $msg->parseResponse($ipd, false, $this->return_type);
return $r; return $r;
@ -2453,7 +2455,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
print "<PRE>---INFLATED RESPONSE---[".strlen($data)." chars]---\n" . htmlentities($data) . "\n---END---</PRE>"; print "<PRE>---INFLATED RESPONSE---[".strlen($data)." chars]---\n" . htmlentities($data) . "\n---END---</PRE>";
} }
else else
{ {
error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to decode the deflated data received from server'); error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to decode the deflated data received from server');
$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']); $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
return $r; return $r;