Commit 9728b79c authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Fix errors with language and general site import.

parent 545fb616
......@@ -390,7 +390,6 @@ function _provision_drupal_install_schema($url, $install_profile, $language = 'e
cache_clear_all();
variable_set('install_profile', $profile);
// Send initial welcome email
provision_drupal_send_welcome_mail($url, $profile, $language, $client_email);
}
......
<?php
if ($argv[1]) {
$_SERVER['HTTP_HOST'] = $argv[1];
$_SERVER['SCRIPT_NAME'] = '/index.php';
$command_line = true;
// Fake the necessary HTTP headers that Drupal needs:
$drupal_base_url = parse_url(sprintf("http://" . $argv[1]));
$_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
$_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/index.php';
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
$_SERVER['REMOTE_ADDR'] = '';
$_SERVER['REQUEST_METHOD'] = NULL;
$_SERVER['SERVER_SOFTWARE'] = NULL;
require_once('includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once(dirname(__FILE__) . '/../provision.inc');
......@@ -20,10 +26,7 @@ if ($parts = @parse_url($GLOBALS['db_url'])) {
$data['db_name'] = substr($parts['path'], 1);
$data['profile'] = variable_get('install_profile', 'default');
$language = variable_get('language_default',
(object) array('language' => 'en', 'name' => 'English', 'native' => 'English',
'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '',
'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''));
$language = language_default();
$data['language'] = $language->language;
}
provision_output($argv[1], $data);
......
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