Subversion-Projekte lars-tiefland.ci

Revision

Revision 2049 | Revision 2242 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2049 Revision 2107
Zeile 236... Zeile 236...
236
	 * @var	object
236
	 * @var	object
237
	 */
237
	 */
238
	public $result;
238
	public $result;
Zeile 239... Zeile 239...
239
 
239
 
240
	/**
240
	/**
241
	 * XML-RPC Reponse
241
	 * XML-RPC Response
242
	 *
242
	 *
243
	 * @var	array
243
	 * @var	array
244
	 */
244
	 */
Zeile 458... Zeile 458...
458
			}
458
			}
459
			else
459
			else
460
			{
460
			{
461
				if (is_array($value[0]) && ($value[1] === 'struct' OR $value[1] === 'array'))
461
				if (is_array($value[0]) && ($value[1] === 'struct' OR $value[1] === 'array'))
462
				{
462
				{
463
					while (list($k) = each($value[0]))
463
					foreach (array_keys($value[0]) as $k)
464
					{
464
					{
465
						$value[0][$k] = $this->values_parsing($value[0][$k]);
465
						$value[0][$k] = $this->values_parsing($value[0][$k]);
466
					}
466
					}
467
				}
467
				}
Zeile 929... Zeile 929...
929
	{
929
	{
930
		$CI =& get_instance();
930
		$CI =& get_instance();
Zeile 931... Zeile 931...
931
 
931
 
932
		if (is_array($array))
932
		if (is_array($array))
933
		{
933
		{
934
			while (list($key) = each($array))
934
			foreach ($array as $key => &$value)
935
			{
935
			{
936
				if (is_array($array[$key]))
936
				if (is_array($value))
937
				{
937
				{
938
					$array[$key] = $this->decode($array[$key]);
938
					$array[$key] = $this->decode($value);
939
				}
939
				}
940
				elseif ($this->xss_clean)
940
				elseif ($this->xss_clean)
941
				{
941
				{
942
					$array[$key] = $CI->security->xss_clean($array[$key]);
942
					$array[$key] = $CI->security->xss_clean($value);
943
				}
943
				}
Zeile 944... Zeile 944...
944
			}
944
			}
945
 
945
 
Zeile 991... Zeile 991...
991
		elseif ($kind === 'struct')
991
		elseif ($kind === 'struct')
992
		{
992
		{
993
			reset($xmlrpc_val->me['struct']);
993
			reset($xmlrpc_val->me['struct']);
994
			$arr = array();
994
			$arr = array();
Zeile 995... Zeile 995...
995
 
995
 
996
			while (list($key,$value) = each($xmlrpc_val->me['struct']))
996
			foreach ($xmlrpc_val->me['struct'] as $key => &$value)
997
			{
997
			{
998
				$arr[$key] = $this->xmlrpc_decoder($value);
998
				$arr[$key] = $this->xmlrpc_decoder($value);
-
 
999
			}
999
			}
1000
 
1000
			return $arr;
1001
			return $arr;
1001
		}
1002
		}
Zeile 1002... Zeile 1003...
1002
	}
1003
	}
Zeile 1560... Zeile 1561...
1560
	{
1561
	{
1561
		$CI =& get_instance();
1562
		$CI =& get_instance();
Zeile 1562... Zeile 1563...
1562
 
1563
 
1563
		if ( ! empty($array))
1564
		if ( ! empty($array))
1564
		{
1565
		{
1565
			while (list($key) = each($array))
1566
			foreach ($array as $key => &$value)
1566
			{
1567
			{
1567
				if (is_array($array[$key]))
1568
				if (is_array($value))
1568
				{
1569
				{
1569
					$array[$key] = $this->output_parameters($array[$key]);
1570
					$array[$key] = $this->output_parameters($value);
1570
				}
1571
				}
1571
				elseif ($key !== 'bits' && $this->xss_clean)
1572
				elseif ($key !== 'bits' && $this->xss_clean)
1572
				{
1573
				{
1573
					// 'bits' is for the MetaWeblog API image bits
1574
					// 'bits' is for the MetaWeblog API image bits
1574
					// @todo - this needs to be made more general purpose
1575
					// @todo - this needs to be made more general purpose
1575
					$array[$key] = $CI->security->xss_clean($array[$key]);
1576
					$array[$key] = $CI->security->xss_clean($value);
1576
				}
1577
				}
Zeile 1577... Zeile 1578...
1577
			}
1578
			}
1578
 
1579
 
Zeile 1630... Zeile 1631...
1630
		elseif ($kind === 'struct')
1631
		elseif ($kind === 'struct')
1631
		{
1632
		{
1632
			reset($param->me['struct']);
1633
			reset($param->me['struct']);
1633
			$arr = array();
1634
			$arr = array();
Zeile 1634... Zeile 1635...
1634
 
1635
 
1635
			while (list($key,$value) = each($param->me['struct']))
1636
			foreach ($param->me['struct'] as $key => &$value)
1636
			{
1637
			{
1637
				$arr[$key] = $this->decode_message($value);
1638
				$arr[$key] = $this->decode_message($value);
Zeile 1638... Zeile 1639...
1638
			}
1639
			}
Zeile 1821... Zeile 1822...
1821
		{
1822
		{
1822
			case 3:
1823
			case 3:
1823
				// struct
1824
				// struct
1824
				$rs .= "<struct>\n";
1825
				$rs .= "<struct>\n";
1825
				reset($val);
1826
				reset($val);
1826
				while (list($key2, $val2) = each($val))
1827
				foreach ($val as $key2 => &$val2)
1827
				{
1828
				{
1828
					$rs .= "<member>\n<name>{$key2}</name>\n".$this->serializeval($val2)."</member>\n";
1829
					$rs .= "<member>\n<name>{$key2}</name>\n".$this->serializeval($val2)."</member>\n";
1829
				}
1830
				}
1830
				$rs .= '</struct>';
1831
				$rs .= '</struct>';
1831
				break;
1832
				break;
Zeile 1882... Zeile 1883...
1882
	 * @param	object
1883
	 * @param	object
1883
	 * @return	string
1884
	 * @return	string
1884
	 */
1885
	 */
1885
	public function serializeval($o)
1886
	public function serializeval($o)
1886
	{
1887
	{
1887
		$ar = $o->me;
1888
		$array = $o->me;
1888
		reset($ar);
-
 
1889
 
-
 
1890
		list($typ, $val) = each($ar);
1889
		list($value, $type) = array(reset($array), key($array));
1891
		return "<value>\n".$this->serializedata($typ, $val)."</value>\n";
1890
		return "<value>\n".$this->serializedata($type, $value)."</value>\n";
1892
	}
1891
	}
Zeile 1893... Zeile 1892...
1893
 
1892
 
Zeile 1894... Zeile 1893...
1894
	// --------------------------------------------------------------------
1893
	// --------------------------------------------------------------------
Zeile 1898... Zeile 1897...
1898
	 *
1897
	 *
1899
	 * @return	mixed
1898
	 * @return	mixed
1900
	 */
1899
	 */
1901
	public function scalarval()
1900
	public function scalarval()
1902
	{
1901
	{
1903
		reset($this->me);
-
 
1904
		return current($this->me);
1902
		return reset($this->me);
1905
	}
1903
	}
Zeile 1906... Zeile 1904...
1906
 
1904
 
Zeile 1907... Zeile 1905...
1907
	// --------------------------------------------------------------------
1905
	// --------------------------------------------------------------------