Update to CodeIgniter 3.19
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This content is released under the MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
|
||||
* Copyright (c) 2014 - 2018, British Columbia Institute of Technology
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -29,7 +29,7 @@
|
||||
* @package CodeIgniter
|
||||
* @author EllisLab Dev Team
|
||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
|
||||
* @license http://opensource.org/licenses/MIT MIT License
|
||||
* @link https://codeigniter.com
|
||||
* @since Version 1.0.0
|
||||
@@ -238,7 +238,7 @@ class CI_Xmlrpc {
|
||||
public $result;
|
||||
|
||||
/**
|
||||
* XML-RPC Reponse
|
||||
* XML-RPC Response
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -352,7 +352,7 @@ class CI_Xmlrpc {
|
||||
*/
|
||||
public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
|
||||
{
|
||||
if (strpos($url, 'http') !== 0)
|
||||
if (stripos($url, 'http') !== 0)
|
||||
{
|
||||
$url = 'http://'.$url;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ class CI_Xmlrpc {
|
||||
{
|
||||
if (is_array($value[0]) && ($value[1] === 'struct' OR $value[1] === 'array'))
|
||||
{
|
||||
while (list($k) = each($value[0]))
|
||||
foreach (array_keys($value[0]) as $k)
|
||||
{
|
||||
$value[0][$k] = $this->values_parsing($value[0][$k]);
|
||||
}
|
||||
@@ -735,6 +735,8 @@ class XML_RPC_Client extends CI_Xmlrpc
|
||||
.'Content-Length: '.strlen($msg->payload).$r.$r
|
||||
.$msg->payload;
|
||||
|
||||
stream_set_timeout($fp, $this->timeout); // set timeout for subsequent operations
|
||||
|
||||
for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result)
|
||||
{
|
||||
if (($result = fwrite($fp, substr($op, $written))) === FALSE)
|
||||
@@ -753,9 +755,6 @@ class XML_RPC_Client extends CI_Xmlrpc
|
||||
$result = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(250000);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -932,15 +931,15 @@ class XML_RPC_Response
|
||||
|
||||
if (is_array($array))
|
||||
{
|
||||
while (list($key) = each($array))
|
||||
foreach ($array as $key => &$value)
|
||||
{
|
||||
if (is_array($array[$key]))
|
||||
if (is_array($value))
|
||||
{
|
||||
$array[$key] = $this->decode($array[$key]);
|
||||
$array[$key] = $this->decode($value);
|
||||
}
|
||||
elseif ($this->xss_clean)
|
||||
{
|
||||
$array[$key] = $CI->security->xss_clean($array[$key]);
|
||||
$array[$key] = $CI->security->xss_clean($value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,10 +993,11 @@ class XML_RPC_Response
|
||||
reset($xmlrpc_val->me['struct']);
|
||||
$arr = array();
|
||||
|
||||
while (list($key,$value) = each($xmlrpc_val->me['struct']))
|
||||
foreach ($xmlrpc_val->me['struct'] as $key => &$value)
|
||||
{
|
||||
$arr[$key] = $this->xmlrpc_decoder($value);
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
@@ -1181,7 +1181,7 @@ class XML_RPC_Message extends CI_Xmlrpc
|
||||
$data = implode("\r\n", $lines);
|
||||
|
||||
// Parse XML data
|
||||
if ( ! xml_parse($parser, $data, count($data)))
|
||||
if ( ! xml_parse($parser, $data, TRUE))
|
||||
{
|
||||
$errstr = sprintf('XML error: %s at line %d',
|
||||
xml_error_string(xml_get_error_code($parser)),
|
||||
@@ -1563,17 +1563,17 @@ class XML_RPC_Message extends CI_Xmlrpc
|
||||
|
||||
if ( ! empty($array))
|
||||
{
|
||||
while (list($key) = each($array))
|
||||
foreach ($array as $key => &$value)
|
||||
{
|
||||
if (is_array($array[$key]))
|
||||
if (is_array($value))
|
||||
{
|
||||
$array[$key] = $this->output_parameters($array[$key]);
|
||||
$array[$key] = $this->output_parameters($value);
|
||||
}
|
||||
elseif ($key !== 'bits' && $this->xss_clean)
|
||||
{
|
||||
// 'bits' is for the MetaWeblog API image bits
|
||||
// @todo - this needs to be made more general purpose
|
||||
$array[$key] = $CI->security->xss_clean($array[$key]);
|
||||
$array[$key] = $CI->security->xss_clean($value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1633,7 +1633,7 @@ class XML_RPC_Message extends CI_Xmlrpc
|
||||
reset($param->me['struct']);
|
||||
$arr = array();
|
||||
|
||||
while (list($key,$value) = each($param->me['struct']))
|
||||
foreach ($param->me['struct'] as $key => &$value)
|
||||
{
|
||||
$arr[$key] = $this->decode_message($value);
|
||||
}
|
||||
@@ -1824,7 +1824,7 @@ class XML_RPC_Values extends CI_Xmlrpc
|
||||
// struct
|
||||
$rs .= "<struct>\n";
|
||||
reset($val);
|
||||
while (list($key2, $val2) = each($val))
|
||||
foreach ($val as $key2 => &$val2)
|
||||
{
|
||||
$rs .= "<member>\n<name>{$key2}</name>\n".$this->serializeval($val2)."</member>\n";
|
||||
}
|
||||
@@ -1885,11 +1885,9 @@ class XML_RPC_Values extends CI_Xmlrpc
|
||||
*/
|
||||
public function serializeval($o)
|
||||
{
|
||||
$ar = $o->me;
|
||||
reset($ar);
|
||||
|
||||
list($typ, $val) = each($ar);
|
||||
return "<value>\n".$this->serializedata($typ, $val)."</value>\n";
|
||||
$array = $o->me;
|
||||
list($value, $type) = array(reset($array), key($array));
|
||||
return "<value>\n".$this->serializedata($type, $value)."</value>\n";
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
@@ -1901,8 +1899,7 @@ class XML_RPC_Values extends CI_Xmlrpc
|
||||
*/
|
||||
public function scalarval()
|
||||
{
|
||||
reset($this->me);
|
||||
return current($this->me);
|
||||
return reset($this->me);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user