diff options
author | Andrey Andreev <narf@bofh.bg> | 2011-12-30 11:49:27 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2011-12-30 11:49:27 +0100 |
commit | 6209015edde25e8ca82a8e8f5eb5a5eda2750e7b (patch) | |
tree | b640a08010aa32f8877ff6260d85143bb30c6369 /system/libraries/Xmlrpc.php | |
parent | a30faf95d1d833f716dd1e181cef5b33b02ef8b9 (diff) |
Some more optimizations
Diffstat (limited to 'system/libraries/Xmlrpc.php')
-rw-r--r-- | system/libraries/Xmlrpc.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index ebb04601b..2804e6685 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -542,7 +542,7 @@ class XML_RPC_Response elseif ($kind == 'array') { reset($xmlrpc_val->me); - list($a,$b) = each($xmlrpc_val->me); + list(, $b) = each($xmlrpc_val->me); $arr = array(); for ($i = 0, $size = count($b); $i < $size; $i++) @@ -1150,7 +1150,7 @@ class XML_RPC_Message extends CI_Xmlrpc elseif ($kind == 'array') { reset($param->me); - list($a,$b) = each($param->me); + list(, $b) = each($param->me); $arr = array(); @@ -1359,7 +1359,7 @@ class XML_RPC_Values extends CI_Xmlrpc public function scalarval() { reset($this->me); - list($a,$b) = each($this->me); + list(, $b) = each($this->me); return $b; } @@ -1370,14 +1370,9 @@ class XML_RPC_Values extends CI_Xmlrpc // Useful for sending time in XML-RPC - public function iso8601_encode($time, $utc=0) + public function iso8601_encode($time, $utc = 0) { - if ($utc == 1) - { - return strftime("%Y%m%dT%H:%i:%s", $time); - } - - return (function_exists('gmstrftime')) ? gmstrftime('%Y%m%dT%H:%i:%s', $time) : strftime('%Y%m%dT%H:%i:%s', $time - date('Z')); + return ($utc) ? strftime('%Y%m%dT%H:%i:%s', $time) : gmstrftime('%Y%m%dT%H:%i:%s', $time); } } |