MDL-11532, updatesql needs to get run after each 'round' otherwise there's nothing to pull from the context table

This commit is contained in:
toyomoyo
2007-10-26 07:56:36 +00:00
parent c6ed8589e0
commit 6597b34eeb
+5 -3
View File
@@ -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