move non-mail specific methods of translation class to Api\Translation

This commit is contained in:
Ralf Becker 2016-03-05 10:47:20 +00:00
parent ea798d93f2
commit 49f75bc8dd
5 changed files with 1124 additions and 1101 deletions

View File

@ -11,7 +11,6 @@
namespace EGroupware\Api;
use egw_customfields;
use translation;
/**
* eGW's application configuration in a centralized location
@ -295,7 +294,7 @@ class Config
//$client_config[$app]['customfields'] = egw_customfields::get($app);
}
// some things need on client-side which are not direct configs
$client_config['phpgwapi']['max_lang_time'] = translation::max_lang_time();
$client_config['phpgwapi']['max_lang_time'] = Translation::max_lang_time();
return $client_config;
}

View File

@ -15,7 +15,6 @@ namespace EGroupware\Api\Db;
use EGroupware\Api;
use translation;
use html;
/**
@ -641,7 +640,7 @@ class Backup
{
if ($convert_to_system_charset && !$this->db->capabilities['client_encoding'])
{
$data = translation::convert($data,$charset);
$data = Api\Translation::convert($data,$charset);
}
if ($insert_n_rows > 1)
{

1110
api/src/Translation.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,6 @@ namespace EGroupware\Api;
use mime_magic;
use common;
use html;
use translation;
use HTTP_WebDAV_Server;
use egw_time;
@ -1518,7 +1517,7 @@ class Vfs extends Vfs\StreamWrapper
// Use safe names - replace unsafe chars, convert to ASCII (ZIP spec says CP437, but we'll try)
$path = explode('/',$relative);
$_name = translation::convert(translation::to_ascii(implode('/', str_replace($replace,'_',$path))),false,'ASCII');
$_name = Translation::convert(Translation::to_ascii(implode('/', str_replace($replace,'_',$path))),false,'ASCII');
// Don't go infinite with app entries
if(self::is_link($addfile))

File diff suppressed because it is too large Load Diff