MDL-14679 enforce prefix for native pg driver

This commit is contained in:
skodak
2008-12-02 10:07:03 +00:00
parent 1638ad5317
commit 189f3ee9bf
+5
View File
@@ -84,6 +84,11 @@ class pgsql_native_moodle_database extends moodle_database {
* @throws dml_connection_exception if error
*/
public function connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, array $dboptions=null) {
if ($prefix == '' and !$this->external) {
//Enforce prefixes for everybody but mysql
throw new dml_exception('prefixcannotbeempty', $this->get_dbfamily());
}
$driverstatus = $this->driver_installed();
if ($driverstatus !== true) {