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
a4797a0e
Commit
a4797a0e
authored
10 years ago
by
Cédric Gross
Committed by
Laurent Destailleur
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
FIX : [ bug #1317 ] Removing a category does not remove all child categories
parent
ab6a6705
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/categories/class/categorie.class.php
+14
-0
14 additions, 0 deletions
htdocs/categories/class/categorie.class.php
with
14 additions
and
0 deletions
htdocs/categories/class/categorie.class.php
+
14
−
0
View file @
a4797a0e
...
...
@@ -290,6 +290,20 @@ class Categorie
$this
->
db
->
begin
();
/* FIX #1317 : Check for child cat and move up 1 level*/
if
(
!
$error
)
{
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"categorie"
;
$sql
.
=
" SET fk_parent = "
.
$this
->
fk_parent
;
$sql
.
=
" WHERE fk_parent = "
.
$this
->
id
;
if
(
!
$this
->
db
->
query
(
$sql
))
{
$this
->
error
=
$this
->
db
->
lasterror
();
dol_syslog
(
"Error sql="
.
$sql
.
" "
.
$this
->
error
,
LOG_ERR
);
$error
++
;
}
}
if
(
!
$error
)
{
$sql
=
"DELETE FROM "
.
MAIN_DB_PREFIX
.
"categorie_societe"
;
...
...
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