mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-27597 fix invalid results of get_categories when shallow is false
This commit is contained in:
parent
3fdc622697
commit
618a7f91ec
1 changed files with 1 additions and 1 deletions
|
@ -847,7 +847,7 @@ function get_categories($parent='none', $sort=NULL, $shallow=true) {
|
||||||
FROM {course_categories} cc
|
FROM {course_categories} cc
|
||||||
$ccjoin
|
$ccjoin
|
||||||
JOIN {course_categories} ccp
|
JOIN {course_categories} ccp
|
||||||
ON (cc.path LIKE ".$DB->sql_concat('ccp.path',"'%'").")
|
ON ((cc.parent = ccp.id) OR (cc.path LIKE ".$DB->sql_concat('ccp.path',"'/%'")."))
|
||||||
WHERE ccp.id=?
|
WHERE ccp.id=?
|
||||||
$sort";
|
$sort";
|
||||||
$params = array($parent);
|
$params = array($parent);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue