forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of [email protected]:Dolibarr/dolibarr.git into
develop
- Loading branch information
Showing
10 changed files
with
97 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,8 @@ | |
* Copyright (C) 2015 Raphaël Doursenaud <[email protected]> | ||
* Copyright (C) 2016 Charlie Benke <[email protected]> | ||
* Copyright (C) 2018-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2023 Benjamin Falière <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2023-2024 Benjamin Falière <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -1167,6 +1167,7 @@ public function get_full_arbo($type, $markafterid = 0, $include = 0) | |
} | ||
|
||
$this->cats = array(); | ||
$nbcateg = 0; | ||
|
||
// Init this->motherof that is array(id_son=>id_parent, ...) | ||
$this->load_motherof(); | ||
|
@@ -1188,6 +1189,8 @@ public function get_full_arbo($type, $markafterid = 0, $include = 0) | |
$resql = $this->db->query($sql); | ||
if ($resql) { | ||
$i = 0; | ||
$nbcateg = $this->db->num_rows($resql); | ||
|
||
while ($obj = $this->db->fetch_object($resql)) { | ||
$this->cats[$obj->rowid]['rowid'] = $obj->rowid; | ||
$this->cats[$obj->rowid]['id'] = $obj->rowid; | ||
|
@@ -1210,7 +1213,7 @@ public function get_full_arbo($type, $markafterid = 0, $include = 0) | |
dol_syslog(get_class($this)."::get_full_arbo call to buildPathFromId", LOG_DEBUG); | ||
foreach ($this->cats as $key => $val) { | ||
//print 'key='.$key.'<br>'."\n"; | ||
$this->buildPathFromId($key, 0); // Process a branch from the root category key (this category has no parent) | ||
$this->buildPathFromId($key, $nbcateg); // Process a branch from the root category key (this category has no parent) | ||
} | ||
|
||
// Include or exclude leaf including $markafterid from tree | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters