Permalink
Browse files

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

…oodle into MOODLE_19_STABLE
  • Loading branch information...
2 parents cccaf26 + 3adf400 commit 9038daab2636896fb3905f6aa0eade80d802099c @stronk7 stronk7 committed Aug 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/datalib.php
View
@@ -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";
}

0 comments on commit 9038daa

Please sign in to comment.