-
Bug
-
Resolution: Fixed
-
Minor
-
2.1.4, 2.2, 2.3
-
None
-
MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
w10_
MDL-31689_m23_executecomment -
moodle_database.php execute() function has this comment:
Do NOT use this to make changes in db structure, use database_manager::execute_sql() instead!
but - execute_sql() is a protected function so we can't use it.
We have some custom code that uses custom views/functions and it's a lot easier to create these on the db importing a pg_dump file. - they don't use moodle prefix etc. $DB->execute does the prefix/params stuff and it would be nice to be able to avoid that if poss.
It would be nice to be able to just use $dbman->execute_sql to do this and according to the comment in moodle_database.php it looks like someone thought it should be supported at some point.
Can we please either - change the function to a public one - or remove the invalid comments in moodle_database.php that tell us to use it. (my preference is to change to public!)