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

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Mon Sep 13 09:53:33 CEST 2010


Author: nerville
Date: 2010-09-13 09:53:31 +0200 (Mon, 13 Sep 2010)
New Revision: 10461

Modified:
   trunk/src/www/admin/pluginman.php
Log:
fix feedback system

Modified: trunk/src/www/admin/pluginman.php
===================================================================
--- trunk/src/www/admin/pluginman.php	2010-09-13 07:52:43 UTC (rev 10460)
+++ trunk/src/www/admin/pluginman.php	2010-09-13 07:53:31 UTC (rev 10461)
@@ -1,27 +1,26 @@
 <?php
 /**
- * GForge Plugin Activate / Deactivate Page
+ * FusionForge Plugin Activate / Deactivate Page
  *
- * @version 
- * @author 
  * Copyright 2005 GForge, LLC
- * http://gforge.org/
+ * Copyright 2010 FusionForge Team
+ * http://fusionforge.org/
  *
  *
- * This file is part of GForge.
+ * This file is part of FusionForge.
  *
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * GForge is distributed in the hope that it will be useful,
+ * FusionForge is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with GForge; if not, write to the Free Software
+ * along with FusionForge; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
@@ -139,8 +138,8 @@
 				// 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) {
-					$feedback .= '<br />['.forge_get_config('config_path'). '/plugins/'.$pluginname.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
-					$feedback .= 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);
+					$warning_msg .= '<br />['.forge_get_config('config_path'). '/plugins/'.$pluginname.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
+					$warning_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);
 				}
 			}
 
@@ -163,7 +162,7 @@
 							$res = db_next_result();
 						}
 					} else {
-						$feedback .= _('Initialisation error<br />Database said: ').db_error();
+						$error_msg .= _('Initialisation error<br />Database said: ').db_error();
 					}
 				}	
 				//we check for a php script	
@@ -177,7 +176,9 @@
 	}
 }
 
-if (isset($feedback)) echo '<div class="feedback">' . $feedback . '</div>';
+if (!empty($feedback)) echo '<div class="feedback">' . $feedback . '</div>';
+if (!empty($warning_msg)) echo '<div class="warning">' . $warning_msg . '</div>';
+if (!empty($error_msg)) echo '<div class="error">' . $error_msg . '</div>';
 echo _('Here you can activate / deactivate site-wide plugins which are in the plugins/ folder. Then, you should activate them also per project, per user or whatever the plugin specifically applies to.<br /><span class="important">Be careful because some groups/users can be using the plugin. Deactivating it will remove the plugin from all users/groups.<br />Be <strong>extra</strong> careful not to run the init-script again when the plugin is reactivated, because some scripts have DROP TABLE statements.</span><br /><br />');
 $title_arr = array( _('Plugin Name'),
 		    _('Status'),




More information about the Fusionforge-commits mailing list