Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
4ca09410
Commit
4ca09410
authored
16 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Can add a data file into a module
parent
01af1c5b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-1
2 additions, 1 deletion
ChangeLog
htdocs/includes/modules/DolibarrModules.class.php
+4
-4
4 additions, 4 deletions
htdocs/includes/modules/DolibarrModules.class.php
with
6 additions
and
5 deletions
ChangeLog
+
2
−
1
View file @
4ca09410
...
@@ -38,6 +38,7 @@ For developers:
...
@@ -38,6 +38,7 @@ 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 *****
...
...
This diff is collapsed.
Click to expand it.
htdocs/includes/modules/DolibarrModules.class.php
+
4
−
4
View file @
4ca09410
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment