[Fusionforge-commits] r10547 - in trunk/src/www: account survey/admin survey/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Sun Sep 19 13:52:35 CEST 2010


Author: nerville
Date: 2010-09-19 13:52:35 +0200 (Sun, 19 Sep 2010)
New Revision: 10547

Modified:
   trunk/src/www/account/index.php
   trunk/src/www/survey/admin/graphs.php
   trunk/src/www/survey/admin/index.php
   trunk/src/www/survey/include/SurveyHTML.class.php
Log:
exit functions migration

Modified: trunk/src/www/account/index.php
===================================================================
--- trunk/src/www/account/index.php	2010-09-19 10:45:32 UTC (rev 10546)
+++ trunk/src/www/account/index.php	2010-09-19 11:52:35 UTC (rev 10547)
@@ -80,7 +80,7 @@
 		$jabber_address,$jabber_only,$theme_id,$address,$address2,$phone,$fax,$title,$ccode)) {
 		form_release_key(getStringFromRequest('form_key'));
 		$error_msg = $u->getErrorMessage();
-		$refresh_url = '/account/?error_msg='.urlencode($error_msg)
+		$refresh_url = '/account/?error_msg='.urlencode($error_msg);
 	} else {
 		$feedback = _('Updated');
 		$refresh_url = '/account/?feedback='.urlencode($feedback);

Modified: trunk/src/www/survey/admin/graphs.php
===================================================================
--- trunk/src/www/survey/admin/graphs.php	2010-09-19 10:45:32 UTC (rev 10546)
+++ trunk/src/www/survey/admin/graphs.php	2010-09-19 11:52:35 UTC (rev 10547)
@@ -1,13 +1,32 @@
 <?php
 /**
-  *
+ * FusionForge Survey HTML Facility
   * General Graph showing module for Survey
-  *
-  * This script produces PNG image which shows graph of SCM metrics
-  *
-  *
-  */
+ *
+ * Copyright 2010 (c) FusionForge Team
+ * http://fusionforge.org/
+ *
+ * This file is part of FusionForge.
+ *
+ * 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.
+ *
+ * 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 FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
+/*
+ * This script produces PNG image which shows graph of SCM metrics
+ */
+
 /**
  * Expecting data
  *  @ legend[] - array of legends
@@ -23,7 +42,7 @@
 // Check if we have jpgraph
 if (!file_exists(forge_get_config('jpgraph_path').'/jpgraph.php')) {
     //# TODO: Need to show the message as a image file
-    exit_error('Error', 'Package JPGraph not installed');
+    exit_error(_('Package JPGraph not installed'),'home');
 }
 
 // Read jPGraph libraries.

Modified: trunk/src/www/survey/admin/index.php
===================================================================
--- trunk/src/www/survey/admin/index.php	2010-09-19 10:45:32 UTC (rev 10546)
+++ trunk/src/www/survey/admin/index.php	2010-09-19 11:52:35 UTC (rev 10547)
@@ -1,25 +1,26 @@
 <?php
 /**
- * GForge Survey Facility
+ * FusionForge Survey Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 2002-2004 (c) GForge Team
+ * Copyright 2010 (c) Franck Villaume
+ * 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
  */
 
@@ -40,17 +41,19 @@
 if (!$group || !is_object($group)) {
     exit_no_group();
 } elseif ($group->isError()) {
-    exit_error('Error', $group->getErrorMessage());
+    exit_error($group->getErrorMessage(),'home');
 }
 
 echo '<h1>'._('Survey Administration').'</h1>';
 
-if (!session_loggedin() || !user_ismember($group_id,'A')) {
-	echo '<div class="error">'._('Permission denied').'</div>';
-	$sh->footer(array());
-	exit;
+if (!session_loggedin()) {
+	exit_not_logged_in()
 }
 
+if ( !user_ismember($group_id,'A')) {
+	exit_permission_denied(_('You are not a Project admin'),'home');
+}
+
 ?>
 
 <p>

Modified: trunk/src/www/survey/include/SurveyHTML.class.php
===================================================================
--- trunk/src/www/survey/include/SurveyHTML.class.php	2010-09-19 10:45:32 UTC (rev 10546)
+++ trunk/src/www/survey/include/SurveyHTML.class.php	2010-09-19 11:52:35 UTC (rev 10547)
@@ -46,7 +46,7 @@
 		global $group_id,$is_admin_page,$HTML;
 
 		if (!forge_get_config('use_survey')) {
-			exit_disabled();
+			exit_disabled('home');
 		}
 		
 		$params['toptab']='surveys';
@@ -54,7 +54,7 @@
 		
 		if ($project =& group_get_object($group_id)){
 			if (!$project->usesSurvey()) {
-			exit_error(_('Error'), _('This Project Has Turned Off Surveys.'));
+			exit_disabled('home');
 			}
 			
 			site_project_header($params);




More information about the Fusionforge-commits mailing list