|
Fixed. Working. Ciao
Thinking a bit more about this I would really like to get all those get_dbfamily() out - this looks like a step backwards
We could add a new moodle_database method or a new constructor parameter $testprefix=true, then we could choose to test it (or not) and the admin/index.php and CLI installer would not be polluted with dbfamily specific stuff again. Well,
we were discussing time ago about get_family() being public or no. And finally agree about to leave them public because could be needed in some places. IMO this is exactly the type of place where it can be used. They are only two simple and stopper checks in the right place. Sincerely, I think it's a lot more polluting to add new parameters to constructor and so. I think that moodle_databases shouldn't perform those tests conditionally at all. As a last chance... I see them in another public method: $DB->check_prefix_rules() or so, but leaving, in any case constructors free for that sort of conditional stuff. Ciao Not the best solution IMO (the external attribute on constructor) but works.
Committed some days ago in |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2/ sure