Req #15975 [Opn->WFx]: need extra condition check to Lang decorator

From: Date: Sun, 29 Mar 2009 17:06:51 +0000
Subject: Req #15975 [Opn->WFx]: need extra condition check to Lang decorator
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-280@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=15975&edit=1 ID: 15975 Updated by: l.alberton@quipo.it Reported By: cert21 at ptd dot net Summary: need extra condition check to Lang decorator -Status: Open +Status: Wont fix Type: Feature/Change Request Package: Translation2 Operating System: RHEL4 PHP Version: 5.2.0 -Assigned To: +Assigned To: quipo Roadmap Versions: New Comment: -Status: Open +Status: Wont fix -Assigned To: +Assigned To: quipo I'd argue that you shouldn't load the Lang decorator at all if you use the same $lang as primary and fallback languages ;-) Add a check for it before loading the decorator. That's more efficient than checking on every function call. Previous Comments: ------------------------------------------------------------------------ [2009-03-04 01:10:50] snytkine Description: ------------ In the Lang decorator::getPage there should be a check to check that $lang is different from $this->fallbackLang before asking the tr2 to get a separate array for a default key For example if the currentLang is set to english and fallbackLang is also set to english, then why waste time to select the same array for a fallback lang when we know it's going to be the same array. Test script: --------------- Expected result: ---------------- Actual result: -------------- ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=15975&edit=1

« previous php.pear.bugs (#280) next »