Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Demat4Dolibarr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
Dolibarr extension
Demat4Dolibarr
Commits
f4fc16a4
Commit
f4fc16a4
authored
2 years ago
by
Alexandre SPANGARO
Browse files
Options
Downloads
Patches
Plain Diff
Fix error 500
parent
e64e380d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog.md
+3
-0
3 additions, 0 deletions
ChangeLog.md
class/ededoc.class.php
+8
-7
8 additions, 7 deletions
class/ededoc.class.php
core/modules/modDemat4Dolibarr.class.php
+1
-1
1 addition, 1 deletion
core/modules/modDemat4Dolibarr.class.php
with
12 additions
and
8 deletions
ChangeLog.md
+
3
−
0
View file @
f4fc16a4
...
...
@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [7.0.46] - 07-02-2023
-
Correction erreur php 500 (function _purgeExpiredFile())
## [7.0.45] - 18-01-2023
-
Correction de la tache cron (retours de la fonction)
...
...
This diff is collapsed.
Click to expand it.
class/ededoc.class.php
+
8
−
7
View file @
f4fc16a4
...
...
@@ -1203,6 +1203,7 @@ class EdeDoc
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"demat4dolibarr_ededoc_file"
;
$sql
.
=
" WHERE expire_date IS NOT NULL"
;
$sql
.
=
" AND expire_date < NOW()"
;
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
!
$resql
)
{
$this
->
errors
[]
=
'Error '
.
$this
->
db
->
lasterror
();
...
...
@@ -1211,14 +1212,14 @@ class EdeDoc
}
while
(
$obj
=
$this
->
db
->
fetch_object
(
$resql
))
{
$sql
=
"DELETE FROM "
.
MAIN_DB_PREFIX
.
"demat4dolibarr_ededoc_file"
;
$sql
.
=
" WHERE file_path = '"
.
$this
->
db
->
escape
(
$obj
->
file_path
)
.
"'"
;
$sql
.
=
" AND document_id = '"
.
$this
->
db
->
escape
(
$obj
->
document_id
)
.
"'"
;
$sql
.
=
" AND checksum = '"
.
$this
->
db
->
escape
(
$obj
->
checksum
)
.
"'"
;
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
!
$resql
)
{
$sql
2
=
"DELETE FROM "
.
MAIN_DB_PREFIX
.
"demat4dolibarr_ededoc_file"
;
$sql
2
.
=
" WHERE file_path = '"
.
$this
->
db
->
escape
(
$obj
->
file_path
)
.
"'"
;
$sql
2
.
=
" AND document_id = '"
.
$this
->
db
->
escape
(
$obj
->
document_id
)
.
"'"
;
$sql
2
.
=
" AND checksum = '"
.
$this
->
db
->
escape
(
$obj
->
checksum
)
.
"'"
;
$resql
2
=
$this
->
db
->
query
(
$sql
2
);
if
(
!
$resql
2
)
{
$this
->
errors
[]
=
'Error '
.
$this
->
db
->
lasterror
();
dol_syslog
(
__METHOD__
.
" SQL: "
.
$sql
.
"; Error: "
.
$this
->
db
->
lasterror
(),
LOG_ERR
);
dol_syslog
(
__METHOD__
.
" SQL: "
.
$sql
2
.
"; Error: "
.
$this
->
db
->
lasterror
(),
LOG_ERR
);
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
core/modules/modDemat4Dolibarr.class.php
+
1
−
1
View file @
f4fc16a4
...
...
@@ -74,7 +74,7 @@ class modDemat4Dolibarr extends DolibarrModules
$this
->
editor_url
=
'http://www.open-dsi.fr'
;
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this
->
version
=
'7.0.4
5
'
;
$this
->
version
=
'7.0.4
6
'
;
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this
->
const_name
=
'MAIN_MODULE_'
.
strtoupper
(
$this
->
name
);
// Name of image file used for this module.
...
...
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