From 4e6fa932cb588f745ed48aed61f7d7304f1afd21 Mon Sep 17 00:00:00 2001 From: bgigon Date: Tue, 20 Jul 2004 16:11:31 +0000 Subject: [PATCH] Add feature "rejected line" Somes lines has been rejected. This features warn admin directly --- phpgwapi/inc/class.translation_sql.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 134d2aef4f..937d4b3b33 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -44,6 +44,7 @@ { var $userlang = 'en'; var $loaded_apps = array(); + var $line_rejected = array(); function translation($warnings = False) { @@ -412,6 +413,13 @@ $lines = file($appfile); foreach($lines as $line) { + $line = eregi_replace("\t+", "\t", $line); + $_f_buffer = split("\t", $line); + if( count($_f_buffer) > 4 ) + { + $this->line_rejected[] = Array("appfile" => $appfile, "line" => $line); + } + // explode with "\t" and removing "\n" with str_replace, needed to work with mbstring.overload=7 list($message_id,$app_name,,$content) = explode("\t",$line); $content=str_replace("\n",'',$content);