[Vtigercrm-developers] Issue with PackageImport.php and language files
Jonathan Sardo
sardoj at gmail.com
Thu Dec 12 08:27:38 GMT 2013
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):
*// Language file present in en_us folder$pattern =
'/languages\/en_us\/([^\/]+).php/';preg_match($pattern, $filename,
$matches); if(count($matches)) { $language_modulename = $matches[1]; }*
*// or Language file may be present in en_us/Settings
folder$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)){*
*// Language file present in en_us folder*
*$pattern = '/languages\/en_us\/([^\/]+).php/'; *
*preg_match($pattern, $filename, $matches);**if(count($matches))
{ $language_modulename = $matches[1]; }*
*// or Language file may be present in en_us/Settings
folder$settingsPattern = '/languages\/en_us\/Settings\/([^\/]+).php/';
preg_match($settingsPattern, $filename, $matches);if(count($matches))
{ $language_modulename = $matches[1]; } }*
I will write a ticket about this problem.
Regards,
Jonathan SARDO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20131212/907f6f83/attachment.html>
More information about the vtigercrm-developers
mailing list