]> git.mjollnir.org Git - moodle.git/commitdiff
Now admin/index.php checks for proper prefixes (MDL-6230)
authorstronk7 <stronk7>
Fri, 13 Oct 2006 23:49:48 +0000 (23:49 +0000)
committerstronk7 <stronk7>
Fri, 13 Oct 2006 23:49:48 +0000 (23:49 +0000)
Merged from MOODLE_17_STABLE

admin/index.php

index a22daa85f81ecc0bfa38643a41fd9c7030053b96..4570e516e6cecfda393d605055092a3a4a543681 100644 (file)
         error("The PHP server variable 'file_uploads' is not turned On - $documentationlink");
     }
 
+    if (empty($CFG->prefix) && $CFG->dbtype != 'mysql') {  //Enforce prefixes for everybody but mysql
+        error('$CFG->prefix can\'t be empty for your target DB (' . $CFG->dbtype . ')');
+    }
+
+    if ($CFG->dbtype == 'oci8po' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
+        error('$CFG->prefix maximum allowed length for Oracle DBs is 2cc.');
+    }
 
 /// Check that config.php has been edited