MDL-27597 fix invalid results of get_categories when shallow is false

This commit is contained in:
Petr Skoda 2011-08-05 20:13:12 +02:00
parent 3fdc622697
commit 618a7f91ec

View File

@ -847,7 +847,7 @@ function get_categories($parent='none', $sort=NULL, $shallow=true) {
FROM {course_categories} cc
$ccjoin
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=?
$sort";
$params = array($parent);