Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2010-11-06 22:24:43 +0300
committerrobocoder <anthon.pang@gmail.com>2010-11-06 22:24:43 +0300
commit8d92330ddfcb90605ba5cf69c911fa463ef9b882 (patch)
treef3b112a0e4b46156697ef8f972f369cdfb87b715 /core/SmartyPlugins
parent9030acee19745a17716ac49fefb53cf26f509e1d (diff)
micro-optimizations and some code clean-up
git-svn-id: http://dev.piwik.org/svn/trunk@3296 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/SmartyPlugins')
-rw-r--r--core/SmartyPlugins/modifier.escape.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/SmartyPlugins/modifier.escape.php b/core/SmartyPlugins/modifier.escape.php
index 06c9892020..31e6998453 100644
--- a/core/SmartyPlugins/modifier.escape.php
+++ b/core/SmartyPlugins/modifier.escape.php
@@ -45,21 +45,21 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-88
case 'hex':
// escape every character into hex
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0, $len = strlen($string); $x < $len; $x++) {
$return .= '%' . bin2hex($string[$x]);
}
return $return;
case 'hexentity':
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0, $len = strlen($string); $x < $len; $x++) {
$return .= '&#x' . bin2hex($string[$x]) . ';';
}
return $return;
case 'decentity':
$return = '';
- for ($x=0; $x < strlen($string); $x++) {
+ for ($x=0, $len = strlen($string); $x < $len; $x++) {
$return .= '&#' . ord($string[$x]) . ';';
}
return $return;