FMCorz / mdk

Moodle Development Kit. A collection of tools meant to make developers' lives easier.
GNU General Public License v3.0
85 stars 47 forks source link

Add ability to define custom $CFG->prefix for new instances #183

Closed mudrd8mz closed 5 years ago

mudrd8mz commented 5 years ago

When reviewing contributed plugins and patches, it sometimes happens that the developer puts hard-coded table name into their SQL queries by mistake, such as

$sql = "SELECT id, foo, bar FROM mdl_foo_bar";

instead of the correct one

$sql = "SELECT id, foo, bar FROM {foo_bar}";

As most of the sites are using the default mdl_ table name prefix, this kind of bugs may be hard to be spotted. It will help if the reviewer/tester has a custom non-default table name prefix set while testing the plugins and patches. Thanks in advance for considering it.

FMCorz commented 5 years ago

Thanks!