Commit 322ba49a authored by drumm's avatar drumm Committed by Neil Drumm

Use aliases for sites, including big url argument change.

parent 212dbe08
<?php
function drush_db_pre_provision_backup($url = NULL) {
provision_service('db')->dump_site_database($url);
function drush_db_pre_provision_backup() {
provision_service('db')->generate_dump();
}
function drush_db_pre_provision_backup_rollback($url = NULL) {
provision_service('file')->unlink(drush_get_option('sites_path') . '/' . $url . '/database.sql')
function drush_db_pre_provision_backup_rollback() {
provision_service('file')->unlink(drush_get_option('sites_path') . '/' . drush_get_option('uri') . '/database.sql')
->succeed('Deleted mysql dump from sites directory')
->fail('Could not delete mysql dump from sites directory');
}
function drush_db_post_provision_backup($url = NULL) {
drush_db_pre_provision_backup_rollback($url);
function drush_db_post_provision_backup() {
drush_db_pre_provision_backup_rollback();
}
<?php
// $Id$
function drush_db_provision_clone_validate($url = null) {
provision_service('db')->connect($url);
function drush_db_provision_clone_validate() {
provision_service('db')->connect();
}
......@@ -11,12 +11,12 @@
include_once(dirname(__FILE__) . '/../provision.service.inc');
function db_drush_init($url = null) {
function db_drush_init() {
// todo same as http, consolidate
$command = drush_get_command();
$command = explode(" ", $command['command']);
if (preg_match("/^provision-/", $command[0])) {
_provision_context_init($url);
_provision_context_init();
if (PROVISION_CONTEXT_SERVER) {
if (!is_null(drush_get_option('init_db'))) {
......@@ -106,7 +106,7 @@ class provisionService_db extends provisionService {
*
* TODO: abstract this properly.
*/
function suggest_db_name($url) {
function suggest_db_name() {
if ($sid = drush_get_option('site_id')) {
$suggest_base = drush_get_option('aegir_db_prefix', 'site_') . $sid;
}
......@@ -123,7 +123,7 @@ class provisionService_db extends provisionService {
// site name
//
// Provision only users will trigger this mostly.
$suggest_base = substr(str_replace(array(".", "-"), '' , ereg_replace("^www\.", "", $url)), 0, 14);
$suggest_base = substr(str_replace(array('.', '-'), '' , ereg_replace('^www\.', '', drush_get_option('uri'))), 0, 14);
}
$suggest[] = $suggest_base;
for ($i = 0; $i < 100; $i++) {
......@@ -145,8 +145,8 @@ class provisionService_db extends provisionService {
/**
* Generate a new mysql database and user account for the specified credentials
*/
function create_site_database($url) {
$creds = $this->generate_site_credentials($url);
function create_site_database() {
$creds = $this->generate_site_credentials();
extract($creds);
......@@ -181,7 +181,7 @@ class provisionService_db extends provisionService {
/**
* Remove the database and user account for the supplied credentials
*/
function destroy_site_database($url) {
function destroy_site_database() {
$creds = $this->fetch_site_credentials();
extract($creds);
......@@ -204,8 +204,8 @@ class provisionService_db extends provisionService {
}
function import_site_database($url) {
$dump_file = drush_get_option('sites_path') .'/'. $url .'/database.sql';
function import_site_database() {
$dump_file = drush_get_option('sites_path') . '/' . drush_get_option('uri') . '/database.sql';
$creds = $this->fetch_site_credentials();
......@@ -224,14 +224,7 @@ class provisionService_db extends provisionService {
}
}
// todo - SORT THIS SHIT OUT!
function dump_site_database($url) {
return $this->generate_dump($url);
}
function generate_site_credentials($url) {
function generate_site_credentials() {
$creds = array();
// replace with service type
$db_type = drush_get_option('db_type');
......@@ -244,14 +237,14 @@ class provisionService_db extends provisionService {
$creds['db_type'] = drush_set_option('db_type', $db_type, 'site');
$creds['db_host'] = drush_set_option('db_host', drush_get_option('db_host'), 'site');
$creds['db_passwd'] = drush_set_option('db_passwd', provision_password(), 'site');
$creds['db_name'] = drush_set_option('db_name', $this->suggest_db_name($url), 'site');
$creds['db_name'] = drush_set_option('db_name', $this->suggest_db_name(), 'site');
$creds['db_user'] = drush_set_option('db_user', $creds['db_name'], 'site');
$creds['db_grant_host'] = $this->grant_host();
return $creds;
}
function fetch_site_credentials($url) {
function fetch_site_credentials() {
$creds = array();
$keys = array('db_type', 'db_user', 'db_name', 'db_host', 'db_passwd');
......@@ -291,7 +284,7 @@ class provisionService_db extends provisionService {
return FALSE;
}
function generate_dump($url) {
function generate_dump() {
return FALSE;
}
......
<?php
function drush_db_provision_delete_validate($url = null) {
function drush_db_provision_delete_validate() {
if (PROVISION_CONTEXT_SITE) {
provision_service('db')->connect();
}
......@@ -12,8 +11,8 @@ function drush_db_provision_delete_validate($url = null) {
*
* This will drop the database, revoke the privileges and flush the privileges.
*/
function drush_db_provision_delete($url = NULL) {
function drush_db_provision_delete() {
if (PROVISION_CONTEXT_SITE) {
provision_service('db')->destroy_site_database($url);
provision_service('db')->destroy_site_database();
}
}
......@@ -4,20 +4,20 @@ function drush_db_provision_deploy_validate() {
provision_service('db')->connect();
}
function drush_db_provision_deploy($url) {
provision_service('db')->create_site_database($url);
provision_service('db')->import_site_database($url);
function drush_db_provision_deploy() {
provision_service('db')->create_site_database();
provision_service('db')->import_site_database();
}
function drush_db_provision_deploy_rollback($url = NULL) {
provision_service('db')->destroy_site_database($url);
function drush_db_provision_deploy_rollback() {
provision_service('db')->destroy_site_database();
}
// Rollback doesn't apply here yet. Unless we trigger a deploy of the first dump
// made. Which could go on infinitely if something is really long.
function drush_db_post_provision_deploy($url) {
provision_service('file')->unlink(drush_get_option('sites_path') .'/'. $url .'/database.sql')
function drush_db_post_provision_deploy() {
provision_service('file')->unlink(drush_get_option('sites_path') . '/' . drush_get_option('uri') . '/database.sql')
->succeed('Removed dump file @path after restoring from it')
->fail('Could not remove dump file @path', 'DRUSH_PERM_ERROR');
}
<?php
function drush_db_provision_install_validate($url) {
function drush_db_provision_install_validate() {
provision_service('db')->connect();
}
function drush_db_pre_provision_install($url) {
provision_service('db')->create_site_database($url);
function drush_db_pre_provision_install() {
provision_service('db')->create_site_database();
}
function drush_db_pre_provision_install_rollback($url) {
if (!_provision_drupal_site_installed($url)) {
provision_service('db')->destroy_site_database(
drush_get_option('db_name'), drush_get_option('db_user'),
drush_get_option('db_passwd')
);
function drush_db_pre_provision_install_rollback() {
if (!_provision_drupal_site_installed()) {
provision_service('db')->destroy_site_database();
}
......
......@@ -6,7 +6,7 @@ function drush_db_provision_migrate_validate() {
}
// Deletes the old database credentials
function drush_db_post_provision_migrate($url) {
function drush_db_post_provision_migrate() {
provision_service('db')->destroy_site_database(
drush_get_option('db_name'),
drush_get_option('db_user'),
......
......@@ -91,12 +91,12 @@ class provisionService_db_mysql extends provisionService_db_pdo {
//todo - SORT THIS SHIT OUT!
function generate_dump($url) {
function generate_dump() {
# set the umask to 077 so that the dump itself is generated so it's non-readable by the webserver
umask(0077);
# mixed copy-paste of drush_shell_exec and provision_shell_exec
$cmd = sprintf("mysqldump --defaults-file=/dev/fd/3 -rsites/%s/database.sql %s", escapeshellcmd($url), escapeshellcmd(drush_get_option('db_name')));
$cmd = sprintf("mysqldump --defaults-file=/dev/fd/3 -rsites/%s/database.sql %s", escapeshellcmd(drush_get_option('uri')), escapeshellcmd(drush_get_option('db_name')));
$this->safe_shell_exec($cmd, drush_get_option('db_host'), urldecode(drush_get_option('db_user')), urldecode(drush_get_option('db_passwd')));
......
<?php
function drush_db_provision_restore_validate($url) {
provision_service('db')->connect($url);
function drush_db_provision_restore_validate() {
provision_service('db')->connect();
}
function drush_db_pre_provision_restore($url = NULL) {
provision_service('db')->create_site_database($url);
function drush_db_pre_provision_restore() {
provision_service('db')->create_site_database();
}
function drush_db_provision_restore($url) {
provision_service('db')->import_site_database($url);
function drush_db_provision_restore() {
provision_service('db')->import_site_database();
}
function drush_db_pre_provision_restore_rollback($url = NULL) {
provision_service('db')->destroy_site_db($url);
function drush_db_pre_provision_restore_rollback() {
provision_service('db')->destroy_site_database();
$keys = array('db_name', 'db_passwd', 'db_user', 'db_host');
......@@ -29,12 +29,12 @@ function drush_db_pre_provision_restore_rollback($url = NULL) {
// Rollback doesn't apply here yet. Unless we trigger a restore of the first dump
// made. Which could go on infinitely if something is really long.
function drush_db_post_provision_restore($url = NULL) {
provision_service('file')->unlink(drush_get_option('sites_path') . '/' . $url . '/database.sql')
function drush_db_post_provision_restore() {
provision_service('file')->unlink(drush_get_option('sites_path') . '/' . drush_get_option('uri') . '/database.sql')
->succeed('Removed dump file @path after restoring from it')
->fail('Could not remove dump file @path', 'DRUSH_PERM_ERROR');
provision_service('db')->destroy_site_database($url);
provision_service('db')->destroy_site_database();
// TODO - test this .. it's probably horribly broken .. deleting the newly restored db instead of the old one.
......
......@@ -5,12 +5,12 @@
class provisionService_http_apache extends provisionService_http {
function create_site_config($url) {
function create_site_config() {
$config = new provisionConfig_apache_site(drush_get_merged_options());
return $config->write();
}
function delete_site_config($url) {
function delete_site_config() {
$config = new provisionConfig_apache_site(drush_get_merged_options());
return $config->unlink();
}
......@@ -20,7 +20,7 @@ class provisionService_http_apache extends provisionService_http {
return $config->write();
}
function delete_platform_config($url) {
function delete_platform_config() {
$config = new provisionConfig_apache_platform(drush_get_merged_options());
return $config->unlink();
}
......@@ -32,13 +32,13 @@ class provisionService_http_apache extends provisionService_http {
}
function delete_server_config($url) {
function delete_server_config() {
$config = new provisionConfig_apache_server(drush_get_merged_options());
return $config->unlink();
}
function verify($url) {
function verify() {
if (PROVISION_CONTEXT_PLATFORM) {
if (drush_get_option('platform', null)) {
$this->create_platform_config();
......@@ -52,7 +52,7 @@ class provisionService_http_apache extends provisionService_http {
$this->create_server_config();
}
elseif (PROVISION_CONTEXT_SITE) {
$this->create_site_config($url);
$this->create_site_config();
}
$this->parse_configs();
......
<?php
function drush_http_provision_delete($url = NULL) {
function drush_http_provision_delete() {
if (PROVISION_CONTEXT_SITE) {
provision_service('http')->delete_site_config($url);
provision_service('http')->delete_site_config();
}
if (PROVISION_CONTEXT_PLATFORM) {
$sites = provision_drupal_find_sites();
......
<?php
function drush_http_post_provision_deploy($url = NULL) {
provision_service('http')->create_site_config($url);
function drush_http_post_provision_deploy() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
/**
* Delete the config file created.
*/
function drush_http_post_provision_deploy_rollback($url = NULL) {
provision_service('http')->create_site_config($url);
function drush_http_post_provision_deploy_rollback() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
......@@ -3,11 +3,11 @@
/**
* Implementation of hook_provision_disable
*/
function drush_http_provision_disable($url = NULL) {
function drush_http_provision_disable() {
drush_set_option('redirect_url', drush_get_option('web_disable_url'));
// TODO - this is majorly wrong i think.
provision_service('http')->create_site_config($url);
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
......@@ -3,8 +3,8 @@
/**
* Implementation of hook_provision_enable
*/
function drush_http_provision_enable($url = NULL) {
provision_service('http')->create_site_config($url);
function drush_http_provision_enable() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
......@@ -2,12 +2,12 @@
include_once(dirname(__FILE__) . '/../provision.service.inc');
function http_drush_init($url = null) {
function http_drush_init() {
// todo same as db, consolidate
$command = drush_get_command();
$command = explode(" ", $command['command']);
if (preg_match("/^provision-/", $command[0])) {
_provision_context_init($url);
_provision_context_init();
if (PROVISION_CONTEXT_SERVER) {
if (!is_null(drush_get_option('init_http'))) {
......@@ -79,21 +79,21 @@ class provisionService_http extends provisionService {
/**
* Generate a site specific configuration file
*/
function create_site_config($url) {
function create_site_config() {
return TRUE;
}
/**
* Remove an existing site configuration file.
*/
function delete_site_config($url) {
function delete_site_config() {
return TRUE;
}
/**
* Add a new platform specific configuration file.
*/
function create_platform_config($url) {
function create_platform_config() {
return TRUE;
}
......
......@@ -10,8 +10,8 @@
/**
* Implementation of hook_provision_post_install
*/
function drush_http_post_provision_install($url = NULL) {
provision_service('http')->create_site_config($url);
function drush_http_post_provision_install() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
......@@ -3,24 +3,24 @@
/**
* Implementation of hook_provision_pre_restore
*/
function drush_http_pre_provision_restore($url) {
function drush_http_pre_provision_restore() {
drush_set_option('redirect_url', drush_get_option('web_maintenance_url'));
provision_service('http')->create_site_config($url);
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
function drush_http_pre_provision_restore_rollback($url) {
provision_service('http')->create_site_config($url);
function drush_http_pre_provision_restore_rollback() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
function drush_http_post_provision_restore($url) {
provision_service('http')->create_site_config($url);
function drush_http_post_provision_restore() {
provision_service('http')->create_site_config();
provision_service('http')->parse_configs();
}
// The old db details should have been switched back by the mysql rollback at this point.
function drush_http_post_provision_restore_rollback($url) {
drush_http_post_provision_restore($url);
function drush_http_post_provision_restore_rollback() {
drush_http_post_provision_restore();
}
<?php
function drush_http_provision_verify($url = null) {
provision_service('http')->verify($url);
function drush_http_provision_verify() {
provision_service('http')->verify();
}
function drush_http_post_provision_verify($url = null) {
function drush_http_post_provision_verify() {
if (PROVISION_CONTEXT_PLATFORM) {
drush_set_option('publish_path', realpath(drush_get_option('publish_path')), 'drupal');
drush_unset_option('master_url', 'drupal');
......
......@@ -9,7 +9,7 @@
/**
* Make sure the site is installed and enabled, and that we have a valid target to back up to.
*/
function drush_provision_drupal_provision_backup_validate($url = NULL, $backup_file = NULL) {
function drush_provision_drupal_provision_backup_validate($backup_file = NULL) {
if (!@drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION)) {
if (drush_get_option('force', false)) {
drush_log("clearing error");
......@@ -36,12 +36,12 @@ function drush_provision_drupal_provision_backup_validate($url = NULL, $backup_f
}
if (!$backup_file) {
$suggested = drush_get_option('backup_path') ."/$url-". date("Ymd.His", mktime()) .".tar.gz";
$suggested = drush_get_option('backup_path') . '/' . drush_get_option('uri') . '-' . date("Ymd.His", mktime()) . '.tar.gz';
// Use format of mysite.com-2008-01-02, if already existing, add number.
while (is_file($suggested)) {
$count++;
$suggested = drush_get_option('backup_path') ."/$url-". date("Ymd.His", mktime()) ."_$count.tar.gz";
$suggested = drush_get_option('backup_path') . '/' . drush_get_option('uri') . '-' . date('Ymd.His', mktime()) . '_' . $count . '.tar.gz';
}
drush_set_option('backup_file', $suggested);
}
......@@ -51,13 +51,13 @@ function drush_provision_drupal_provision_backup_validate($url = NULL, $backup_f
/**
* Implentation of hook_provision_backup()
*/
function drush_provision_drupal_provision_backup($url) {
function drush_provision_drupal_provision_backup() {
$backup_file = drush_get_option('backup_file');
// Adds the site directory into the backup file
drush_log(dt("Adding sites directory to !backup_file", array('!backup_file' => $backup_file)), 'backup');
$olddir = getcwd();
// we need to do this because some retarded implementations of tar (e.g. SunOS) don't support -C
chdir(drush_get_option('sites_path') . "/$url");
chdir(drush_get_option('sites_path') . '/' . drush_get_option('uri'));
if (substr($backup_file, -2) == 'gz') {
// same as above: some do not support -z
$command = "tar cpf - . | gzip -c > %s";
......
......@@ -12,21 +12,21 @@
/**
* Make sure we have a valid site being cloned, and that the file being cloned from exists
*/
function drush_provision_drupal_provision_clone_validate($url = null, $new_url = null, $platform = null) {
function drush_provision_drupal_provision_clone_validate($new_url = null, $platform = null) {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
}
/**
* Make a backup before making any changes, and add extract the file we are restoring from
*/
function drush_provision_drupal_pre_provision_clone($url, $new_url, $platform = null) {
drush_invoke('provision-backup', $url);
function drush_provision_drupal_pre_provision_clone($new_url, $platform = null) {
drush_invoke('provision-backup');
}
/**
* Remove the extracted site directory
*/
function drush_provision_drupal_pre_provision_clone_rollback($url, $new_url, $platform = null) {
function drush_provision_drupal_pre_provision_clone_rollback($new_url, $platform = null) {
$success = provision_service('file')->unlink(drush_get_option('backup_file'))
->succeed('Removed unused clone site package')
->fail('Could not remove unused clone site package');
......@@ -35,7 +35,7 @@ function drush_provision_drupal_pre_provision_clone_rollback($url, $new_url, $pl
/**
* Switch the clone directories around now that we have the new db installed
*/
function drush_provision_drupal_provision_clone($url, $new_url, $platform = null) {
function drush_provision_drupal_provision_clone($new_url, $platform = null) {
# note that we reset the aliases so they don't conflict with the original site
drush_backend_invoke('provision-deploy', array(
$new_url,
......
<?php
function drush_provision_drupal_provision_delete_validate($url = NULL, $backup_file = NULL) {
function drush_provision_drupal_provision_delete_validate($backup_file = NULL) {
if (PROVISION_CONTEXT_SITE) {
_provision_drupal_valid_site();
}
......@@ -10,10 +10,10 @@ function drush_provision_drupal_provision_delete_validate($url = NULL, $backup_f
/**
* Before starting to delete the site, make a backup
*/
function drush_provision_drupal_pre_provision_delete($url = NULL, $backup_file = NULL) {
function drush_provision_drupal_pre_provision_delete($backup_file = NULL) {
if (PROVISION_CONTEXT_SITE) {
drush_set_option('force', true, 'process');
drush_invoke("provision-backup", $url, $backup_file);
drush_invoke("provision-backup", $backup_file);
drush_unset_option('force', 'process');
}
}
......@@ -23,9 +23,9 @@ function drush_provision_drupal_pre_provision_delete($url = NULL, $backup_file =
* If we're deleting a platform, remove the whole platform
* This can't be rolled back. so won't even try.
*/
function drush_provision_drupal_provision_delete($url = NULL) {
function drush_provision_drupal_provision_delete() {
if (PROVISION_CONTEXT_SITE) {
_provision_recursive_delete(drush_get_option('sites_path') . "/$url");
_provision_recursive_delete(drush_get_option('sites_path') . '/' . drush_get_option('uri'));
// we remove the aliases even if redirection is enabled as a precaution
// if redirection is enabled, keep silent about errors
_provision_drupal_delete_aliases(drush_get_option('aliases', array()), drush_get_option('redirection'));
......
......@@ -18,7 +18,7 @@
/**
* Make sure we have a valid site being deployd, and that the file being deployd from exists
*/
function drush_provision_drupal_provision_deploy_validate($url = null, $backup_file = null) {
function drush_provision_drupal_provision_deploy_validate($backup_file = null) {
_provision_drupal_url_required();
$exists = provision_service('file')->exists($backup_file)
......@@ -33,10 +33,10 @@ function drush_provision_drupal_provision_deploy_validate($url = null, $backup_f
/**
* Make a backup before making any changes, and add extract the file we are restoring from
*/
function drush_provision_drupal_pre_provision_deploy($url, $backup_file) {
function drush_provision_drupal_pre_provision_deploy($backup_file) {
// the url is likely to have changed in the deployment
drush_set_option('site_url', $url);
$extracted = provision_service('file')->extract(drush_get_option('backup_file'), drush_get_option('sites_path') . '/' . $url)
drush_set_option('site_url', drush_get_option('uri'));
$extracted = provision_service('file')->extract(drush_get_option('backup_file'), drush_get_option('sites_path') . '/' . drush_get_option('uri'))
->succeed('Successfully extracted the contents of @path')
->fail('Failed to extract the contents of @path', 'PROVISION_BACKUP_EXTRACTION_FAILED')
->status();
......@@ -73,24 +73,23 @@ function drush_provision_drupal_pre_provision_deploy($url, $backup_file) {
/**
* Remove the extracted site directory
*/
function drush_provision_drupal_pre_provision_deploy_rollback($url) {
function drush_provision_drupal_pre_provision_deploy_rollback() {
if ($site_root = drush_get_context('DRUSH_DRUPAL_SITE_ROOT')) {
_provision_recursive_delete($site_root);
}
}
function drush_provision_drupal_provision_deploy($url) {
$url = drush_get_option('site_url');
_provision_drupal_maintain_aliases($url);
function drush_provision_drupal_provision_deploy() {
_provision_drupal_maintain_aliases(drush_get_option('site_url'));
}
function drush_provision_drupal_post_provision_deploy($url) {
function drush_provision_drupal_post_provision_deploy() {
provision_prepare_environment();
_provision_drupal_create_settings_file();
provision_save_site_data($url);
provision_save_site_data();
// call the drush updatedb command.
drush_backend_invoke("updatedb", array('uri' => "http://$url"));
drush_backend_invoke("updatedb", array('uri' => 'http://' . drush_get_option('uri')));
// We should be able to fully load Drupal now.
if (drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL)) {
drush_include_engine('drupal', 'deploy');
......
......@@ -11,9 +11,9 @@
/**
* Make a backup of the site before we mess with it
*/
function drush_provision_drupal_pre_provision_disable($url, $backup_file = null) {
function drush_provision_drupal_pre_provision_disable($backup_file = null) {
drush_set_option('force', true, 'process');
drush_invoke("provision-backup", $url, $backup_file);
drush_invoke('provision-backup', $backup_file);
drush_unset_option('force', 'process');
}
......
......@@ -143,7 +143,7 @@ function install_main() {
drush_set_error('DRUPAL_INSTALL_FAILED');
dlm($e);
}
_provision_drupal_create_directories($url);
_provision_drupal_create_directories();
if ($client_email) {
install_send_welcome_mail($url, $profile, $install_locale, $client_email);
......
......@@ -17,7 +17,7 @@ function drush_provision_drupal_provision_import_validate() {
/**
* Import the information about the existing site, and return it in the $data context array
*/
function drush_provision_drupal_provision_import($url = NULL) {
function drush_provision_drupal_provision_import() {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
drush_include_engine('drupal', 'import', drush_drupal_major_version());
drush_set_option('installed', TRUE, 'site');
......
......@@ -14,11 +14,11 @@
/**
* Check that we are trying to install a new site , and a new site only
*/
function drush_provision_drupal_provision_install_validate($url) {
if (!$url) {
function drush_provision_drupal_provision_install_validate() {
if (!drush_get_option('uri')) {
return drush_set_error("PROVISION_URL_REQUIRED", dt("You need to specify a valid url to install a site"));
}
if (_provision_drupal_site_exists($url)) {
if (_provision_drupal_site_exists()) {
return drush_set_error('PROVISION_SITE_INSTALLED');
}
}
......@@ -26,9 +26,9 @@ function drush_provision_drupal_provision_install_validate($url) {
/**
* Set up the directories and settings.php file that we need.
*/
function drush_provision_drupal_pre_provision_install($url) {
// This is the actual drupal provisioning requirements.
_provision_drupal_create_directories($url);
function drush_provision_drupal_pre_provision_install() {
// This is the actual drupal provisioning requirements.
_provision_drupal_create_directories();
}
/**
......@@ -37,7 +37,7 @@ function drush_provision_drupal_pre_provision_install($url) {
* This is an external script so that php is running in it's own namespace, and
* weird problems such as the multiple database connections don't confuse drupal.
*/
function drush_provision_drupal_provision_install($url) {
function drush_provision_drupal_provision_install() {
// Requires at least the database settings to complete.
provision_prepare_environment();
_provision_drupal_create_settings_file();
......@@ -45,16 +45,16 @@ function drush_provision_drupal_provision_install($url) {
drush_include_engine('drupal', 'install');
drush_set_option('installed', TRUE, 'site');
_provision_drupal_maintain_aliases($url);
_provision_drupal_maintain_aliases();
}
/**
* If the install went south