]> git.mjollnir.org Git - moodle.git/commitdiff
Revert the prefix check to admin/index.php. MDL-14877
authorstronk7 <stronk7>
Sat, 17 May 2008 20:46:29 +0000 (20:46 +0000)
committerstronk7 <stronk7>
Sat, 17 May 2008 20:46:29 +0000 (20:46 +0000)
admin/index.php

index bdf0af2ea7617514fb9e9e3350555058ee3e711f..8bcd769134afaa5bc796313fff213186c0806556 100644 (file)
         print_error('withoutversion', 'debug'); // without version, stop
     }
 
+/// Check DB prefix requirements are fulfilled
+    if (empty($CFG->prefix) && $DB->get_dbfamily() != 'mysql') {  //Enforce prefixes for everybody but mysql
+        print_error('prefixcannotbeempty', 'debug', '', array($CFG->prefix, $CFG->dbtype));
+    }
+
+    if ($DB->get_dbfamily() == 'oracle' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
+        print_error('prefixlimit', 'debug', '', $CFG->prefix);
+    }
+
 /// Check if the main tables have been installed yet or not.
     if (!$tables = $DB->get_tables() ) {    // No tables yet at all.
         $maintables = false;