diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-05-17 14:55:08 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-05-17 14:55:08 +0200 |
commit | 55450deee2acbdf112f5c206673b3215ca10dfcb (patch) | |
tree | 09fa0f810524ed353f868194059f336c6f26eb50 /system/libraries/Parser.php | |
parent | 351c2e1b0d3fdca80a5483d708d7c71084226e68 (diff) | |
parent | e30b3f7afafa2c016cf78cc8bb8a457c2dbcda8c (diff) |
merge upstream
Diffstat (limited to 'system/libraries/Parser.php')
-rw-r--r-- | system/libraries/Parser.php | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index c40f339b4..a0b60ed97 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -42,14 +42,14 @@ class CI_Parser { * @var string */ public $l_delim = '{'; - + /** * Right delimeter character for psuedo vars * * @var string */ public $r_delim = '}'; - + /** * Reference to CodeIgniter instance * @@ -116,14 +116,9 @@ class CI_Parser { foreach ($data as $key => $val) { - if (is_array($val)) - { - $template = $this->_parse_pair($key, $val, $template); - } - else - { - $template = $this->_parse_single($key, (string)$val, $template); - } + $template = is_array($val) + ? $this->_parse_pair($key, $val, $template) + : $template = $this->_parse_single($key, (string) $val, $template); } if ($return == FALSE) @@ -189,14 +184,9 @@ class CI_Parser { $temp = $match[1]; foreach ($row as $key => $val) { - if ( ! is_array($val)) - { - $temp = $this->_parse_single($key, $val, $temp); - } - else - { - $temp = $this->_parse_pair($key, $val, $temp); - } + $temp = is_array($val) + ? $this->_parse_pair($key, $val, $temp) + : $this->_parse_single($key, $val, $temp); } $str .= $temp; |