]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11347 fixed context c in update which Tim's pg did not like much
authorskodak <skodak>
Wed, 19 Sep 2007 17:40:20 +0000 (17:40 +0000)
committerskodak <skodak>
Wed, 19 Sep 2007 17:40:20 +0000 (17:40 +0000)
lib/accesslib.php

index 9e33a005305792deeb435f6092d2cf3407af1c0a..f51a177a76e535024fad53644b2d0be33046706e 100755 (executable)
@@ -4451,11 +4451,11 @@ function build_context_path($force=false) {
         $emptyclause = '';
     }
 
-    $upathsql = "UPDATE {$CFG->prefix}context c
-                    SET path = COALESCE((SELECT ct.path FROM {$CFG->prefix}$temptable ct WHERE c.id=ct.id), c.path)";
+    $upathsql = "UPDATE {$CFG->prefix}context
+                    SET path = COALESCE((SELECT ct.path FROM {$CFG->prefix}$temptable ct WHERE {$CFG->prefix}context.id=ct.id), {$CFG->prefix}context.path)";
 
-    $udepthsql = "UPDATE {$CFG->prefix}context c
-                     SET depth = COALESCE((SELECT ct.depth FROM {$CFG->prefix}$temptable ct WHERE c.id=ct.id), c.depth)";
+    $udepthsql = "UPDATE {$CFG->prefix}context
+                     SET depth = COALESCE((SELECT ct.depth FROM {$CFG->prefix}$temptable ct WHERE {$CFG->prefix}context.id=ct.id), {$CFG->prefix}context.depth)";
 
 /*
  * TODO: following code complains: Can't reopen table: 'ct' when using temporary teables, why?