[Fusionforge-commits] r10627 - in trunk/src: common/include www/pm www/pm/admin www/pm/include www/pm/msproject www/pm/reporting

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Wed Sep 22 15:19:18 CEST 2010


Author: nerville
Date: 2010-09-22 15:19:18 +0200 (Wed, 22 Sep 2010)
New Revision: 10627

Modified:
   trunk/src/common/include/RBAC.php
   trunk/src/common/include/RBACEngine.class.php
   trunk/src/common/include/session.php
   trunk/src/www/pm/add_task.php
   trunk/src/www/pm/admin/index.php
   trunk/src/www/pm/calendar.php
   trunk/src/www/pm/deletetask.php
   trunk/src/www/pm/detail_task.php
   trunk/src/www/pm/downloadcsv.php
   trunk/src/www/pm/gantt.php
   trunk/src/www/pm/ganttofuser.php
   trunk/src/www/pm/ganttpage.php
   trunk/src/www/pm/include/ProjectGroupHTML.class.php
   trunk/src/www/pm/index.php
   trunk/src/www/pm/mod_task.php
   trunk/src/www/pm/msproject/msp.php
   trunk/src/www/pm/msproject/xmlparser.php
   trunk/src/www/pm/postuploadcsv.php
   trunk/src/www/pm/reporting/index.php
   trunk/src/www/pm/t_follow.php
   trunk/src/www/pm/t_lookup.php
   trunk/src/www/pm/task.php
   trunk/src/www/pm/uploadcsv.php
Log:
exit functions migration

Modified: trunk/src/common/include/RBAC.php
===================================================================
--- trunk/src/common/include/RBAC.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/common/include/RBAC.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -332,7 +332,7 @@
 				$this->setError('BaseRole::fetchData()::'.db_error());
 				return false;
 			}
-			$this->data_array =& db_fetch_array($res);
+			$this->data_array = db_fetch_array($res);
 			
 			$res = db_query_params ('SELECT section_name, ref_id, perm_val FROM pfo_role_setting WHERE role_id=$1',
 						array ($role_id)) ;
@@ -341,7 +341,7 @@
 				return false;
 			}
 			$this->perms_array=array();
-			while ($arr =& db_fetch_array($res)) {
+			while ($arr = db_fetch_array($res)) {
 				$this->perms_array[$arr['section_name']][$arr['ref_id']] = $arr['perm_val'];
 			}
 		} else {

Modified: trunk/src/common/include/RBACEngine.class.php
===================================================================
--- trunk/src/common/include/RBACEngine.class.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/common/include/RBACEngine.class.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -55,7 +55,7 @@
 			if (USE_PFO_RBAC) {
 				$res = db_query_params ('SELECT role_id FROM pfo_user_role WHERE user_id=$1',
 						array ($user->getID()));
-				while ($arr =& db_fetch_array($res)) {
+				while ($arr = db_fetch_array($res)) {
 					$this->_cached_available_roles[] = $this->getRoleById ($arr['role_id']) ;
 				}
 			} else {

Modified: trunk/src/common/include/session.php
===================================================================
--- trunk/src/common/include/session.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/common/include/session.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -378,22 +378,22 @@
 
 		$perm =& $group->getPermission ();
 		if (!$perm || !is_object($perm) || $perm->isError()) {
-			exit_permission_denied($reason);
+			exit_permission_denied($reason,'');
 		}
 
 		if (isset($req['admin_flags']) && $req['admin_flags']) {
 			if (!$perm->isAdmin()) {
-				exit_permission_denied($reason);
+				exit_permission_denied($reason,'');
 			}
 		} else {
 			if (!$perm->isMember()) {
-				exit_permission_denied($reason);
+				exit_permission_denied($reason,'');
 			}
 		}
 	} else if ($req['isloggedin']) {
 		//no need to check as long as the check is present at top of function
 	} else {
-		exit_permission_denied($reason);
+		exit_permission_denied($reason,'');
 	}
 }
 
@@ -406,7 +406,7 @@
  */
 function session_require_perm ($section, $reference, $action = NULL, $reason='') {
 	if (!forge_check_perm ($section, $reference, $action)) {
-		exit_permission_denied ($reason);
+		exit_permission_denied ($reason,'');
 	}		
 }
 
@@ -419,7 +419,7 @@
  */
 function session_require_global_perm ($section, $action = NULL, $reason='') {
 	if (!forge_check_global_perm ($section, $action)) {
-		exit_permission_denied ($reason);
+		exit_permission_denied ($reason,'');
 	}		
 }
 

Modified: trunk/src/www/pm/add_task.php
===================================================================
--- trunk/src/www/pm/add_task.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/add_task.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,24 +1,36 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999-2000, Tim Perdue/Sourceforge
+ * Copyright 2002, Tim Perdue/GForge, LLC
+ * 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once $gfwww.'include/note.php';
 
 $related_artifact_id = getIntFromRequest('related_artifact_id');
 $related_artifact_summary = getStringFromRequest('related_artifact_summary');
+$feedback = htmlspecialchars(getStringFromRequest('feedback'));
+$warning_msg = htmlspecialchars(getStringFromRequest('warning_msg'));
+$error_msg = htmlspecialchars(getStringFromRequest('error_msg'));
 
 pm_header(array('title'=>_('Add a new Task'),'group_project_id'=>$group_project_id));
 echo notepad_func();

Modified: trunk/src/www/pm/admin/index.php
===================================================================
--- trunk/src/www/pm/admin/index.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/admin/index.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,29 @@
 <?php
 /**
- * GForge Project Management Facility
+ * Project Management Facility : Admin
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'pm/include/ProjectGroupHTML.class.php';
@@ -36,7 +45,7 @@
 if (!$g || !is_object($g)) {
 	exit_no_group();
 } elseif ($g->isError()) {
-	exit_error('Error',$g->getErrorMessage());
+	exit_error($g->getErrorMessage(),'pm');
 }
 
 $update_cat = getStringFromRequest('update_cat');
@@ -50,9 +59,9 @@
 	*/
 	$pg = new ProjectGroup($g,$group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error('Error','Unable to create ProjectCategory Object');
+		exit_error(_('Unable to create ProjectCategory Object'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error('Error',$pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	if (getStringFromRequest('addproject')) {
@@ -66,11 +75,10 @@
 		*/
 		session_require_perm ('pm_admin', $group_id) ;
 		if (!$pg->create($project_name,$description,$is_public,$send_all_posts_to)) {
-			exit_error('Error',$pg->getErrorMessage());
+			exit_error($pg->getErrorMessage(),'pm');
 		} else {
 			$feedback .= _('Subproject Inserted');
-			$feedback .= '<br />';
-			$feedback .= _("Please configure also the roles (by default, it's 'No Access')");
+			$warning_msg .= _("Please configure also the roles (by default, it's 'No Access')");
 		}
 
 	} else if ($add_cat) {
@@ -83,10 +91,10 @@
 
 		$pc = new ProjectCategory($pg);
 		if (!$pc || !is_object($pc)) {
-			exit_error('Error','Unable to create ProjectCategory Object');
+			exit_error(_('Unable to create ProjectCategory Object'),'pm');
 		} else {
 			if (!$pc->create($name)) {
-				exit_error('Error','Error inserting: '.$pc->getErrorMessage());
+				exit_error(_('Error inserting: ').$pc->getErrorMessage(),'pm');
 			} else {
 				$feedback .= _('Category Inserted');
 			}
@@ -103,12 +111,12 @@
 
 		$pc = new ProjectCategory($pg,$id);
 		if (!$pc || !is_object($pc)) {
-			exit_error('Error','Unable to create ProjectCategory Object');
+			exit_error(_('Unable to create ProjectCategory Object'),'pm');
 		} elseif ($pc->isError()) {
-			exit_error('Error',$pc->getErrorMessage());
+			exit_error($pc->getErrorMessage(),'pm');
 		} else {
 			if (!$pc->update($name)) {
-				exit_error('Error','Error updating: '.$pc->getErrorMessage());
+				exit_error(_('Error updating: '.$pc->getErrorMessage()),'pm');
 			} else {
 				$feedback .= _('Category Updated');
 				$update_cat=false;
@@ -127,7 +135,7 @@
 		session_require_perm ('pm', $pg->getID(), 'manager') ;
 
 		if (!$pg->update($project_name,$description,$send_all_posts_to)) {
-			exit_error('Error',$pg->getErrorMessage());
+			exit_error($pg->getErrorMessage(),'pm');
 		} else {
 			$feedback .= _('Updated successfully');
 		}
@@ -143,7 +151,7 @@
 		session_require_perm ('pm', $pg->getID(), 'manager') ;
 
 		if (!$pg->delete(getStringFromRequest('sure'),getStringFromRequest('really_sure'))) {
-			exit_error('Error',$pg->getErrorMessage());
+			exit_error($pg->getErrorMessage(),'pm');
 		} else {
 			$feedback .= _('Successfully Deleted');
 			$group_project_id=0;
@@ -161,9 +169,9 @@
 
 	$pg = new ProjectGroup($g,$group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error('Error','Unable to create ProjectCategory Object');
+		exit_error(_('Unable to create ProjectCategory Object'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error('Error',$pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	session_require_perm ('pm', $pg->getID(), 'manager') ;
@@ -225,22 +233,22 @@
 
 	$pg = new ProjectGroup($g,$group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error('Error','Unable to create ProjectCategory Object');
+		exit_error(_('Unable to create ProjectCategory Object'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error('Error',$pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	session_require_perm ('pm', $pg->getID(), 'manager') ;
 
 	$title = sprintf(_('Modify a Category in: %s'), $pg->getName());
-	pm_header(array ('title'=>$title));
 
 	$ac = new ProjectCategory($pg,$id);
 	if (!$ac || !is_object($ac)) {
-		$feedback .= 'Unable to create ProjectCategory Object';
+		exit_error(_('Unable to create ProjectCategory Object'),'pm');
 	} elseif ($ac->isError()) {
-		$feedback .= $ac->getErrorMessage();
+		exit_error($ac->getErrorMessage(),'pm');
 	} else {
+	    pm_header(array ('title'=>$title));
 		?>
 		<p />
 		<form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id; ?>" method="post" />
@@ -251,7 +259,7 @@
 		<strong><?php echo _('Category Name')?>:</strong><br />
 		<input type="text" name="name" value="<?php echo $ac->getName(); ?>" />
 		<p />
-		<span class="important"><?php echo _('It is not recommended that you change the category name because other things are dependent upon it. When you change the category name, all related items will be changed to the new name.')?></span>
+		<div class="warning"><?php echo _('It is not recommended that you change the category name because other things are dependent upon it. When you change the category name, all related items will be changed to the new name.')?></div>
 		<p />
 		<input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
 		</form>
@@ -299,14 +307,14 @@
 
 	$pg = new ProjectGroup($g,$group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error('Error','Could Not Get ProjectGroup');
+		exit_error(_('Could Not Get ProjectGroup'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error('Error',$pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	session_require_perm ('pm', $pg->getID(), 'manager') ;
 
-	pm_header(array('title'=>_('Change Tasks Status')));
+	pm_header(array('title'=>_('Update Subproject Tasks: ').$pg->getName()));
 
 	?>
 	<p><?php echo _('You can modify an existing subproject using this form. Please note that private subprojects can still be viewed by members of your project, but not the general public.') ?></p>
@@ -364,9 +372,9 @@
 
 	$pg = new ProjectGroup($g,$group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error('Error','Could Not Get ProjectGroup');
+		exit_error(_('Could Not Get ProjectGroup'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error('Error',$pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	session_require_perm ('pm', $pg->getID(), 'manager') ;
@@ -391,6 +399,13 @@
 
 } else {
 
+	$pgf = new ProjectGroupFactory($g);
+	if (!$pgf || !is_object($pgf)) {
+		exit_error(_('Could Not Get Factory'),'pm');
+	} elseif ($pgf->isError()) {
+		exit_error($pgf->getErrorMessage(),'pm');
+	}
+
 	/*
 		Show main page
 	*/
@@ -408,13 +423,6 @@
 		<?php
 	}
 
-	$pgf = new ProjectGroupFactory($g);
-	if (!$pgf || !is_object($pgf)) {
-		exit_error('Error','Could Not Get Factory');
-	} elseif ($pgf->isError()) {
-		exit_error('Error',$pgf->getErrorMessage());
-	}
-
 	$pg_arr =& $pgf->getProjectGroups();
 
 	if (count($pg_arr) < 1 || $pg_arr == false) {

Modified: trunk/src/www/pm/calendar.php
===================================================================
--- trunk/src/www/pm/calendar.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/calendar.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,17 +1,39 @@
 <?php
 /**
+ * Project Management Facility : Display Calendar
  *
+ * Copyright 2002 GForge, LLC
+ * 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
+ */
+
+/**
+ *
  * Display a calendar.
  * This file displays various sorts of calendars.
  *
- * Copyright 2002 (c) GForge Development Team
- *
  * @todo some locales start the week with "Monday", and not "Sunday".
  * @todo display holidays.
  */
 
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
+require_once $gfwww.'pm/include/ProjectGroupHTML.class.php';
 
 $group_id = getIntFromRequest('group_id');
 $group_project_id = getIntFromRequest('group_project_id');
@@ -22,30 +44,25 @@
 
 // Some sanity checks first.
 if ($year && ($year < 1990 || $year > 2020)) {
-	exit_error(_('Invalid year'),
-		   _('Not between 1990 and 2000'));
+	exit_error(_('Invalid year: Not between 1990 and 2000'),'pm');
 }
 
 if ($month && ($month < 1 || $month > 12)) {
-	exit_error(_('Invalid month'),
-		   _('Not between 1 and 12'));
+	exit_error(_('Invalid month: Not between 1 and 12'),'pm');
 }
 
 if ($day && ($day < 1 || $day > 31)) {
-	exit_error(_('Invalid day'),
-		   _('Not between 1 and 31'));
+	exit_error(_('Invalid day: Not between 1 and 31'),'pm');
 }
 
 if ($year && isset($month) && isset($day)) {
 	if (!checkdate($month, $day, $year)) {
-		exit_error(_('Invalid date'),
-			   sprintf(_('Date not valid'), "$year-$month-$day"));
+		exit_error(_('Invalid date').sprintf(_('Date not valid'), "$year-$month-$day"),'pm');
 	}
 }
 
 if ($type && $type != 'onemonth' && $type != 'threemonth' && $type != 'currentyear' && $type != 'comingyear') {
-	exit_error(_('Invalid type'),
-		   _('Type not in onemonth, threemonth, currentyear, comingyear'));
+	exit_error(_('Invalid type: Type not in onemonth, threemonth, currentyear, comingyear'),'pm');
 }
 
 // Fill in defaults
@@ -80,20 +97,20 @@
 	if (!$g || !is_object($g)) {
 		exit_no_group();
 	} elseif ($g->isError()) {
-		exit_error(_('ERROR'), $g->getErrorMessage());
+		exit_error($g->getErrorMessage(),'pm');
 	}
 	$pg = new ProjectGroup($g, $group_project_id);
 	if (!$pg || !is_object($pg)) {
-		exit_error(_('ERROR'), 'BUG: Could Not Get Factory');
+		exit_error(_('Error: Could Not Get Factory'),'pm');
 	} elseif ($pg->isError()) {
-		exit_error(_('ERROR'), $pg->getErrorMessage());
+		exit_error($pg->getErrorMessage(),'pm');
 	}
 
 	$ptf = new ProjectTaskFactory($pg);
 	if (!$ptf || !is_object($ptf)) {
-		exit_error(_('ERROR'), 'BUG: Could Not Get ProjectTaskFactory');
+		exit_error(_('Error: Could Not Get ProjectTaskFactory'),'pm');
 	} elseif ($ptf->isError()) {
-		exit_error(_('ERROR'), $ptf->getErrorMessage());
+		exit_error($ptf->getErrorMessage(),'pm');
 	}
 	// Violate all known laws about OOP here
 	$ptf->offset=0;
@@ -104,11 +121,11 @@
 	$ptf->category=0;
 	$pt_arr =& $ptf->getTasks();
 	if ($ptf->isError()) {
-		exit_error(_('ERROR'), $ptf->getErrorMessage());
+		exit_error($ptf->getErrorMessage(),'pm');
 	}
 }
 
-$HTML->header(array('title'=>_('Calendar'),'group'=>$group_id));
+pm_header(array('title'=>_('Calendar'),'group'=>$group_id));
 
 /**
  * Create link to a task.
@@ -319,7 +336,7 @@
 	}
 }
 
-$HTML->footer(array());
+pm_footer(array());
 
 // Local Variables:
 // mode: php

Modified: trunk/src/www/pm/deletetask.php
===================================================================
--- trunk/src/www/pm/deletetask.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/deletetask.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,28 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge : Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
-
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 pm_header(array('title'=>_('Delete a Task'),'group_project_id'=>$group_project_id));
 
 ?>

Modified: trunk/src/www/pm/detail_task.php
===================================================================
--- trunk/src/www/pm/detail_task.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/detail_task.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,29 @@
 <?php
 /**
- * GForge Project Management Facility
+ * Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 pm_header(array('title'=>_('Task Detail'),'group_project_id'=>$group_project_id));
 
 ?>

Modified: trunk/src/www/pm/downloadcsv.php
===================================================================
--- trunk/src/www/pm/downloadcsv.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/downloadcsv.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -95,14 +95,14 @@
 
 $ptf = new ProjectTaskFactory($pg);
 if (!$ptf || !is_object($ptf)) {
-    exit_error('Error','Could Not Get ProjectTaskFactory');
+    exit_error(_('Could Not Get ProjectTaskFactory'),'pm');
 } elseif ($ptf->isError()) {
-    exit_error('Error',$ptf->getErrorMessage());
+    exit_error($ptf->getErrorMessage(),'pm');
 }
 $ptf->order='external_id';
 $pt_arr =& $ptf->getTasks();
 if ($ptf->isError()) {
-    exit_error('Error',$ptf->getErrorMessage());
+    exit_error($ptf->getErrorMessage(),'pm');
 }
 
 //

Modified: trunk/src/www/pm/gantt.php
===================================================================
--- trunk/src/www/pm/gantt.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/gantt.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,7 +1,30 @@
 <?php
+/**
+ * Project Management Facility
+ *
+ * Copyright 2010, 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
+ */
 
+
 if (!file_exists(forge_get_config('jpgraph_path').'/jpgraph.php')) {
-	exit_error('Error', 'Package JPGraph not installed');
+	exit_error(_('Package JPGraph not installed'),'pm');
 }
 
 require_once(forge_get_config('jpgraph_path').'/jpgraph.php');
@@ -11,9 +34,9 @@
 
 $ptf = new ProjectTaskFactory($pg);
 if (!$ptf || !is_object($ptf)) {
-	exit_error('Error','Could Not Get ProjectTaskFactory');
+	exit_error(_('Could Not Get ProjectTaskFactory'),'pm');
 } elseif ($ptf->isError()) {
-	exit_error('Error getting PTF',$ptf->getErrorMessage());
+	exit_error(_('Error getting PTF: ').$ptf->getErrorMessage(),'pm');
 }
 
 $offset = getIntFromRequest('offset');
@@ -27,12 +50,12 @@
 
 $ptf->setup($offset,$_order,$max_rows,'custom',$_assigned_to,$_status,$_category_id);
 if ($ptf->isError()) {
-	exit_error('Error in PTF',$ptf->getErrorMessage());
+	exit_error(_('Error in PTF: ').$ptf->getErrorMessage(),'pm');
 }
 
 $pt_arr =& $ptf->getTasks();
 if ($ptf->isError()) {
-	exit_error('Error',$ptf->getErrorMessage());
+	exit_error($ptf->getErrorMessage(),'pm');
 }
 
 if ($_size==640) {

Modified: trunk/src/www/pm/ganttofuser.php
===================================================================
--- trunk/src/www/pm/ganttofuser.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/ganttofuser.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,5 +1,28 @@
 <?php
+/**
+ * FusionForge : Project Management Facility
+ *
+ * Copyright 2010, 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
+ */
 
+
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once(forge_get_config('jpgraph_path').'/jpgraph.php');
@@ -8,11 +31,11 @@
 
 
 if (!file_exists(forge_get_config('jpgraph_path').'/jpgraph.php')) {
-	exit_error('Error', 'Package JPGraph not installed');
+	exit_error(_('Package JPGraph not installed'),'pm');
 }
 
 if (!session_loggedin()) {
-	exit_error('Error', 'You are not logged in!');
+    exit_not_logged_in();
 }
 
 // 

Modified: trunk/src/www/pm/ganttpage.php
===================================================================
--- trunk/src/www/pm/ganttpage.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/ganttpage.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,24 +1,31 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge : Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
+echo '<?xml version="1.0" encoding="UTF-8"?>';?>
 
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
-?>
-
-<?php echo '<?xml version="1.0" encoding="UTF-8"?>';?>
-
 <!DOCTYPE html
 	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Modified: trunk/src/www/pm/include/ProjectGroupHTML.class.php
===================================================================
--- trunk/src/www/pm/include/ProjectGroupHTML.class.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/include/ProjectGroupHTML.class.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,29 @@
 <?php
 /**
- * GForge Project Management Facility
+ * Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once $gfcommon.'pm/ProjectGroup.class.php';
 
 function pm_header($params) {
@@ -36,7 +45,7 @@
 	}
 
 	if (!$project->usesPm()) {
-		exit_error(_('Error'),_('This Project Has Turned Off The Tasks'));
+		exit_disabled('home');
 	}
 
 	site_project_header($params);

Modified: trunk/src/www/pm/index.php
===================================================================
--- trunk/src/www/pm/index.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/index.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,29 @@
 <?php
 /**
- * GForge Project Management Facility
+ * Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'pm/include/ProjectGroupHTML.class.php';
@@ -29,19 +38,19 @@
 if (!$g || !is_object($g)) {
 	exit_no_group();
 } elseif ($g->isError()) {
-	exit_error('Error',$g->getErrorMessage());
+	exit_error($g->getErrorMessage(),'pm');
 }
 
 $pgf = new ProjectGroupFactory($g);
 if (!$pgf || !is_object($pgf)) {
-	exit_error('Error','Could Not Get Factory');
+	exit_error(_('Could Not Get Factory'),'pm');
 } elseif ($pgf->isError()) {
-	exit_error('Error',$pgf->getErrorMessage());
+	exit_error($pgf->getErrorMessage(),'pm');
 }
 
 $pg_arr =& $pgf->getProjectGroups();
 if ($pg_arr && $pgf->isError()) {
-	exit_error('Error',$pgf->getErrorMessage());
+	exit_error($pgf->getErrorMessage(),'pm');
 }
 
 pm_header(array('title'=>_('Subprojects and Tasks')));

Modified: trunk/src/www/pm/mod_task.php
===================================================================
--- trunk/src/www/pm/mod_task.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/mod_task.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,20 +1,29 @@
 <?php
 /**
- * GForge Project Management Facility
+ * FusionForge : Project Management Facility
  *
- * Copyright 2002 GForge, LLC
- * http://gforge.org/
+ * Copyright 1999/2000, Sourceforge.net Tim Perdue
+ * Copyright 2002 GForge, LLC, Tim Perdue
+ * Copyright 2010, 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
  */
-/*
 
-	Tasks
-	By Tim Perdue, Sourceforge, 11/99
-	Heavy rewrite by Tim Perdue April 2000
-
-	Total rewrite in OO and GForge coding guidelines 12/2002 by Tim Perdue
-*/
-
 require_once $gfwww.'include/note.php';
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
@@ -233,7 +242,7 @@
 
 $report=new Report();
 if ($report->isError()) {
-	exit_error('Error',$report->getErrorMessage());
+	exit_error($report->getErrorMessage(),'pm');
 }
 
 echo $HTML->listTableTop ($title_arr);

Modified: trunk/src/www/pm/msproject/msp.php
===================================================================
--- trunk/src/www/pm/msproject/msp.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/msproject/msp.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,10 +1,25 @@
 <?php
 /**
- * GForge MS Project Integration Facility
+ *  MS Project Integration Facility
  *
  * Copyright 2004 GForge, LLC
- * http://gforge.org/
+ * Copyright 2010, 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 require_once $gfcommon.'include/pre.php';
@@ -43,7 +58,7 @@
 					   array ()) ;
 		
 		$gids = array () ;
-		while ($arr =& db_fetch_array($result)) {
+		while ($arr = db_fetch_array($result)) {
 			if (forge_check_perm ('pm', $arr['group_project_id'], 'read')) {
 				$gids[] = $arr['group_project_id'] ;
 			}

Modified: trunk/src/www/pm/msproject/xmlparser.php
===================================================================
--- trunk/src/www/pm/msproject/xmlparser.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/msproject/xmlparser.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,25 +1,27 @@
 <?php
 /**
- * GForge MS Project Integration Facility
+ * MS Project Integration Facility
  *
+ * Copyright 2004 GForge, LLC
+ * http://fusionforge.org
+ *
  * Provides some fuctions for Ms Project Plugin.
  *
- * 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
- * Copyright 2004 GForge, LLC
  */
 
 require_once $gfwww.'pm/msproject/msp.php';

Modified: trunk/src/www/pm/postuploadcsv.php
===================================================================
--- trunk/src/www/pm/postuploadcsv.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/postuploadcsv.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -114,7 +114,7 @@
 	if ($res['success']) {
 		$feedback .= 'Import Was Successful';
 	} else {
-		$feedback .= $res['errormessage'];
+		$error_msg .= $res['errormessage'];
 	}
 }
 ?>

Modified: trunk/src/www/pm/reporting/index.php
===================================================================
--- trunk/src/www/pm/reporting/index.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/reporting/index.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -46,7 +46,7 @@
 if (!$g || !is_object($g)) {
 	exit_no_group();
 } elseif ($g->isError()) {
-	exit_error('Error',$g->getErrorMessage());
+	exit_error($g->getErrorMessage(),'pm');
 }
 
 session_require_perm ('pm_admin', $group_id) ;
@@ -244,7 +244,7 @@
 		  _('<p>Note that same task can be assigned to several technicians. Such task will be counted for each of them.</p>'));
 
 	} else {
-		exit_missing_param();
+		exit_missing_param('','','pm');
 	}
 
 } else {

Modified: trunk/src/www/pm/t_follow.php
===================================================================
--- trunk/src/www/pm/t_follow.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/t_follow.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -33,23 +33,13 @@
 if (!$tid)
 	$tid = util_path_info_last_numeric_component();
 if (!$tid) {
-	header("HTTP/1.0 404 Not Found");
-	echo "You forgot to pass the tid.\n";
-	exit;
+    exit_missing_param('',array(_('TID')),'pm');
 }
 
 $tinfo = getGroupProjectIdGroupId($tid);
 
 if (!$tinfo) {
-	header("HTTP/1.0 404 Not Found");
-	echo "There is no task with id ".$tid."!\n";
-	exit;
+    exit_error(_('no task with id :').$tid,'pm');
 }
 
-$dsturl = util_make_url("/pm/task.php?func=detailtask&project_task_id=" .
-    $tinfo['project_task_id'] . "&group_id=" . $tinfo['group_id'] .
-    "&group_project_id=" . $tinfo['group_project_id']);
-header("HTTP/1.0 302 Found");
-header("Location: " . $dsturl);
-echo "The result is at:\n" . $dsturl . "\n";
-exit;
+session_redirect('/pm/task.php?func=detailtask&project_task_id='.$tinfo['project_task_id'].'&group_id='.$tinfo['group_id'].'&group_project_id='.$tinfo['group_project_id']);

Modified: trunk/src/www/pm/t_lookup.php
===================================================================
--- trunk/src/www/pm/t_lookup.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/t_lookup.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -32,17 +32,13 @@
 if (!$tid)
 	$tid = util_path_info_last_numeric_component();
 if (!$tid) {
-	header("HTTP/1.0 404 Not Found");
-	echo "You forgot to pass the tid.\n";
-	exit;
+    exit_missing_param('',array(_('Task ID')),'pm');
 }
 
 $tinfo = getGroupProjectIdGroupId($tid);
 
 if (!$tinfo) {
-	header("HTTP/1.0 404 Not Found");
-	echo "There is no task with id ".$tid."!\n";
-	exit;
+    exit_error(_('No Task with ID: ').$tid,'pm');
 }
 
 $asuser = getStringFromRequest('asuser');

Modified: trunk/src/www/pm/task.php
===================================================================
--- trunk/src/www/pm/task.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/task.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -80,14 +80,14 @@
 if (!$g || !is_object($g)) {
 	exit_no_group();
 } elseif ($g->isError()) {
-	exit_error(_('Error'),$g->getErrorMessage());
+	exit_error($g->getErrorMessage(),'pm');
 }
 
 $pg = new ProjectGroupHTML($g,$group_project_id);
 if (!$pg || !is_object($pg)) {
-	exit_error(_('Error'),_('Could Not Get Factory'),'pm');
+	exit_error(_('Could Not Get Factory'),'pm');
 } elseif ($pg->isError()) {
-	exit_error(_('Error'),$pg->getErrorMessage(),'pm');
+	exit_error($pg->getErrorMessage(),'pm');
 }
 
 /*
@@ -103,9 +103,9 @@
 
 		$pt=new ProjectTaskHTML($pg);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		include $gfwww.'pm/add_task.php';
 		break;
@@ -121,15 +121,15 @@
 		
 		$pt = new ProjectTask($pg);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get Empty ProjectTask'),'pm');
+			exit_error(_('Could Not Get Empty ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		
 		$saved_hours = $hours;
 		$hours = (float) $hours;
 		if ( $saved_hours !== (string)$hours ) {
-			exit_error(_('Error'), _('Illegal format for hours: must be an integer or a float number.'),'pm');
+			exit_error(_('Illegal format for hours: must be an integer or a float number.'),'pm');
 		}
 		
 		if (!$dependent_on)
@@ -141,11 +141,11 @@
 		
 		
 		if (!$pt->create($summary,$details,$priority,$hours,$start_date,$end_date,$category_id,$percent_complete,$assigned_to,$pt->convertDependentOn($dependent_on),$duration,$parent_id)) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		} else {
 			if (count($add_artifact_id) > 0) {
 				if (!$pt->addRelatedArtifacts($add_artifact_id)) {
-					exit_error(_('Error'),'addRelatedArtifacts():: '.$pt->getErrorMessage());
+					exit_error('addRelatedArtifacts():: '.$pt->getErrorMessage());
 				}
 			}
 			$feedback=_('Task Created Successfully');
@@ -168,15 +168,15 @@
 		
 		$pt = new ProjectTask($pg,$project_task_id);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		
 		$saved_hours = $hours;
 		$hours = (float) $hours;
 		if ( $saved_hours !== (string)$hours ) {
-			exit_error(_('Error'), _('Illegal format for hours: must be an integer or a float number.'),'pm');
+			exit_error(_('Illegal format for hours: must be an integer or a float number.'),'pm');
 		}
 		
 		if (!$dependent_on)	{
@@ -186,11 +186,11 @@
 		$end_date=mktime($end_hour,$end_minute,0,$end_month,$end_day,$end_year);
 		if (!$pt->update($summary,$details,$priority,$hours,$start_date,$end_date,
 				 $status_id,$category_id,$percent_complete,$assigned_to,$pt->convertDependentOn($dependent_on),$new_group_project_id,$duration,$parent_id)) {
-			exit_error(_('Error'),'update():: '.$pt->getErrorMessage());
+			exit_error('update():: '.$pt->getErrorMessage());
 		} else {
 			if (count($rem_artifact_id) > 0) {
 				if (!$pt->removeRelatedArtifacts($rem_artifact_id)) {
-					exit_error(_('Error'),'removeRelatedArtifacts():: '.$pt->getErrorMessage(),'pm');
+					exit_error('removeRelatedArtifacts():: '.$pt->getErrorMessage(),'pm');
 				}
 			}
 			$feedback=_('Task Updated Successfully');
@@ -240,9 +240,9 @@
 		for ($i=0; $i < $count; $i++) {
 			$pt=new ProjectTask($pg,$project_task_id_list[$i]);
 			if (!$pt || !is_object($pt)) {
-				$feedback .= ' ID: '.$project_task_id_list[$i].'::ProjectTask Could Not Be Created';
+				$error_msg .= ' ID: '.$project_task_id_list[$i].'::ProjectTask Could Not Be Created';
 			} else if ($pt->isError()) {
-				$feedback .= ' ID: '.$project_task_id_list[$i].'::'.$pt->getErrorMessage();
+				$error_msg .= ' ID: '.$project_task_id_list[$i].'::'.$pt->getErrorMessage();
 			} else {
 
 				$mass_summary=addslashes(util_unconvert_htmlspecialchars($pt->getSummary()));
@@ -303,12 +303,12 @@
 		
 		$pt = new ProjectTask($pg,$project_task_id);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		if (!$pt->addRelatedArtifacts($add_artifact_id)) {
-			exit_error(_('Error'),'addRelatedArtifacts():: '.$pt->getErrorMessage(),'pm');
+			exit_error('addRelatedArtifacts():: '.$pt->getErrorMessage(),'pm');
 		} else {
 			$feedback=_('Successfully Added Tracker Relationship');
 			include $gfwww.'pm/browse_task.php';
@@ -325,9 +325,9 @@
 
 		$pt= new ProjectTask($pg,$project_task_id);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		include $gfwww.'pm/deletetask.php';
 		break;
@@ -342,9 +342,9 @@
 
 		$pt= new ProjectTask($pg, $project_task_id);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'), $pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		if (!getStringFromRequest('confirm_delete')) {
 			$warning_msg.= _('Confirmation failed. Task not deleted');
@@ -382,9 +382,9 @@
 	case 'detailtask' : {
 		$pt=new ProjectTaskHTML($pg,$project_task_id);
 		if (!$pt || !is_object($pt)) {
-			exit_error(_('Error'),_('Could Not Get ProjectTask'),'pm');
+			exit_error(_('Could Not Get ProjectTask'),'pm');
 		} elseif ($pt->isError()) {
-			exit_error(_('Error'),$pt->getErrorMessage(),'pm');
+			exit_error($pt->getErrorMessage(),'pm');
 		}
 		if (forge_check_perm ('pm', $pg->getID(), 'manager')) {
 			include $gfwww.'pm/mod_task.php';

Modified: trunk/src/www/pm/uploadcsv.php
===================================================================
--- trunk/src/www/pm/uploadcsv.php	2010-09-22 13:06:20 UTC (rev 10626)
+++ trunk/src/www/pm/uploadcsv.php	2010-09-22 13:19:18 UTC (rev 10627)
@@ -1,5 +1,28 @@
 <?php
+/**
+ * Project Management Facility
+ *
+ * Copyright 2010, 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 page contains a form with a file-upload button
 //	so a user can choose a file to upload a .csv file and store it in task mgr




More information about the Fusionforge-commits mailing list