From: <lph...@us...> - 2011-03-18 22:51:18
|
Revision: 33538 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=33538&view=rev Author: lphuberdeau Date: 2011-03-18 22:51:11 +0000 (Fri, 18 Mar 2011) Log Message: ----------- [FIX] Multilingual text field not always displaying the data correctly Modified Paths: -------------- trunk/lib/core/Tracker/Field/Text.php Modified: trunk/lib/core/Tracker/Field/Text.php =================================================================== --- trunk/lib/core/Tracker/Field/Text.php 2011-03-18 22:40:55 UTC (rev 33537) +++ trunk/lib/core/Tracker/Field/Text.php 2011-03-18 22:51:11 UTC (rev 33538) @@ -52,12 +52,23 @@ $data = array( 'value' => $thisVal, 'pvalue' => TikiLib::lib('tiki')->parse_data(htmlspecialchars($thisVal)), + 'lingualvalue' => array(), + 'lingualpvalue' => array(), ); if ($this->getConfiguration("isMultilingual") == 'y') { - $data['isMultilingual'] = 'y'; + if (! is_array($requestData[$id_string])) { + $out = array(); + foreach($prefs['available_languages'] as $num => $tmplang) { // TODO add a limit on number of langs - 40+ makes this blow up + if (!isset($out[$tmplang])) { // Case convert normal -> multilingual + $out[$tmplang] = $this->getValue($data['value'], $tmplang); + } + } + + $requestData[$id_string] = $out; + } + foreach($prefs['available_languages'] as $num => $tmplang) { // TODO add a limit on number of langs - 40+ makes this blow up - if (!isset($requestData[$id_string][$tmplang])) { // Case convert normal -> multilingual $requestData[$id_string][$tmplang] = $this->getValue($data['value'], $tmplang); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |