Commit c82303de authored by drumm's avatar drumm Committed by Neil Drumm

site_url -> uri

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