[Fusionforge-commits] r10594 - in trunk/src/www: mail mail/admin my register themes/gforge/css tracker tracker/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Tue Sep 21 15:54:05 CEST 2010


Author: nerville
Date: 2010-09-21 15:54:05 +0200 (Tue, 21 Sep 2010)
New Revision: 10594

Modified:
   trunk/src/www/mail/admin/index.php
   trunk/src/www/mail/index.php
   trunk/src/www/mail/mail_utils.php
   trunk/src/www/my/bookmark_add.php
   trunk/src/www/my/bookmark_delete.php
   trunk/src/www/my/bookmark_edit.php
   trunk/src/www/my/dashboard.php
   trunk/src/www/my/diary.php
   trunk/src/www/my/index.php
   trunk/src/www/my/rmproject.php
   trunk/src/www/register/index.php
   trunk/src/www/themes/gforge/css/theme.css
   trunk/src/www/tracker/add.php
   trunk/src/www/tracker/browse.php
   trunk/src/www/tracker/detail.php
   trunk/src/www/tracker/include/ArtifactHtml.class.php
   trunk/src/www/tracker/index.php
   trunk/src/www/tracker/tracker.php
Log:
exit functions migration

Modified: trunk/src/www/mail/admin/index.php
===================================================================
--- trunk/src/www/mail/admin/index.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/mail/admin/index.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,13 +1,30 @@
 <?php
-
 /**
- * GForge Mailing Lists Facility
+ * Mailing Lists Facility
  *
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2003-2004 (c) Guillaume Smet - Open Wide
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
+ * Copyright 2010 (c) Franck Villaume - Capgemini
+ * 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 $gfwww.'mail/admin/../mail_utils.php';
@@ -17,7 +34,7 @@
 
 $group_id = getIntFromRequest('group_id');
 
-$feedback = '';
+$feedback = getStringFromRequest('feedback');
 
 if ($group_id) {
 	$Group =& group_get_object($group_id);
@@ -40,14 +57,14 @@
 				$mailingList = new MailingList($Group);
 			
 				if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-					exit_form_double_submit();
+					exit_form_double_submit('mail');
 				}
 				if(!$mailingList || !is_object($mailingList)) {
 					form_release_key(getStringFromRequest("form_key"));
-					exit_error(_('Error'), _('Error getting the list'));
+					exit_error(_('Error getting the list'),'mail');
 				} elseif($mailingList->isError()) {
 					form_release_key(getStringFromRequest("form_key"));
-					exit_error(_('Error'), $mailingList->getErrorMessage());
+					exit_error($mailingList->getErrorMessage(),'mail');
 				}
 			
 				if(!$mailingList->create(
@@ -56,7 +73,7 @@
 					getIntFromPost('is_public', 1)
 				)) {
 					form_release_key(getStringFromRequest("form_key"));
-					exit_error(_('Error'), $mailingList->getErrorMessage());
+					exit_error($mailingList->getErrorMessage(),'mail');
 				} else {
 					$feedback .= _('List Added');
 				}
@@ -71,16 +88,16 @@
 			$mailingList = new MailingList($Group, getIntFromGet('group_list_id'));
 			
 			if(!$mailingList || !is_object($mailingList)) {
-				exit_error(_('Error'), _('Error getting the list'));
+				exit_error(_('Error getting the list'),'mail');
 			} elseif($mailingList->isError()) {
-				exit_error(_('Error'), $mailingList->getErrorMessage());
+				exit_error($mailingList->getErrorMessage(),'mail');
 			}
 			
 			if(!$mailingList->update(
 				unInputSpecialChars(getStringFromPost('description')),
 				getIntFromPost('is_public', MAIL__MAILING_LIST_IS_PUBLIC)
 			)) {
-				exit_error(_('Error'), $mailingList->getErrorMessage());
+				exit_error($mailingList->getErrorMessage(),'mail');
 			} else {
 				$feedback .= _('List updated');
 			}
@@ -94,9 +111,9 @@
 		$mailingList = new MailingList($Group, getIntFromGet('group_list_id'));
 		
 		if(!$mailingList || !is_object($mailingList)) {
-			exit_error(_('Error'), _('Error getting the list'));
+			exit_error(_('Error getting the list'),'mail');
 		} elseif($mailingList->isError()) {
-			exit_error(_('Error'), $mailingList->getErrorMessage());
+			exit_error($mailingList->getErrorMessage(),'mail');
 		}
 		
 		if($mailingList->getStatus() == MAIL__MAILING_LIST_IS_CONFIGURED) {
@@ -105,7 +122,7 @@
 				   $mailingList->isPublic(),
 				   MAIL__MAILING_LIST_PW_RESET_REQUESTED
 				   )) {
-				exit_error(_('Error'), $mailingList->getErrorMessage());
+				exit_error($mailingList->getErrorMessage(),'mail');
 			} else {
 				$feedback .= _('Password reset requested');
 			}
@@ -123,14 +140,14 @@
 		
 		$mlFactory = new MailingListFactory($Group);
 		if (!$mlFactory || !is_object($mlFactory) || $mlFactory->isError()) {
-			exit_error(_('Error'), $mlFactory->getErrorMessage());
+			exit_error($mlFactory->getErrorMessage(),'mail');
 		}
 		
 		$mlArray =& $mlFactory->getMailingLists();
 
 		if ($mlFactory->isError()) {
 			echo '<h1>'._('Error').' '._('Unable to get the lists') .'</h1>';
-			echo $mlFactory->getErrorMessage();
+			echo '<div class="error">'.$mlFactory->getErrorMessage().'</div>';
 			mail_footer(array());
 			exit;
 		}
@@ -185,9 +202,9 @@
 		$mailingList = new MailingList($Group, getIntFromGet('group_list_id'));
 			
 		if(!$mailingList || !is_object($mailingList)) {
-			exit_error(_('Error'), _('Error getting the list'));
+			exit_error(_('Error getting the list'),'mail');
 		} elseif($mailingList->isError()) {
-			exit_error(_('Error'), $mailingList->getErrorMessage());
+			exit_error($mailingList->getErrorMessage(),'mail');
 		}
    	
 		mail_header(array(
@@ -216,7 +233,7 @@
 //
 		$mlFactory = new MailingListFactory($Group);
 		if (!$mlFactory || !is_object($mlFactory) || $mlFactory->isError()) {
-			exit_error(_('Error'), $mlFactory->getErrorMessage());
+			exit_error($mlFactory->getErrorMessage(),'mail');
 		}
 
 		mail_header(array(
@@ -226,8 +243,8 @@
 		$mlArray =& $mlFactory->getMailingLists();
 
 		if ($mlFactory->isError()) {
-			echo '<p>'._('Error').' '.sprintf(_('Unable to get the list %s'), $Group->getPublicName()) .'</p>';
-			echo $mlFactory->getErrorMessage();
+			echo '<h1>'._('Error').' '.sprintf(_('Unable to get the list %s'), $Group->getPublicName()) .'</h1>';
+			echo '<div class="error">'.$mlFactory->getErrorMessage().'</div>';
 			mail_footer(array());
 			exit;
 		}

Modified: trunk/src/www/mail/index.php
===================================================================
--- trunk/src/www/mail/index.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/mail/index.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -36,9 +36,9 @@
 if ($group_id) {
 	$Group =& group_get_object($group_id);
 	if (!$Group || !is_object($Group)) {
-		exit_error(_('Could Not Get Group'),'home');
+		exit_no_group();
 	} elseif ($Group->isError()) {
-		exit_no_group();
+		exit_error($Group->getErrorMessage(),'mail');
 	}
 	
 	$mlFactory = new MailingListFactory($Group);

Modified: trunk/src/www/mail/mail_utils.php
===================================================================
--- trunk/src/www/mail/mail_utils.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/mail/mail_utils.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,13 +1,28 @@
 <?php
 /**
- * GForge Mailing Lists Facility
+ * Mailing Lists Facility
  *
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2003 (c) Guillaume Smet
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
+ * 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
  */
 
-
 function mail_header($params) {
 	global $HTML, $group_id;
 
@@ -20,7 +35,7 @@
 
 		if ($project && is_object($project)) {
 			if (!$project->usesMail()) {
-				exit_error(_('Error'), _('This Project Has Turned Off The Mailing Lists'));
+				exit_disabled('home');
 			}
 		}
 

Modified: trunk/src/www/my/bookmark_add.php
===================================================================
--- trunk/src/www/my/bookmark_add.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/bookmark_add.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,23 +1,23 @@
 <?php
 /**
- * SourceForge User's bookmark Page
+ * User's bookmark Page
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  *
- * 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
  */
 

Modified: trunk/src/www/my/bookmark_delete.php
===================================================================
--- trunk/src/www/my/bookmark_delete.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/bookmark_delete.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,23 +1,23 @@
 <?php
 /**
- * SourceForge User's bookmark delete Page
+ * User's bookmark delete Page
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  *
- * 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
  */
 

Modified: trunk/src/www/my/bookmark_edit.php
===================================================================
--- trunk/src/www/my/bookmark_edit.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/bookmark_edit.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,23 +1,23 @@
 <?php
 /**
- * SourceForge User's bookmark editing Page
+ * User's bookmark editing Page
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  *
- * 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
  */
 
@@ -28,7 +28,7 @@
 
 $bookmark_id = getIntFromRequest('bookmark_id');
 if (!$bookmark_id) {
-	exit_missing_param();
+	exit_missing_param('',array(_('Bookmark ID')),'my');
 }
 
 if (getStringFromRequest('submit')) {
@@ -38,7 +38,7 @@
 	if ($bookmark_url && $bookmark_title && bookmark_edit($bookmark_id, $bookmark_url, $bookmark_title)) {
 		$feedback = _('Bookmark Updated');
 	} else {
-		$feedback = _('Failed to update bookmark.');
+		$error_msg = _('Failed to update bookmark.');
 	}
 }
 

Modified: trunk/src/www/my/dashboard.php
===================================================================
--- trunk/src/www/my/dashboard.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/dashboard.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -36,7 +36,7 @@
 if (!session_loggedin()) {
 	exit_not_logged_in();
 } else {
-	echo site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
+	site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
 	?>
 
 	<table width="100%" border="0">
@@ -112,7 +112,7 @@
 
                         $atf = new ArtifactTypeFactory($group);
                         if (!$group || !is_object($group) || $group->isError()) {
-                                exit_error('Error','Could Not Get ArtifactTypeFactory');
+                                exit_error(_('Could Not Get ArtifactTypeFactory'),'my');
                         }
 
                         $at_arr =& $atf->getArtifactTypes();

Modified: trunk/src/www/my/diary.php
===================================================================
--- trunk/src/www/my/diary.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/diary.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,23 +1,23 @@
 <?php
 /**
- * GForge User's Diary Page
+ * User's Diary Page
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  *
- * 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
  */
 
@@ -27,7 +27,7 @@
 require_once $gfwww.'include/vote_function.php';
 
 if (!$sys_use_diary) {
-	exit_error (_('The diary feature is not enabled.')) ;
+	exit_disabled('my');
 }
 
 if (!session_loggedin()) {
@@ -41,7 +41,7 @@
 
 	if (getStringFromRequest('submit')) {
 		if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-			exit_form_double_submit();
+			exit_form_double_submit('my');
 		}
 
 		$summary = getStringFromRequest('summary');
@@ -134,8 +134,7 @@
 				}
 			} else {
 				form_release_key(getStringFromRequest("form_key"));
-				$feedback .= _('Error Adding Item');
-				echo db_error();
+				$error_msg .= _('Error Adding Item: '). db_error();
 			}
 		}
 
@@ -168,7 +167,7 @@
 		$_diary_id = '';
 	}
 
-	echo site_user_header(array('title'=>_('My Diary And Notes')));
+    site_user_header(array('title'=>_('My Diary And Notes')));
 	echo '<h1>' . _('My Diary And Notes') . '</h1>';
 
 	echo '
@@ -224,7 +223,7 @@
 
 	echo $HTML->boxBottom();
 
-	echo site_user_footer(array());
+	site_user_footer(array());
 
 }
 

Modified: trunk/src/www/my/index.php
===================================================================
--- trunk/src/www/my/index.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/index.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -37,7 +37,7 @@
 	exit_not_logged_in();
 
 } else {
-	echo site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
+	site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
 	?>
 
 <script type="text/javascript" src="<?php echo util_make_uri ('/tabber/tabber.js'); ?>"></script>
@@ -441,7 +441,7 @@
 </div>
 <?php
 }
-	echo site_user_footer(array());
+	site_user_footer(array());
 
 }
 

Modified: trunk/src/www/my/rmproject.php
===================================================================
--- trunk/src/www/my/rmproject.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/my/rmproject.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,25 +1,25 @@
 <?php
 /**
- * SourceForge User's Self-removal Page
+ * User's Self-removal Page
  *
  * Confirmation page for users' removing themselves from project.
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  *
- * 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
  */
 
@@ -37,7 +37,7 @@
 if (!$group || !is_object($group)) {
     exit_no_group();
 } elseif ($group->isError()) {
-	exit_error('Error',$group->getErrorMessage());
+	exit_error($group->getErrorMessage(),'my');
 }
 
 if (getStringFromRequest('confirm')) {
@@ -45,7 +45,7 @@
 	$user_id = user_getid();
 
 	if (!$group->removeUser($user_id)) {
-		exit_error(_('Error'), $group->getErrorMessage());
+		exit_error($group->getErrorMessage(),'my');
 	} else {                    
 		session_redirect("/my/");
 	}
@@ -58,14 +58,12 @@
 
 if (forge_check_perm ('project_admin', $group_id)) {
 	exit_error(
-		_('Operation Not Permitted'),
 		sprintf (_('You cannot remove yourself from this project, because you are admin of it. You should ask other admin to reset your admin privilege first. If you are the only admin of the project, please consider posting availability notice to <a href="%s">Help Wanted Board</a> and be ready to pass admin privilege to interested party.'),
 			 util_make_url ("/people/")
-			)
-		);
+			) ,'my');
 }
 
-echo site_user_header(array('title'=>_('Quitting Project')));
+site_user_header(array('title'=>_('Quitting Project')));
 
 echo '
 <h3>'._('Quitting Project').' </h3>
@@ -92,6 +90,6 @@
 </table>
 ';
 
-echo site_user_footer(array());
+site_user_footer(array());
 
 ?>

Modified: trunk/src/www/register/index.php
===================================================================
--- trunk/src/www/register/index.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/register/index.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -19,6 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-session_redirect('/register/projectinfo.php');
+header("Location: /register/projectinfo.php");
 
 ?>

Modified: trunk/src/www/themes/gforge/css/theme.css
===================================================================
--- trunk/src/www/themes/gforge/css/theme.css	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/themes/gforge/css/theme.css	2010-09-21 13:54:05 UTC (rev 10594)
@@ -323,3 +323,13 @@
     -webkit-border-radius: 3px;
     -moz-border-radius: 3px;
 }
+
+/* artifact
+----------- */
+.artifactmessage {
+    width: 100%;
+    background: white;
+    border: 0px;
+    height: 100px;
+
+}

Modified: trunk/src/www/tracker/add.php
===================================================================
--- trunk/src/www/tracker/add.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/add.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,24 +1,24 @@
 <?php
 /**
- * GForge Generic Tracker facility
+ * Generic Tracker facility
  *
  * Copyright 1999-2001 (c) VA Linux Systems; 2005 GForge, LLC
- * http://gforge.org/
+ * 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
  */
 

Modified: trunk/src/www/tracker/browse.php
===================================================================
--- trunk/src/www/tracker/browse.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/browse.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -667,7 +667,7 @@
 		//
 		//	build custom fields
 		//
-	$ef =& $ath->getExtraFields(ARTIFACT_EXTRAFIELD_FILTER_INT);
+	$ef = $ath->getExtraFields(ARTIFACT_EXTRAFIELD_FILTER_INT);
 	$keys=array_keys($ef);
 
 	$sel=array();

Modified: trunk/src/www/tracker/detail.php
===================================================================
--- trunk/src/www/tracker/detail.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/detail.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,11 +1,25 @@
 <?php
 /**
- * SourceForge Generic Tracker facility
+ * Tracker Detail
  *
- * SourceForge: Breaking Down the Barriers to Open Source Development
  * Copyright 1999-2001 (c) VA Linux Systems
- * http://sourceforge.net
+ * 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
  */
 
 $ath->header(array 

Modified: trunk/src/www/tracker/include/ArtifactHtml.class.php
===================================================================
--- trunk/src/www/tracker/include/ArtifactHtml.class.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/include/ArtifactHtml.class.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -83,7 +83,7 @@
 				$text = db_result($result, $i, 'body');
 				$text = util_gen_cross_ref($text, $this->ArtifactType->Group->getID());
 				//$text = util_line_wrap( $text, 120,"\n");
-				$text = preg_replace('/\r?\n/', '<br />', $text);
+				$text = preg_replace('/\n?\r/', '<br />', $text);
 				echo "<br /><br />".$text.'</td></tr>';
 			}
 

Modified: trunk/src/www/tracker/index.php
===================================================================
--- trunk/src/www/tracker/index.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/index.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,25 +1,25 @@
 <?php
 /**
- * GForge Front Page
+ * Tracker Front Page
  *
- * Portions Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge 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
  */
 
@@ -37,7 +37,7 @@
 require_once $gfcommon.'tracker/ArtifactTypeFactory.class.php';
 
 if (!forge_get_config('use_tracker')) {
-	exit_disabled();
+	exit_disabled('home');
 }
 
 $aid = getIntFromRequest('aid');
@@ -49,7 +49,7 @@
 if ($aid && (!$group_id && !$atid)) {
 	$a =& artifact_get_object($aid);
 	if (!$a || !is_object($a) || $a->isError()) {
-		exit_error('Error','Could Not Get Artifact Object');
+		exit_error(_('Could Not Get Artifact Object'),'tracker');
 	} else {
 		$group_id=$a->ArtifactType->Group->getID();
 		$atid=$a->ArtifactType->getID();
@@ -63,9 +63,9 @@
 }
 if ($group->isError()) {
         if($group->isPermissionDeniedError()) {
-                exit_permission_denied($group->getErrorMessage());
+                exit_permission_denied($group->getErrorMessage(),'tracker');
         } else {
-                exit_error(_('Error'), $group->getErrorMessage());
+                exit_error($group->getErrorMessage(),'tracker');
         }
 }
 

Modified: trunk/src/www/tracker/tracker.php
===================================================================
--- trunk/src/www/tracker/tracker.php	2010-09-21 13:51:29 UTC (rev 10593)
+++ trunk/src/www/tracker/tracker.php	2010-09-21 13:54:05 UTC (rev 10594)
@@ -1,4 +1,27 @@
 <?php
+/**
+ * Tracker Front Page
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2002-2004 (c) GForge 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
+ */
 
 
 //
@@ -10,9 +33,9 @@
 }
 if ($group->isError()) {
 	if($group->isPermissionDeniedError()) {
-		exit_permission_denied($group->getErrorMessage());
+		exit_permission_denied($group->getErrorMessage(),'tracker');
 	} else {
-		exit_error(_('Error'), $group->getErrorMessage());
+		exit_error($group->getErrorMessage(),'tracker');
 	}
 }
 //
@@ -21,20 +44,20 @@
 $ath = new ArtifactTypeHtml($group,$atid);
 
 if (!$ath || !is_object($ath)) {
-	exit_error('Error','ArtifactType could not be created');
+	exit_error(_('ArtifactType could not be created'),'tracker');
 }
 if ($ath->isError()) {
 	if($ath->isPermissionDeniedError()) {
-		exit_permission_denied($group->getErrorMessage());
+		exit_permission_denied($group->getErrorMessage(),'tracker');
 	} else {
-		exit_error(_('Error'), $ath->getErrorMessage());
+		exit_error($ath->getErrorMessage(),'tracker');
 	}
 }
 switch (getStringFromRequest('func')) {
 
 	case 'add' : {
 		if (!$ath->allowsAnon() && !session_loggedin()) {
-			exit_permission_denied();
+			exit_permission_denied('tracker');
 		} else {
 			include $gfwww.'tracker/add.php';
 		}
@@ -42,7 +65,7 @@
 	}
 	case 'postadd' : {
 		if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-			exit_form_double_submit();
+			exit_form_double_submit('tracker');
 		}
 
 		$user_email = getStringFromRequest('user_email');
@@ -62,16 +85,16 @@
 		$feedback = '';
 		if (!$ah || !is_object($ah)) {
 			form_release_key(getStringFromRequest('form_key'));
-			exit_error('ERROR','Artifact Could Not Be Created');
+			exit_error(_('Artifact Could Not Be Created'),'tracker');
 		} else if (!$ath->allowsAnon() && !session_loggedin()) {
-			exit_error('ERROR',_('Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login.'));
+			exit_error(_('Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login.'),'tracker');
 		} else {
 			if (empty($user_email)) {
 				$user_email=false;
 			} else {
 				if (!validate_email($user_email)) {
 					form_release_key(getStringFromRequest('form_key'));
-					exit_error('ERROR', _('Invalid Email Address') . htmlspecialchars($user_email));
+					exit_error(_('Invalid Email Address') . htmlspecialchars($user_email),'tracker');
 				}
 			}
 			if ($user_email) {
@@ -80,7 +103,7 @@
 			}
 			if (!$ah->create($summary,$details,$assigned_to,$priority,$extra_fields)) {
 				form_release_key(getStringFromRequest('form_key'));
-				exit_error('ERROR',$ah->getErrorMessage());
+				exit_error($ah->getErrorMessage(),'tracker');
 			} else {
 				//
 				//	  Attach files to this Artifact.
@@ -110,21 +133,21 @@
 
 					$afh=new ArtifactFileHtml($ah);
 					if (!$afh || !is_object($afh)) {
-						$feedback .= 'Could Not Create File Object';
+						$error_msg .= _('Could Not Create File Object');
 					} elseif ($afh->isError()) {
-						$feedback .= $afh->getErrorMessage();
+						$error_msg .= $afh->getErrorMessage();
 					} else {
 						if (!util_check_fileupload($tmp_name)) {
 							form_release_key(getStringFromRequest('form_key'));
 							//delete the artifact
 							$ah->delete(true);
-							exit_error("Error","Invalid filename");
+							exit_error(_('Invalid filename'),'tracker');
 						}
 						if (!$afh->upload($tmp_name,$file_name,$type,' ')) {
 							form_release_key(getStringFromRequest('form_key'));
 							//delete the artifact
 							$ah->delete(true);
-							exit_error(' Could Not Attach File to Item: '.$afh->getErrorMessage());
+							exit_error(_('Could Not Attach File to Item: '.$afh->getErrorMessage()),'tracker');
 						}
 					}
 				}
@@ -137,7 +160,7 @@
 	}
 	case 'massupdate' : {
 		if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-			exit_form_double_submit();
+			exit_form_double_submit('tracker');
 		}
 
 		$artifact_id_list = getArrayFromRequest('artifact_id_list');
@@ -209,7 +232,7 @@
 				}
 
 				if ($was_error) {
-					$feedback .= ' ID: '.$artifact_id_list[$i].'::'.$ah->getErrorMessage();
+					$error_msg .= ' ID: '.$artifact_id_list[$i].'::'.$ah->getErrorMessage();
 				}else {
 					$was_error=false;
 				}
@@ -246,16 +269,16 @@
 			permission to change.
 		*/
 		if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-			exit_form_double_submit();
+			exit_form_double_submit('tracker');
 		}
 
 		$ah=new ArtifactHtml($ath,$artifact_id);
 		if (!$ah || !is_object($ah)) {
-			exit_error('ERROR', _('Artifact Could Not Be Created'));
+			exit_error(_('Artifact Could Not Be Created'),'tracker');
 		} else if ($ah->isError()) {
-			exit_error('ERROR',$ah->getErrorMessage());
+			exit_error($ah->getErrorMessage(),'tracker');
 		} else if (!$ath->allowsAnon() && !session_loggedin()) {
-			exit_error('ERROR',_('Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login.'));
+			exit_error(_('Artifact: This ArtifactType Does Not Allow Anonymous Submissions. Please Login.'),'tracker');
 		} else {
 
 			/*
@@ -285,7 +308,7 @@
 					} else {
 						if ( (strlen($details)>0) ) { //if there was no message, then it's not an error but addMessage returns false and sets missing params error
 							//some kind of error in creation
-							exit_error($ah->getErrorMessage(),$feedback);
+							exit_error($ah->getErrorMessage(),'tracker');
 						} else {
 							// we have to unset the error if the user added a file ( add a file and no comment)
 							if ( (getStringFromRequest('add_file')) ) {
@@ -303,7 +326,7 @@
 						$feedback=_('Comment added');
 					} else {
 						//some kind of error in creation
-						exit_error('ERROR',$ah->getErrorMessage());
+						exit_error($ah->getErrorMessage(),'tracker');
 					}
 				}
 			}
@@ -343,16 +366,16 @@
 
 					$afh=new ArtifactFileHtml($ah);
 					if (!$afh || !is_object($afh)) {
-						$feedback .= 'Could Not Create File Object';
+						$error_msg .= _('Could Not Create File Object');
 					} elseif ($afh->isError()) {
-						$feedback .= $afh->getErrorMessage();
+						$error_msg .= $afh->getErrorMessage();
 					} else {
 						if (!util_check_fileupload($tmp_name)) {
 							form_release_key(getStringFromRequest('form_key'));
-							exit_error("Error","Invalid filename");
+							exit_error(_('Invalid filename'),'tracker');
 						}
 						if (!$afh->upload($tmp_name,$file_name,$type,' ')) {
-							$feedback .= ' <br />'._('File Upload: Error').':'.$afh->getErrorMessage();
+							$error_msg .= ' <br />'._('File Upload: Error').':'.$afh->getErrorMessage();
 							$was_error=true;
 						} else {
 							$feedback .= ' <br />'._('File Upload: Successful');
@@ -372,12 +395,12 @@
 						for ($i=0; $i<$count; $i++) {
 							$afh=new ArtifactFileHtml($ah,$delete_file[$i]);
 							if (!$afh || !is_object($afh)) {
-								$feedback .= 'Could Not Create File Object::'.$delete_file[$i];
+								$error_msg .= _('Could Not Create File Object::').$delete_file[$i];
 							} elseif ($afh->isError()) {
-								$feedback .= $afh->getErrorMessage().'::'.$delete_file[$i];
+								$error_msg .= $afh->getErrorMessage().'::'.$delete_file[$i];
 							} else {
 								if (!$afh->delete()) {
-									$feedback .= ' <br />'._('File Delete:').': '.$afh->getErrorMessage();
+									$error_msg .= ' <br />'._('File Delete:').': '.$afh->getErrorMessage();
 									$was_error=true;
 								} else {
 									$feedback .= ' <br />'._('File Delete: Successful');
@@ -413,9 +436,9 @@
 			if ($artifact_id) {
 				$ah=new ArtifactHtml($ath,$artifact_id);
 				if (!$ah || !is_object($ah)) {
-					exit_error('ERROR','Artifact Could Not Be Created');
+					exit_error(_('Artifact Could Not Be Created'),'tracker');
 				} else if ($ah->isError()) {
-					exit_error('ERROR',$ah->getErrorMessage());
+					exit_error($ah->getErrorMessage(),'tracker');
 				} else {
 					if ($start && $ah->isMonitoring())
 						$feedback = _('Monitoring Started');
@@ -423,16 +446,16 @@
 						$feedback = _('Monitoring Deactivated');
 					else {
 						$ah->setMonitor();
-						$feedback=$ah->getErrorMessage();
+						$error_msg = $ah->getErrorMessage();
 					}
 					include $gfwww.'tracker/browse.php';
 				}
 			} else {
 				$at=new ArtifactType($group,$atid);
 				if (!$at || !is_object($at)) {
-					exit_error('ERROR','Artifact Could Not Be Created');
+					exit_error(_('Artifact Could Not Be Created'),'tracker');
 				} else if ($at->isError()) {
-					exit_error('ERROR',$at->getErrorMessage());
+					exit_error($at->getErrorMessage(),'tracker');
 				} else {
 					if ($start && $at->isMonitoring())
 						$feedback = _('Monitoring Started');
@@ -459,9 +482,9 @@
 			$aid = getIntFromRequest('aid');
 			$ah= new ArtifactHtml($ath,$aid);
 			if (!$ah || !is_object($ah)) {
-				exit_error('ERROR','Artifact Could Not Be Created');
+				exit_error(_('Artifact Could Not Be Created'),'tracker');
 			} elseif ($ah->isError()) {
-				exit_error('ERROR',$ah->getErrorMessage());
+				exit_error($ah->getErrorMessage(),'tracker');
 			}
 			include $gfwww.'tracker/deleteartifact.php';
 			break;
@@ -473,23 +496,23 @@
 
 		case 'postdeleteartifact' : {
 			if (!form_key_is_valid(getStringFromRequest('form_key'))) {
-				exit_form_double_submit();
+				exit_form_double_submit('tracker');
 			}
 			session_require_perm ('tracker', $ath->getID(), 'manager') ;
 
 			$aid = getStringFromRequest('aid');
 			$ah= new ArtifactHtml($ath,$aid);
 			if (!$ah || !is_object($ah)) {
-				exit_error('ERROR','Artifact Could Not Be Created');
+				exit_error(_('Artifact Could Not Be Created'),'tracker');
 			} elseif ($ah->isError()) {
-				exit_error('ERROR',$ah->getErrorMessage());
+				exit_error($ah->getErrorMessage(),'tracker');
 			}
 			if (!getStringFromRequest('confirm_delete')) {
-				$feedback .= _('Confirmation failed. Artifact not deleted');
+				$warning_msg .= _('Confirmation failed. Artifact not deleted');
 			}
 			else {
 				if (!$ah->delete(true)) {
-					$feedback .= _('Artifact Delete Failed') . ': '.$ah->getErrorMessage();
+					$error_msg .= _('Artifact Delete Failed') . ': '.$ah->getErrorMessage();
 				} else {
 					$feedback .= _('Artifact Deleted Successfully');
 				}
@@ -517,7 +540,7 @@
 		}
 		case 'download' : {
 			$aid = getIntFromRequest('aid');
-			Header("Redirect: ".util_make_url ("/tracker/download.php?group_id=$group_id&atid=$atid&aid=$aid&file_id=$file_id"));
+			session_redirect('/tracker/download.php?group_id='.$group_id.'&atid='.$atid.'&aid='.$aid.'&file_id='.$file_id);
 			break;
 		}
 		case 'detail' : {
@@ -529,9 +552,9 @@
 			//
 			$ah=new ArtifactHtml($ath,$aid);
 			if (!$ah || !is_object($ah)) {
-				exit_error('ERROR','Artifact Could Not Be Created');
+				exit_error(_('Artifact Could Not Be Created'),'tracker');
 			} else if ($ah->isError()) {
-				exit_error('ERROR',$ah->getErrorMessage());
+				exit_error($ah->getErrorMessage(),'tracker');
 			} else {
 				if (forge_check_perm ('tracker', $ath->getID(), 'manager')) {
 					include $gfwww.'tracker/mod.php';
@@ -549,9 +572,9 @@
 		}
 	}
 
-	// Local Variables:
-	// mode: php
-	// c-file-style: "bsd"
-	// End:
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
 
-	?>
+?>




More information about the Fusionforge-commits mailing list