Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Jul 2, 3:57 AM

in-portal

Index: trunk/kernel/units/languages/languages_tag_processor.php
===================================================================
--- trunk/kernel/units/languages/languages_tag_processor.php (revision 3114)
+++ trunk/kernel/units/languages/languages_tag_processor.php (revision 3115)
@@ -1,68 +1,67 @@
<?php
- class LanguagesTagProcessor extends kDBTagProcessor
+ class LanguagesTagProcessor extends kDBTagProcessor
{
-
+
/**
* Guesses what charset should be used:
* 1. use lang.current_Field field="Charset" by default
* 2. if using temp tables then use lang_Field field="Charset"
*
* @param Array $params
* @return string
*/
function GetCharset($params)
{
$edit_direct = $this->Application->GetVar('phrases_label');
-
+
$top_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
if( $this->Application->GetVar($top_prefix.'_mode') == 't' && !$edit_direct )
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
- return $object->GetDBField('Charset');
+ return $object->GetDBField('Charset');
}
$lang_current =& $this->Application->recallObject('lang.current');
return $lang_current->GetDBField('Charset');
}
-
+
function ListLanguages($params)
{
$this->Special = 'enabled';
return $this->PrintList2($params);
}
function SelectedLanguage($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial());
-
- return $object->GetDBField('LanguageId') == $this->Application->RecallVar('m_lang');
+ return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang');
}
-
+
/**
* Returns path where exported languages should be saved
*
* @param unknown_type $params
*/
function ExportPath($params)
{
$admin_folder = $this->Application->ConfigValue('AdminDirectory');
if(!$admin_folder) $admin_folder = 'admin';
$ret = FULL_PATH.'/'.$admin_folder.'/export/';
-
+
if( getArrayValue($params,'as_url') )
{
- $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
+ $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
}
return $ret;
}
-
+
/* function Main_IsMetricUnits($params)
{
$object =& $this->Application->recallObject($this->Prefix.'.current');
$measure_system = $object->GetDBField('UnitSystem');
return $measure_system == 1 ? 1 : 0;
}*/
-
+
}
?>
\ No newline at end of file
Property changes on: trunk/kernel/units/languages/languages_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property
Index: trunk/core/units/languages/languages_tag_processor.php
===================================================================
--- trunk/core/units/languages/languages_tag_processor.php (revision 3114)
+++ trunk/core/units/languages/languages_tag_processor.php (revision 3115)
@@ -1,68 +1,67 @@
<?php
- class LanguagesTagProcessor extends kDBTagProcessor
+ class LanguagesTagProcessor extends kDBTagProcessor
{
-
+
/**
* Guesses what charset should be used:
* 1. use lang.current_Field field="Charset" by default
* 2. if using temp tables then use lang_Field field="Charset"
*
* @param Array $params
* @return string
*/
function GetCharset($params)
{
$edit_direct = $this->Application->GetVar('phrases_label');
-
+
$top_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
if( $this->Application->GetVar($top_prefix.'_mode') == 't' && !$edit_direct )
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
- return $object->GetDBField('Charset');
+ return $object->GetDBField('Charset');
}
$lang_current =& $this->Application->recallObject('lang.current');
return $lang_current->GetDBField('Charset');
}
-
+
function ListLanguages($params)
{
$this->Special = 'enabled';
return $this->PrintList2($params);
}
function SelectedLanguage($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial());
-
- return $object->GetDBField('LanguageId') == $this->Application->RecallVar('m_lang');
+ return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang');
}
-
+
/**
* Returns path where exported languages should be saved
*
* @param unknown_type $params
*/
function ExportPath($params)
{
$admin_folder = $this->Application->ConfigValue('AdminDirectory');
if(!$admin_folder) $admin_folder = 'admin';
$ret = FULL_PATH.'/'.$admin_folder.'/export/';
-
+
if( getArrayValue($params,'as_url') )
{
- $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
+ $ret = str_replace( FULL_PATH.'/', $this->Application->BaseURL(), $ret);
}
return $ret;
}
-
+
/* function Main_IsMetricUnits($params)
{
$object =& $this->Application->recallObject($this->Prefix.'.current');
$measure_system = $object->GetDBField('UnitSystem');
return $measure_system == 1 ? 1 : 0;
}*/
-
+
}
?>
\ No newline at end of file
Property changes on: trunk/core/units/languages/languages_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property

Event Timeline