[Fusionforge-commits] FusionForge branch master updated. a92d158036b255f5f71cdd4eab53b23e479a2183

Franck VILLAUME nerville at fusionforge.org
Sun Nov 10 18:23:37 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  a92d158036b255f5f71cdd4eab53b23e479a2183 (commit)
      from  bd7c4c504a1c0d4d5aa5abca8745600cef0de072 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a92d158036b255f5f71cdd4eab53b23e479a2183
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Nov 10 18:23:16 2013 +0100

    bug [#605]: fix plugin installation, display correctly the error

diff --git a/src/common/include/Plugin.class.php b/src/common/include/Plugin.class.php
index b964496..77c3543 100644
--- a/src/common/include/Plugin.class.php
+++ b/src/common/include/Plugin.class.php
@@ -188,20 +188,20 @@ class Plugin extends Error {
 			if (!is_link($www.'/'.$installdir)) {
 				$code = symlink($path . '/www', $www.'/'.$installdir);
 				if (!$code) {
-					$this->setError('['.$www.'/'.$installdir.'->'.$path . '/www]'.
-						'<br />Soft link to www couldn\'t be created. Check the write permissions for apache in gforge www/plugins dir or create the link manually.');
+					$this->setError('['.$www.'/'.$installdir.'->'.$path . '/www]<br />'.
+						_('Soft link to www could not be created. Check the write permissions for apache in fusionforge www/plugins dir or create the link manually.'));
 				}
 			}
 		}
 
 		// Create a symbolic links to plugins/<plugin>/etc/plugins/<plugin> (if directory exists).
 		if (is_dir($path . '/etc/plugins/' . $name)) {
-			// The apache group or user should have write perms in /etc/gforge/plugins folder...
+			// The apache group or user should have write perms in /etc/fusionforge/plugins folder...
 			if (!is_link(forge_get_config('config_path'). '/plugins/'.$name) && !is_dir(forge_get_config('config_path'). '/plugins/'.$name)) {
 				$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
 				if (!$code) {
 					$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
-					_('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+					_('Config file could not be linked to %s. Check the write permissions for apache in /etc/fusionforge/plugins or create the link manually.'), forge_get_config('config_path').'/plugins/'.$name);
 				}
 			}
 		}
@@ -213,12 +213,12 @@ class Plugin extends Error {
 
 		// Create a symbolic links to plugins/<plugin>/etc/plugins/<plugin> (if directory exists).
 		if (is_dir($path . '/etc/plugins/' . $name)) {
-			// The apache group or user should have write perms in /etc/gforge/plugins folder...
+			// The apache group or user should have write perms in /etc/fusionforge/plugins folder...
 			if (!is_link(forge_get_config('config_path'). '/plugins/'.$name) && !is_dir(forge_get_config('config_path'). '/plugins/'.$name)) {
 				$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
 				if (!$code) {
 					$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
-					_('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+					_('Config file could not be linked to %s. Check the write permissions for apache in /etc/fusionforge/plugins or create the link manually.'), forge_get_config('config_path').'/plugins/'.$name);
 				}
 			}
 		}
diff --git a/src/www/admin/pluginman.php b/src/www/admin/pluginman.php
index 1172d72..1966385 100644
--- a/src/www/admin/pluginman.php
+++ b/src/www/admin/pluginman.php
@@ -102,8 +102,6 @@ if (getStringFromRequest('update')) {
 		if (!$res) {
 			exit_error(db_error(), 'admin');
 		} else {
-			$feedback = sprintf(_('Plugin %1$s updated Successfully'), $pluginname);
-
 			// Load the plugin and now get information from it.
 			$pm = plugin_manager_get_object();
 			$pm->LoadPlugin($pluginname);
@@ -116,6 +114,11 @@ if (getStringFromRequest('update')) {
 					$plugin->install();
 				}
 			}
+			if ($plugin->isError()) {
+				$error_msg = $plugin->getErrorMessage();
+			} else {
+				$feedback = sprintf(_('Plugin %1$s updated Successfully'), $pluginname);
+			}
 		}
 	}
 }

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/Plugin.class.php |   12 ++++++------
 src/www/admin/pluginman.php         |    7 +++++--
 2 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list