mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
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:
parent
351e55fba6
commit
413a19dd4c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user