Using static translation methods

This commit is contained in:
Ralf Becker 2009-04-28 16:05:04 +00:00
parent d5ee989859
commit d268d6d816
2 changed files with 28 additions and 33 deletions

View File

@ -97,7 +97,7 @@ class bodefinitions {
{
$export_data = array('metainfo' => array(
'type' => 'importexport definitions',
'charset' => $GLOBALS['egw']->translation->charset(),
'charset' => translation::charset(),
'entries' => count($keys),
));
@ -131,7 +131,6 @@ class bodefinitions {
*/
public static function import( $_import_file )
{
$translation = CreateObject('phpgwapi.translation');
if ( !is_file( $_import_file ) ) {
throw new Exception("'$_import_file' does not exist or is not readable" );
}
@ -143,10 +142,10 @@ class bodefinitions {
unset ( $data );
// convert charset into internal used charset
$definitions = $translation->convert(
$definitions = translation::convert(
$definitions,
$metainfo['charset'],
$translation->charset()
translation::charset()
);
// save definition(s) into internal table

View File

@ -19,10 +19,6 @@ require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.bodefinitions.inc.php');
// This sets up $GLOBALS['egw']->accounts and $GLOBALS['egw']->db
$GLOBALS['egw_setup']->setup_account_object();
// Fetch translation object
$GLOBALS['egw_setup']->translation->setup_translation_sql();
if ( !is_object($GLOBALS['egw']->translation) ) $GLOBALS['egw']->translation = $GLOBALS['egw_setup']->translation->sql;
// step through every source code intstalled app
$egwdir = dir(EGW_INCLUDE_ROOT);
while (false !== ($appdir = $egwdir->read())) {