return false;
}
+/// Temporary hack as part of phasing out all access to obsolete user tables XXX
+ if (!empty($CFG->rolesactive)) {
+ if (strpos($sql, $CFG->prefix.'user_students') ||
+ strpos($sql, $CFG->prefix.'user_teachers') ||
+ strpos($sql, $CFG->prefix.'user_coursecreators') ||
+ strpos($sql, $CFG->prefix.'user_admins')) {
+ if (debugging()) { var_dump(debug_backtrace()); }
+ error('This SQL relies on obsolete tables! Your code must be fixed by a developer.');
+ }
+ }
+
+
if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; };
if ($limitfrom || $limitnum) {
return false;
}
+/// Temporary hack as part of phasing out all access to obsolete user tables XXX
+ if (!empty($CFG->rolesactive)) {
+ if (in_array($table, array('user_students', 'user_teachers', 'user_coursecreators', 'user_admins'))) {
+ if (debugging()) { var_dump(debug_backtrace()); }
+ error('This SQL relies on obsolete tables ('.$table.')! Your code must be fixed by a developer.');
+ }
+ }
+
if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; };
/// In Moodle we always use auto-numbering fields for the primary key
return false;
}
+/// Temporary hack as part of phasing out all access to obsolete user tables XXX
+ if (!empty($CFG->rolesactive)) {
+ if (in_array($table, array('user_students', 'user_teachers', 'user_coursecreators', 'user_admins'))) {
+ if (debugging()) { var_dump(debug_backtrace()); }
+ error('This SQL relies on obsolete tables ('.$table.')! Your code must be fixed by a developer.');
+ }
+ }
+
/// Begin DIRTY HACK
if ($CFG->dbtype == 'oci8po') {
oracle_dirty_hack($table, $dataobject); // Convert object to the correct "empty" values for Oracle DB