From 4ca0941076d4022bfb5f021b2266ed563b42d0f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Thu, 4 Jun 2009 20:55:01 +0000 Subject: [PATCH] New: Can add a data file into a module --- ChangeLog | 3 ++- htdocs/includes/modules/DolibarrModules.class.php | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01f110214c8..f888839413a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,7 +38,8 @@ For developers: - Removed useless code of old commercial module. - Updated wiki documentation. - Better W3C standard. - +- Can add data provided with a module. + ***** Changelog for 2.6 compared to 2.5 ***** diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index d2bcd1e6d5d..dce5cc0c8d9 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -442,7 +442,7 @@ class DolibarrModules { while (($file = readdir($handle))!==false) { - if (eregi('\.sql$',$file) && ! eregi('\.key\.sql$',$file) && substr($file,0,4) == 'llx_' && substr($file,0,8) != 'llx_data') + if (eregi('\.sql$',$file) && ! eregi('\.key\.sql$',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { $result=run_sql($dir.$file,1); } @@ -456,7 +456,7 @@ class DolibarrModules { while (($file = readdir($handle))!==false) { - if (eregi('\.key\.sql$',$file) && substr($file,0,4) == 'llx_' && substr($file,0,8) != 'llx_data') + if (eregi('\.key\.sql$',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data') { $result=run_sql($dir.$file,1); } @@ -464,13 +464,13 @@ class DolibarrModules closedir($handle); } - // Run llx_data.sql files + // Run data.sql files $handle=@opendir($dir); // Dir may not exist if ($handle) { while (($file = readdir($handle))!==false) { - if (eregi('\.sql$',$file) && ! eregi('\.key\.sql$',$file) && substr($file,0,8) == 'llx_data') + if (eregi('\.sql$',$file) && ! eregi('\.key\.sql$',$file) && substr($file,0,4) == 'data') { $result=run_sql($dir.$file,1); } -- GitLab