From c82303de020c23d63d44188d70dda493836d56b9 Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Wed, 2 Jun 2010 18:36:54 -0700 Subject: [PATCH] site_url -> uri --- http/apache/apache_service.inc | 4 ++-- http/apache/vhost.tpl.php | 4 ++-- http/apache/vhost_disabled.tpl.php | 4 ++-- http/apache/vhost_redirect.tpl.php | 6 +++--- platform/deploy.provision.inc | 3 +-- platform/drupal/deploy.inc | 4 ++-- platform/drupal/deploy_7.inc | 4 ++-- platform/drupal/install_5.inc | 2 +- platform/drupal/install_6.inc | 2 +- platform/drupal/install_7.inc | 2 +- platform/provision_drupal.drush.inc | 4 +--- platform/provision_drupal_settings.tpl.php | 4 ++-- provision.environment.inc | 5 ++--- ssl/provision_ssl.drush.inc | 4 ++-- 14 files changed, 24 insertions(+), 28 deletions(-) diff --git a/http/apache/apache_service.inc b/http/apache/apache_service.inc index ab585883..31949b12 100644 --- a/http/apache/apache_service.inc +++ b/http/apache/apache_service.inc @@ -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)); } } diff --git a/http/apache/vhost.tpl.php b/http/apache/vhost.tpl.php index 90cd84ea..b08a7a8a 100644 --- a/http/apache/vhost.tpl.php +++ b/http/apache/vhost.tpl.php @@ -4,7 +4,7 @@ DocumentRoot platform->root; ?> - ServerName + ServerName SetEnv db_type @@ -29,7 +29,7 @@ # Error handler for Drupal > 4.6.7 - platform->root; ?>/sites//files"> + platform->root; ?>/sites//files"> SetHandler This_is_a_Drupal_security_line_do_not_remove diff --git a/http/apache/vhost_disabled.tpl.php b/http/apache/vhost_disabled.tpl.php index 2b63f4e0..6f951eac 100644 --- a/http/apache/vhost_disabled.tpl.php +++ b/http/apache/vhost_disabled.tpl.php @@ -4,7 +4,7 @@ DocumentRoot platform->root; ?> - ServerName + ServerName @@ -15,6 +15,6 @@ RewriteEngine on # the ? at the end is to remove any query string in the original url - RewriteRule ^(.*)$ ? + RewriteRule ^(.*)$ ? diff --git a/http/apache/vhost_redirect.tpl.php b/http/apache/vhost_redirect.tpl.php index 47b7bf00..4040bc51 100644 --- a/http/apache/vhost_redirect.tpl.php +++ b/http/apache/vhost_redirect.tpl.php @@ -12,12 +12,12 @@ - ServerName + ServerName - RedirectMatch permanent ^(.*) https://$1 + RedirectMatch permanent ^(.*) https://$1 - RedirectMatch permanent ^(.*) http://$1 + RedirectMatch permanent ^(.*) http://$1 diff --git a/platform/deploy.provision.inc b/platform/deploy.provision.inc index 2c7abc6b..f0af359c 100644 --- a/platform/deploy.provision.inc +++ b/platform/deploy.provision.inc @@ -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); } diff --git a/platform/drupal/deploy.inc b/platform/drupal/deploy.inc index 185fed0e..6cef13c1 100644 --- a/platform/drupal/deploy.inc +++ b/platform/drupal/deploy.inc @@ -1,8 +1,8 @@ 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'); } diff --git a/platform/provision_drupal_settings.tpl.php b/platform/provision_drupal_settings.tpl.php index 8122b093..4967ea04 100644 --- a/platform/provision_drupal_settings.tpl.php +++ b/platform/provision_drupal_settings.tpl.php @@ -54,8 +54,8 @@ global $conf; $conf['install_profile'] = ''; - $conf['file_directory_path'] = 'sites//files'; - $conf['file_directory_temp'] = 'sites//files/tmp'; + $conf['file_directory_path'] = 'sites//files'; + $conf['file_directory_temp'] = 'sites//files/tmp'; $conf['file_downloads'] = 1; $conf['cache'] = 1; $conf['clean_url'] = 1; diff --git a/provision.environment.inc b/provision.environment.inc index d9c327a9..c2919790 100644 --- a/provision.environment.inc +++ b/provision.environment.inc @@ -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'); } diff --git a/ssl/provision_ssl.drush.inc b/ssl/provision_ssl.drush.inc index 5e8914b9..75c979fe 100644 --- a/ssl/provision_ssl.drush.inc +++ b/ssl/provision_ssl.drush.inc @@ -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; } } -- GitLab