Skip to content
Snippets Groups Projects
Commit 820563e9 authored by Tim Steiner's avatar Tim Steiner
Browse files

Fixed site creation for sites that are created only one level deep ie: http://example.com/newsite/

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@219 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 3cd983c2
No related branches found
No related tags found
No related merge requests found
......@@ -87,10 +87,16 @@ function unl_add_site($site_path, $uri, $clean_url, $db_prefix) {
}
$symlink_target = implode('/', $symlink_target);
if (!$symlink_target) {
$symlink_target = '.';
}
$command = "$php_path sites/all/modules/drush/drush.php -y --uri=$uri site-install unl_profile --sites-subdir=$sites_subdir --db-url=$db_url --db-prefix=$db_prefix --clean-url=$clean_url";
mkdir($subdir, 0755, TRUE);
symlink($symlink_target, $subdir . '/' . $symlink_name);
if ($subdir) {
mkdir($subdir, 0755, TRUE);
}
symlink($symlink_target, DRUPAL_ROOT . '/' . $subdir . '/' . $symlink_name);
shell_exec($command);
}
......@@ -136,7 +142,7 @@ function unl_remove_site($site_path, $uri, $db_prefix) {
$symlink_name = array_pop($subdir);
$subdir_levels = count($subdir);
$subdir = implode('/', $subdir);
unlink($subdir . '/' . $symlink_name);
unlink(DRUPAL_ROOT . '/' . $subdir . '/' . $symlink_name);
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment