accesslib:build_context_path() - fix $emptyclause to avoid Oracle's dirty hack

accesslib is now clean of Oracle's dirty hack. Thanks Eloy for the idea.

MDL-11347
This commit is contained in:
martinlanghoff 2007-09-19 23:46:37 +00:00
parent 351e55fba6
commit 413a19dd4c

View File

@ -4443,13 +4443,7 @@ function build_context_path($force=false) {
'instanceid', SITEID);
}
$emptyclause = " AND path=''";
if ($CFG->dbtype==='oci8po') { // DIRTYHACK - everybody loves Oracle ;-)
$emptyclause = " AND path=' '";
}
if ($force) {
$emptyclause = '';
}
$emptyclause = " AND (depth IS NULL OR depth=0) ";
// TODO: following could be improved with WHERE + $emptyclause, but there should be a better way
$upathsql = "UPDATE {$CFG->prefix}context