[Chameleon] MLT.php - bug or correct code?
mcgrawj at AGR.GC.CA
Wed Sep 28 16:57:43 EDT 2005
I instantiated and loaded a new MLTdBase object, but could never find the corresponding language for a key value in it until I made the following change to mlt.php. Is it possible that line 357 in mlt.php is supposed to be (notice the two 'strtoupper' functions, rather than just the one):
$this->aszMLT[trim($aRec["KEY"])][strtoupper($mLang)] = $aRec[strtoupper($mLang)];
What is currently there is:
$this->aszMLT[trim($aRec["KEY"])][$mLang] = $aRec[strtoupper($mLang)];
Perhaps there was something more I was supposed to be doing in my code for the code to work as it was written. I have the following:
$szLang = $_SESSION["gszCurrentLanguage"] ; // "en-CA";
$myMLT = new MLTdBase($szLang);
echo $myMLT->get("0", "Blah");
It should have been displaying "Help" (or "Aide", if $szLang was "fr-CA"). It wasn't finding any corresponding record though, until I made the above change.
Is this a bug or do I need to do something more in my code?
Joanne T. McGraw
Spatial Data Visualization Specialist / Spécialiste en visualisation des données spatiales
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: (613) 759-6103
Facsimile/Télécopieur: (613) 759-1937
960 Carling Ave, #1136
mcgrawj at agr.gc.ca
More information about the Chameleon