[Vtigercrm-commits] [Vtiger development] #7843: Issue with PackageImport.php and language files
Vtiger development
vtiger-tickets at trac.vtiger.com
Thu Dec 12 08:32:27 GMT 2013
#7843: Issue with PackageImport.php and language files
-----------------------+-------------------------------------------
Reporter: sardoj | Owner: developer
Type: defect | Status: new
Priority: major | Milestone: Unassigned
Component: vtigercrm | Version: 6.0.0 RC
Severity: Medium | Keywords: PackageImport, Language files
-----------------------+-------------------------------------------
Hello,
I am working on a module which includes Vtiger 6 Module templates.
So there is in this module, that kind of file:
templates/6.0.0/languages/en_us/ModuleFile.php
The checkZip() function (file: /vtlib/Vtiger/PackageImport.php) thinks
that my module's language file is called ModuleFile.php
To eliminate the issue, it is necessary to replace this code (from line
177):
''$pattern = '/languages\/en_us\/([^\/]+).php/';
preg_match($pattern, $filename, $matches);
if(count($matches)) { $language_modulename = $matches[1]; }
$settingsPattern = '/languages\/en_us\/Settings\/([^\/]+).php/';
preg_match($settingsPattern, $filename, $matches);
if(count($matches)) { $language_modulename = $matches[1]; }''
By that code:
'''''if(empty($language_modulename)){'''
$pattern = '/languages\/en_us\/([^\/]+).php/';
preg_match($pattern, $filename, $matches);
if(count($matches)) { $language_modulename = $matches[1]; }
$settingsPattern = '/languages\/en_us\/Settings\/([^\/]+).php/';
preg_match($settingsPattern, $filename, $matches);
if(count($matches)) { $language_modulename = $matches[1]; }
'''}'''''
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7843>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list