Commit ac3205b5 authored by Adrian Rossouw's avatar Adrian Rossouw

Merge branch 'dev-services' of ssh://git.aegirproject.org/provision into dev-services

parents b559b8d4 c82303de
......@@ -143,7 +143,7 @@ class provisionConfig_apache_site extends provisionConfig_apache {
$this->data['site_port'] = 80;
}
return $this->data['vhost_path'] . '/' . $this->data['site_url'] . '_' . $this->data['site_port'];
return $this->data['vhost_path'] . '/' . $this->data['uri'] . '_' . $this->data['site_port'];
}
function process() {
......@@ -152,7 +152,7 @@ class provisionConfig_apache_site extends provisionConfig_apache {
}
$this->data['extra_config'] = "# Extra configuration from modules:\n";
$this->data['extra_config'] .= join("\n", drush_command_invoke_all('provision_apache_vhost_config', $this->data['site_url'], $this->data));
$this->data['extra_config'] .= join("\n", drush_command_invoke_all('provision_apache_vhost_config', $this->data['uri'], $this->data));
}
}
......
......@@ -4,7 +4,7 @@
<?php endif;?>
DocumentRoot <?php print $this->platform->root; ?>
ServerName <?php print $site_url; ?>
ServerName <?php print $uri; ?>
SetEnv db_type <?php print urlencode($db_type); ?>
......@@ -29,7 +29,7 @@
<?php print $extra_config; ?>
# Error handler for Drupal > 4.6.7
<Directory "<?php print $this->platform->root; ?>/sites/<?php print trim($site_url, '/'); ?>/files">
<Directory "<?php print $this->platform->root; ?>/sites/<?php print $uri; ?>/files">
SetHandler This_is_a_Drupal_security_line_do_not_remove
</Directory>
......
......@@ -4,7 +4,7 @@
<?php endif;?>
DocumentRoot <?php print $this->platform->root; ?>
ServerName <?php print $site_url; ?>
ServerName <?php print $uri; ?>
<?php if (is_array($aliases)) :
foreach ($aliases as $alias) : ?>
......@@ -15,6 +15,6 @@
RewriteEngine on
# the ? at the end is to remove any query string in the original url
RewriteRule ^(.*)$ <?php print $redirect_url . '/' . $site_url ?>?
RewriteRule ^(.*)$ <?php print $redirect_url . '/' . $uri ?>?
</VirtualHost>
......@@ -12,12 +12,12 @@
<?php else:
# this should never happen and has the potential of creating an infinite redirection loop
?>
ServerName <?php print $site_url ?>
ServerName <?php print $uri ?>
<?php endif; ?>
<?php if ($ssl_redirect): ?>
RedirectMatch permanent ^(.*) https://<?php print $site_url ?>$1
RedirectMatch permanent ^(.*) https://<?php print $uri ?>$1
<?php else: ?>
RedirectMatch permanent ^(.*) http://<?php print $site_url ?>$1
RedirectMatch permanent ^(.*) http://<?php print $uri ?>$1
<?php endif; ?>
</VirtualHost>
......@@ -35,7 +35,6 @@ function drush_provision_drupal_provision_deploy_validate($backup_file = null) {
*/
function drush_provision_drupal_pre_provision_deploy($backup_file) {
// the url is likely to have changed in the deployment
drush_set_option('site_url', drush_get_option('uri'));
$extracted = provision_service('file')->extract(drush_get_option('backup_file'), d()->root . '/sites/' . d()->uri)
->succeed('Successfully extracted the contents of @path')
->fail('Failed to extract the contents of @path', 'PROVISION_BACKUP_EXTRACTION_FAILED')
......@@ -80,7 +79,7 @@ function drush_provision_drupal_pre_provision_deploy_rollback() {
}
function drush_provision_drupal_provision_deploy() {
_provision_drupal_maintain_aliases(drush_get_option('site_url'));
_provision_drupal_maintain_aliases(d()->uri);
}
......
<?php
// $Id$
$new_url = drush_get_option('site_url');
$old_url = drush_get_option('site_url', '', 'site');
$new_url = drush_get_option('uri');
$old_url = drush_get_option('uri', '', 'site');
/**
* @file
......
<?php
// $Id$
$new_url = drush_get_option('site_url');
$old_url = drush_get_option('site_url', 'site');
$new_url = drush_get_option('uri');
$old_url = drush_get_option('uri', 'site');
/**
* @file
......
......@@ -4,7 +4,7 @@
* Rebuild all the caches
*/
$GLOBALS['url'] = drush_get_option('site_url');
$GLOBALS['url'] = drush_get_option('uri');
$GLOBALS['profile'] = drush_get_option('profile');
$GLOBALS['install_locale'] = drush_get_option('language');
$GLOBALS['client_email'] = drush_get_option('client_email');
......
......@@ -4,7 +4,7 @@
* Rebuild all the caches
*/
$GLOBALS['url'] = drush_get_option('site_url');
$GLOBALS['url'] = drush_get_option('uri');
$GLOBALS['profile'] = drush_get_option('profile');
$GLOBALS['install_locale'] = drush_get_option('language');
$GLOBALS['client_email'] = drush_get_option('client_email');
......
......@@ -4,7 +4,7 @@
* Rebuild all the caches
*/
$GLOBALS['url'] = drush_get_option('site_url');
$GLOBALS['url'] = drush_get_option('uri');
$GLOBALS['profile'] = drush_get_option('profile');
$GLOBALS['install_locale'] = drush_get_option('language');
$GLOBALS['client_email'] = drush_get_option('client_email');
......
......@@ -74,7 +74,6 @@ function _provision_context_init() {
// i don't think i should be bootstrapping here yet ... but i have no choice yet.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT);
if ($context === 'site') {
drush_set_default('site_url', drush_get_option('uri'));
drush_set_default('profile', 'default');
drush_set_default('language', 'en');
drush_set_default('aliases', array());
......@@ -104,7 +103,6 @@ function provision_drupal_drush_exit() {
if (preg_match("/^provision-/", $command[0])) {
if (PROVISION_CONTEXT_SITE) {
if (drush_get_option('installed')) {
drush_set_option('site_url', drush_get_option('site_url'), 'site');
drush_set_option('site_id', drush_get_option('site_id'), 'site');
drush_set_option('client_email', drush_get_option('client_email'), 'site');
provision_save_site_data();
......@@ -215,7 +213,7 @@ class provisionConfig_drupal_settings extends provisionConfig {
}
$this->data['extra_config'] = "# Extra configuration from modules:\n";
$this->data['extra_config'] .= join("\n", drush_command_invoke_all('provision_drupal_config', $this->data['site_url'], $this->data));
$this->data['extra_config'] .= join("\n", drush_command_invoke_all('provision_drupal_config', $this->data['uri'], $this->data));
$this->group = drush_get_option('web_group');
}
......
......@@ -54,8 +54,8 @@
global $conf;
$conf['install_profile'] = '<?php print $profile ?>';
$conf['file_directory_path'] = 'sites/<?php print $site_url ?>/files';
$conf['file_directory_temp'] = 'sites/<?php print $site_url ?>/files/tmp';
$conf['file_directory_path'] = 'sites/<?php print $uri ?>/files';
$conf['file_directory_temp'] = 'sites/<?php print $uri ?>/files/tmp';
$conf['file_downloads'] = 1;
$conf['cache'] = 1;
$conf['clean_url'] = 1;
......
......@@ -286,7 +286,7 @@ class provisionServer extends provisionEnvironment {
class provisionPlatform extends provisionEnvironment {
static function option_documentation() {
return array(
'--root' => 'platform: path to a drupal installation',
'--root' => 'platform: path to a Drupal installation',
'--server' => 'drush backend server; default @server_localhost',
'--web_server' => 'web server hosting the platform; default @server_localhost',
);
......@@ -331,7 +331,6 @@ class provisionSite extends provisionEnvironment {
$this->root = $this->platform->root;
$this->setProperty('uri');
$this->setProperty('site_url', str_replace(array('https://', 'http://'), '', $this->uri));
$this->setProperty('language', 'en');
$this->setProperty('aliases', array());
$this->setProperty('site_port', 80);
......@@ -349,7 +348,7 @@ class provisionSite extends provisionEnvironment {
$this->aliases = array();
}
// this can potentially be handled by a drupal sub class
// this can potentially be handled by a Drupal sub class
$this->setProperty('profile', 'default');
}
......
......@@ -41,11 +41,11 @@ class provisionConfig_ssl_vhost extends provisionConfig {
public $description = 'Redirect for SSL';
function filename() {
return $this->data['vhost_path'] . '/' . $this->data['site_url'] . '_80';
return $this->data['vhost_path'] . '/' . $this->data['uri'] . '_80';
}
function process() {
array_push($this->data['aliases'], $this->data['site_url']);
array_push($this->data['aliases'], $this->data['uri']);
$this->data['site_port'] = 80;
}
}
......
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