MDL-27597 fix invalid results of get_categories when shallow is false
This commit is contained in:
+1
-1
@@ -1238,7 +1238,7 @@ function get_categories($parent='none', $sort=NULL, $shallow=true) {
|
||||
JOIN {$CFG->prefix}context ctx
|
||||
ON cc.id=ctx.instanceid AND ctx.contextlevel=".CONTEXT_COURSECAT."
|
||||
JOIN {$CFG->prefix}course_categories ccp
|
||||
ON (cc.path LIKE ".sql_concat('ccp.path',"'%'").")
|
||||
ON ((cc.parent=ccp.id) OR (cc.path LIKE ".sql_concat('ccp.path',"'/%'")."))
|
||||
WHERE ccp.id=$parent
|
||||
$sort";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user