From c54f0c106a9bf2ba5a25dfe78eb825debb17e9aa Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 18 Nov 2006 20:28:00 +0000 Subject: [PATCH] Prevent some false-positives detecting uses of old user_XXX tables. See http://moodle.org/mod/forum/discuss.php?d=58976 Merged from MOODLE_17_STABLE --- lib/dmllib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dmllib.php b/lib/dmllib.php index 78893cdac4..e543ae08d8 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -635,10 +635,10 @@ function get_recordset_sql($sql, $limitfrom=null, $limitnum=null) { /// 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 (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.'); } -- 2.39.5