Commit 7c42f560 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

some errors fixed with provisioning, function names

parent 7f0549ec
......@@ -275,13 +275,13 @@ function _provision_pre_install($url, &$data) {
function _provision_install($url, &$data) {
$rolled_back = provision_invoke("install", $url, $data);
if (!$rolled_back) {
# if (!$rolled_back) {
_provision_drupal_switch_active_site($url); # Change headers and db info, also backs up
_provision_drupal_force_load_modules($url);
_provision_drupal_install_schema($data['site-profile']);
_provision_drupal_force_load_modules();
_provision_drupal_switch_active_site(); # This *should* bring the site back to where we were before installing
}
# }
return $rolled_back;
}
......
......@@ -265,7 +265,7 @@ function _provision_drupal_force_load_modules($url = null) {
/**
* Install the drupal schema and install profile
*/
function _provision_install_schema($profile) {
function _provision_drupal_install_schema($profile) {
// Load the profile.
require_once "./profiles/$profile/$profile.profile";
......
......@@ -65,7 +65,7 @@ function provision_mysql_provision_pre_install($url, &$data) {
$data['site-db-username'] = $data['site-db-name']; // mysql has some really really stupid rules about who db / usernames, so site id is the safest.
}
else {
$data['site-db-name'] = substr(ereg_replace("^www\.", "", str_replace(".", "", $url)), 0, 10);
$data['site-db-name'] = substr(ereg_replace("^www\.", "", str_replace('-', '_', str_replace(".", "", $url))), 0, 10);
$data['site-db-username'] = $data['site-db-name'];
// TODO : A reasonable fallback if the site id isn't available. This is going to make it a bit harder to test at first, but that's ok.
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment