]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-11532, updatesql needs to run after every 'round' otherwises nothi...
authortoyomoyo <toyomoyo>
Fri, 26 Oct 2007 07:58:23 +0000 (07:58 +0000)
committertoyomoyo <toyomoyo>
Fri, 26 Oct 2007 07:58:23 +0000 (07:58 +0000)
lib/accesslib.php

index f7602c7f7f68636e2dd762d973190ec7cfe6ea74..4f36f5a99441c49db59ca48202947719728cf8cc 100755 (executable)
@@ -4737,11 +4737,13 @@ function build_context_path($force=false, $feedback=false) {
                                        WHERE temp.id = ctx.id)
                        $ctxemptyclause";
         execute_sql($sql, $feedback);
+        
+        // this is needed after every loop
+        // MDL-11532
+        execute_sql($updatesql, $feedback);
+        execute_sql($udelsql, $feedback);
     }
 
-    execute_sql($updatesql, $feedback);
-    execute_sql($udelsql, $feedback);
-
     // Courses -- except sitecourse
     $sql = "INSERT INTO {$CFG->prefix}context_temp (id, path, depth)
             SELECT ctx.id, ".sql_concat('pctx.path', "'/'", 'ctx.id').", pctx.depth+1