[Fusionforge-commits] r11288 - trunk/src/www/admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Mon Nov 1 21:26:25 CET 2010


Author: aljeux
Date: 2010-11-01 21:26:24 +0100 (Mon, 01 Nov 2010)
New Revision: 11288

Modified:
   trunk/src/www/admin/pluginman.php
Log:
pluginman: Don't try symlink if not needed (or not possible)

Modified: trunk/src/www/admin/pluginman.php
===================================================================
--- trunk/src/www/admin/pluginman.php	2010-11-01 19:53:05 UTC (rev 11287)
+++ trunk/src/www/admin/pluginman.php	2010-11-01 20:26:24 UTC (rev 11288)
@@ -113,10 +113,12 @@
 			// Create a symbolic links to plugins/<plugin>/etc/plugins/<plugin> (if directory exists).
 			if (is_dir(forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname)) {
 				// The apache group or user should have write perms in /etc/gforge/plugins folder...
-				$code = symlink(forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname, forge_get_config('config_path'). '/plugins/'.$pluginname); 
-				if (!$code) {
-					$error_msg .= '<br />['.forge_get_config('config_path'). '/plugins/'.$pluginname.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
-					$error_msg .= sprintf(_('<br />Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $pluginname);
+				if (!is_link(forge_get_config('config_path'). '/plugins/'.$pluginname) && !is_dir(forge_get_config('config_path'). '/plugins/'.$pluginname)) {
+					$code = symlink(forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname, forge_get_config('config_path'). '/plugins/'.$pluginname); 
+					if (!$code) {
+						$error_msg .= '<br />['.forge_get_config('config_path'). '/plugins/'.$pluginname.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
+						$error_msg .= sprintf(_('<br />Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $pluginname);
+					}
 				}
 			}
 




More information about the Fusionforge-commits mailing list