New: Can add a data file into a module
This commit is contained in:
parent
01af1c5bf8
commit
4ca0941076
@ -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 *****
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user