From 554bda05389777425d1d5ba9940dc1c468532dfb Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 19 Sep 2007 17:40:20 +0000 Subject: [PATCH] MDL-11347 fixed context c in update which Tim's pg did not like much --- lib/accesslib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 9e33a00530..f51a177a76 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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? -- 2.39.5