From a30da2e71ad2ed23cbcb6011ab848ab888b2dd46 Mon Sep 17 00:00:00 2001 From: knut <> Date: Wed, 22 Feb 2006 21:46:16 +0000 Subject: Did some minor optimization tweaks --- framework/I18N/core/MessageSource_gettext.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/I18N/core/MessageSource_gettext.php') diff --git a/framework/I18N/core/MessageSource_gettext.php b/framework/I18N/core/MessageSource_gettext.php index 5c6d05af..b358a618 100644 --- a/framework/I18N/core/MessageSource_gettext.php +++ b/framework/I18N/core/MessageSource_gettext.php @@ -136,9 +136,9 @@ class MessageSource_gettext extends MessageSource $variant = null; - for($i = 0; $i < count($variants); $i++) + for($i = 0, $k = count($variants); $i < $k; ++$i) { - if(strlen($variants[$i])>0) + if(isset($variants[$i]{0})) { $variant .= ($variant)?'_'.$variants[$i]:$variants[$i]; $catalogues[] = $catalogue.$this->dataSeparator. @@ -165,9 +165,9 @@ class MessageSource_gettext extends MessageSource $variant = null; - for($i = 0; $i < count($variants); $i++) + for($i = 0, $k = count($variants); $i < $k; ++$i) { - if(strlen($variants[$i])>0) + if(isset($variants[$i]{0})) { $variant .= ($variant)?'_'.$variants[$i]:$variants[$i]; $catalogues[] = $variant.'/'.$catalogue.$this->dataExt; -- cgit v1.2.3