Permalink
Browse files

Merge branch 'w31_MDL-27597_m20_catlike' of git://github.com/skodak/m…

…oodle into MOODLE_20_STABLE
  • Loading branch information...
2 parents 3728b69 + 56eff94 commit fcda2530265eba9e1b9f9cb3665380d5e3186ff3 @stronk7 stronk7 committed Aug 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/datalib.php
View
@@ -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);

0 comments on commit fcda253

Please sign in to comment.