]> git.mjollnir.org Git - moodle.git/commitdiff
datalib: get_categories() - remove PostgreSQL-ism
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:28:43 +0000 (07:28 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:28:43 +0000 (07:28 +0000)
lib/datalib.php

index ec489af32d2ff299102587cc3b516e9c1a76e5bf..1bd6b3daa357b2699c52322a9589e0cc4214ee95 100644 (file)
@@ -1207,7 +1207,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 ccp.path||'%')
+                     ON (cc.path LIKE ".sql_concat('ccp.path',"'%'").")
                 WHERE ccp.id=$parent
                 $sort";
     }