From 2d42fb91a41c2f5ab9a7617b64676a6a943d0213 Mon Sep 17 00:00:00 2001 From: Pat Dunlavey Date: Tue, 13 Dec 2016 17:23:30 -0500 Subject: [PATCH 1/2] issues/2 (https://github.com/Islandora-Collaboration-Group/drush-sitespinner/issues/2): added message about needing to edit filter-drupal.xml on the Fedora server after site add and delete --- sitespinner.drush.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sitespinner.drush.inc b/sitespinner.drush.inc index 9e443a5..b5c2d26 100644 --- a/sitespinner.drush.inc +++ b/sitespinner.drush.inc @@ -219,6 +219,7 @@ function sitespinner_sitespinner($base, $destination) { sitespinner_print(dt("Site created. Test it at http://!uri\n", array('!uri' => $destination_site_alias_record['uri']))); + sitespinner_print(dt('Be sure to edit the filter-drupal.xml file on the Fedora server to fully enable this site. Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569')); return 0; } @@ -283,6 +284,8 @@ function sitespinner_sitespinner_delete($alias) { else { sitespinner_print(dt('Attempting to delete !symlink, but it does not exist. Skipping...', array('!symlink' => $symlink)) . "\n"); } + sitespinner_print(dt('!sitepath and its drupal database has been deleted.', array('!sitepath' => $multisite_root))); + sitespinner_print(dt('Be sure to edit the filter-drupal.xml file on the Fedora server to remove this site. Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569')); } // }}} From 4f8e6e4f5d15e70403e65d45d45afdeee0526dc4 Mon Sep 17 00:00:00 2001 From: Pat Dunlavey Date: Tue, 13 Dec 2016 19:20:01 -0500 Subject: [PATCH 2/2] issues/2 (https://github.com/Islandora-Collaboration-Group/drush-sitespinner/issues/2): Improve formatting of messages. --- sitespinner.drush.inc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sitespinner.drush.inc b/sitespinner.drush.inc index b5c2d26..774ba74 100644 --- a/sitespinner.drush.inc +++ b/sitespinner.drush.inc @@ -153,6 +153,7 @@ function sitespinner_sitespinner($base, $destination) { $drupal_root = $destination_site_alias_record['root']; $parse_uri = explode('/', $destination_site_alias_record['uri']); $site = end($parse_uri); + $multisite_root = $drupal_root . '/sites/' . str_replace('/', '.', $destination_site_alias_record['uri']); // Determine domain type (path, domain, or subdomain). $domain = 'path'; @@ -217,9 +218,13 @@ function sitespinner_sitespinner($base, $destination) { } - - sitespinner_print(dt("Site created. Test it at http://!uri\n", array('!uri' => $destination_site_alias_record['uri']))); - sitespinner_print(dt('Be sure to edit the filter-drupal.xml file on the Fedora server to fully enable this site. Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569')); + $msgs = array(''); + $msgs[] = dt('!sitepath and its drupal database have been created.', array('!sitepath' => $multisite_root)); + $msgs[] = ''; + $msgs[] = dt('Be sure to edit the filter-drupal.xml file on the Fedora server to fully enable this site.'); + $msgs[] = dt('Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569'); + $msgs[] = ''; + sitespinner_print($msgs); return 0; } @@ -284,8 +289,13 @@ function sitespinner_sitespinner_delete($alias) { else { sitespinner_print(dt('Attempting to delete !symlink, but it does not exist. Skipping...', array('!symlink' => $symlink)) . "\n"); } - sitespinner_print(dt('!sitepath and its drupal database has been deleted.', array('!sitepath' => $multisite_root))); - sitespinner_print(dt('Be sure to edit the filter-drupal.xml file on the Fedora server to remove this site. Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569')); + $msgs = array(''); + $msgs[] = dt('!sitepath and its drupal database have been deleted.', array('!sitepath' => $multisite_root)); + $msgs[] = ''; + $msgs[] = dt('Be sure to edit the filter-drupal.xml file on the Fedora server to remove this site.'); + $msgs[] = dt('Documentation: https://wiki.duraspace.org/pages/viewpage.action?pageId=69833569'); + $msgs[] = ''; + sitespinner_print($msgs); } // }}}