Skip to content
Snippets Groups Projects
Commit 4ca09410 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Can add a data file into a module

parent 01af1c5b
Branches
Tags
No related merge requests found
...@@ -38,7 +38,8 @@ For developers: ...@@ -38,7 +38,8 @@ For developers:
- Removed useless code of old commercial module. - Removed useless code of old commercial module.
- Updated wiki documentation. - Updated wiki documentation.
- Better W3C standard. - Better W3C standard.
- Can add data provided with a module.
***** Changelog for 2.6 compared to 2.5 ***** ***** Changelog for 2.6 compared to 2.5 *****
......
...@@ -442,7 +442,7 @@ class DolibarrModules ...@@ -442,7 +442,7 @@ class DolibarrModules
{ {
while (($file = readdir($handle))!==false) 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); $result=run_sql($dir.$file,1);
} }
...@@ -456,7 +456,7 @@ class DolibarrModules ...@@ -456,7 +456,7 @@ class DolibarrModules
{ {
while (($file = readdir($handle))!==false) 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); $result=run_sql($dir.$file,1);
} }
...@@ -464,13 +464,13 @@ class DolibarrModules ...@@ -464,13 +464,13 @@ class DolibarrModules
closedir($handle); closedir($handle);
} }
// Run llx_data.sql files // Run data.sql files
$handle=@opendir($dir); // Dir may not exist $handle=@opendir($dir); // Dir may not exist
if ($handle) if ($handle)
{ {
while (($file = readdir($handle))!==false) 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); $result=run_sql($dir.$file,1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment