[Fusionforge-commits] r10734 - in trunk/src: common/tracker www/news www/news/admin www/top www/tracker www/tracker/admin
Franck VILLAUME
nerville at libremir.placard.fr.eu.org
Mon Sep 27 17:43:12 CEST 2010
Author: nerville
Date: 2010-09-27 17:43:12 +0200 (Mon, 27 Sep 2010)
New Revision: 10734
Modified:
trunk/src/common/tracker/ArtifactQuery.class.php
trunk/src/www/news/admin/index.php
trunk/src/www/news/news_utils.php
trunk/src/www/top/index.php
trunk/src/www/top/mostactive.php
trunk/src/www/top/toplist.php
trunk/src/www/top/topusers.php
trunk/src/www/tracker/add.php
trunk/src/www/tracker/admin/index.php
trunk/src/www/tracker/ind.php
trunk/src/www/tracker/index.php
trunk/src/www/tracker/query.php
trunk/src/www/tracker/taskmgr.php
Log:
exit functions migration + various fix
Modified: trunk/src/common/tracker/ArtifactQuery.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactQuery.class.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/common/tracker/ArtifactQuery.class.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -486,7 +486,11 @@
* @return array array of all activated options
*/
function getQueryOptions() {
- return explode('|', $this->data_array['query_options']);
+ if (isset($this->data_array['query_options'])) {
+ return explode('|', $this->data_array['query_options']);
+ } else {
+ return array();
+ }
}
/**
@@ -697,21 +701,33 @@
return $usr->setPreference('art_query'.$this->ArtifactType->getID(),$this->getID());
}
+ /**
+ * delete - delete query
+ *
+ * @return boolean success.
+ */
function delete() {
if (forge_check_perm ('tracker', $this->ArtifactType->getID(), 'manager')) {
$res = db_query_params ('DELETE FROM artifact_query WHERE artifact_query_id=$1 AND (user_id=$2 OR query_type>0)',
array ($this->getID(),
user_getid())) ;
+ if (!$res) {
+ return false;
+ }
} else {
$res = db_query_params ('DELETE FROM artifact_query WHERE artifact_query_id=$1 AND user_id=$2',
array ($this->getID(),
user_getid())) ;
+ if (!$res) {
+ return false;
+ }
}
$res = db_query_params ('DELETE FROM user_preferences WHERE preference_value=$1 AND preference_name =$2',
array ($this->getID(),
'art_query'.$this->ArtifactType->getID())) ;
unset($this->data_array);
unset($this->element_array);
+ return true;
}
/**
Modified: trunk/src/www/news/admin/index.php
===================================================================
--- trunk/src/www/news/admin/index.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/news/admin/index.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -40,7 +40,7 @@
$details = getStringFromRequest('details');
$id = getIntFromRequest('id');
-$feedback = getStringFromRequest('feedback');
+$feedback = htmlspecialchars(getStringFromRequest('feedback'));
if ($group_id && $group_id != forge_get_config('news_group') && user_ismember($group_id,'A')) {
$status = getIntFromRequest('status');
Modified: trunk/src/www/news/news_utils.php
===================================================================
--- trunk/src/www/news/news_utils.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/news/news_utils.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -27,7 +27,7 @@
global $HTML,$group_id,$news_name,$news_id;
if (!forge_get_config('use_news')) {
- exit_disabled('home');
+ exit_disabled();
}
$params['toptab']='news';
Modified: trunk/src/www/top/index.php
===================================================================
--- trunk/src/www/top/index.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/top/index.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Top-Statistics: Main page
+ * Top-Statistics: Main page
*
* Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * 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
*/
Modified: trunk/src/www/top/mostactive.php
===================================================================
--- trunk/src/www/top/mostactive.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/top/mostactive.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,26 +1,26 @@
<?php
/**
*
- * GForge Top-Statistics: Most active Users
+ * Top-Statistics: Most active Users
*
* Copyright 1999-2000 (c) The SourceForge Crew
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * 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
*/
Modified: trunk/src/www/top/toplist.php
===================================================================
--- trunk/src/www/top/toplist.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/top/toplist.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,26 +1,26 @@
<?php
/**
*
- * GForge Top-Statistics: Top List
+ * Top-Statistics: Top List
*
* Copyright 1999-2000 (c) The SourceForge Crew
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * 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
*/
Modified: trunk/src/www/top/topusers.php
===================================================================
--- trunk/src/www/top/topusers.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/top/topusers.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,25 +1,25 @@
<?php
/**
- * GForge Top-Statistics: Highest-Ranked Users
+ * Top-Statistics: Highest-Ranked Users
*
* Copyright 1999-2001 (c) VA Linux Systems
- * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * 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
*/
@@ -49,11 +49,7 @@
$offset);
if (!$res_top || db_numrows($res_top)<1) {
- exit_error(
- _('Information not available'),
- _('Information about highest ranked users is not available.').' '
- .db_error()
- );
+ exit_error( _('Information about highest ranked users is not available.').' ' .db_error(),'');
}
$HTML->header(array('title'=>_('Top users')));
Modified: trunk/src/www/tracker/add.php
===================================================================
--- trunk/src/www/tracker/add.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/add.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -43,7 +43,7 @@
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />';
if (!session_loggedin()) {
echo '
- <span class="error">'.sprintf(_('Please %1$s login %2$s'), '<a href="'.util_make_url ('/account/login.php?return_to='.urlencode($REQUEST_URI)).'">', '</a>').'</span><<br />
+ <div class="error">'.sprintf(_('Please %1$s login %2$s'), '<a href="'.util_make_url ('/account/login.php?return_to='.urlencode($REQUEST_URI)).'">', '</a>').'</div><<br />
'._('If you <strong>cannot</strong> login, then enter your email address here').':<p>
<input type="text" name="user_email" size="50" maxlength="255" /></p>
';
@@ -88,7 +88,7 @@
<?php
if (!session_loggedin()) {
echo '
- <span class="error">'.sprintf(_('Please %1$s login %2$s'), '<a href="'.util_make_url ('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))).'">', '</a>').'</span><br />
+ <div class="error">'.sprintf(_('Please %1$s login %2$s'), '<a href="'.util_make_url ('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))).'">', '</a>').'</div><br />
'._('If you <strong>cannot</strong> login, then enter your email address here').':<p>
<input type="text" name="user_email" size="30" maxlength="255" /></p>
';
Modified: trunk/src/www/tracker/admin/index.php
===================================================================
--- trunk/src/www/tracker/admin/index.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/admin/index.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -38,7 +38,7 @@
$group_id = getIntFromRequest('group_id');
$atid = getIntFromRequest('atid');
-$feedback = getStringFromRequest('feedback');
+$feedback = htmlspecialchars(getStringFromRequest('feedback'));
$add_extrafield = '';
Modified: trunk/src/www/tracker/ind.php
===================================================================
--- trunk/src/www/tracker/ind.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/ind.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,7 +1,26 @@
<?php
-//
-// get the Group object
-//
+/**
+ * Tracker Front Page
+ *
+ * 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
+ */
+
$group =& group_get_object($group_id);
if (!$group || !is_object($group) || $group->isError()) {
exit_no_group();
@@ -9,12 +28,12 @@
$atf = new ArtifactTypeFactory($group);
if (!$group || !is_object($group) || $group->isError()) {
- exit_error('Error','Could Not Get ArtifactTypeFactory');
+ exit_error(_('Could Not Get ArtifactTypeFactory'),'tracker');
}
$at_arr =& $atf->getArtifactTypes();
if ($at_arr === false) {
- exit_permission_denied();
+ exit_permission_denied('tracker');
}
//required params for site_project_header();
@@ -22,7 +41,7 @@
$params['title']=sprintf(_('Trackers for %1$s'), $group->getPublicName());
$params['toptab']='tracker';
-echo site_project_header($params);
+site_project_header($params);
if (forge_check_perm ('tracker_admin', $group_id)) {
$menu_text=array();
@@ -34,7 +53,7 @@
if (!$at_arr || count($at_arr) < 1) {
- echo '<div class="error">'._('No Accessible Trackers Found').'</div>';
+ echo '<div class="warning">'._('No Accessible Trackers Found').'</div>';
echo "<p><strong>".sprintf(_('No trackers have been set up, or you cannot view them.<p><span class="important">The Admin for this project will have to set up data types using the %1$s admin page %2$s</span>'), '<a href="'.util_make_url ('/tracker/admin/?group_id='.$group_id).'">', '</a>')."</strong>";
} else {
@@ -72,7 +91,7 @@
echo $HTML->listTableBottom();
}
-echo site_project_footer(array());
+site_project_footer(array());
// Local Variables:
// mode: php
Modified: trunk/src/www/tracker/index.php
===================================================================
--- trunk/src/www/tracker/index.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/index.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -44,6 +44,10 @@
$group_id = getIntFromRequest('group_id');
$atid = getIntFromRequest('atid');
+$feedback = htmlspecialchars(getStringFromRequest('feedback'));
+$warning_msg = htmlspecialchars(getStringFromRequest('warning_msg'));
+$error_msg = htmlspecialchars(getStringFromRequest('error_msg'));
+
//if the ATID and GID are not provided, but
//the artifact_id is, then fetch the other vars
if ($aid && (!$group_id && !$atid)) {
Modified: trunk/src/www/tracker/query.php
===================================================================
--- trunk/src/www/tracker/query.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/query.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -36,12 +36,12 @@
if ($query_action == 1) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
- exit_form_double_submit();
+ exit_form_double_submit('tracker');
}
$aq = new ArtifactQuery($ath);
if (!$aq || !is_object($aq)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
}
$query_name = trim(getStringFromRequest('query_name'));
$query_type = getStringFromRequest('query_type',0);
@@ -60,13 +60,13 @@
if (!$aq->create($query_name,$_status,$_assigned_to,$_moddaterange,$_sort_col,$_sort_ord,$extra_fields,$_opendaterange,$_closedaterange,
$_summary,$_description,$_followups,$query_type, $query_options)) {
form_release_key(getStringFromRequest('form_key'));
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
} else {
- $feedback .= 'Successfully Created';
+ $feedback .= _('Query Successfully Created');
}
$aq->makeDefault();
$query_id=$aq->getID();
- session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse');
+ session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse&feedback='.urlencode($feedback));
//
/*
// Make the displayed query the default
@@ -86,11 +86,11 @@
//
} elseif ($query_action == 3) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
- exit_form_double_submit();
+ exit_form_double_submit('tracker');
}
$aq = new ArtifactQuery($ath,$query_id);
if (!$aq || !is_object($aq)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
}
$query_name = getStringFromRequest('query_name');
$query_type = getStringFromRequest('query_type',0);
@@ -108,20 +108,20 @@
$query_options = array_keys(getArrayFromRequest('query_options'));
if (!$aq->update($query_name,$_status,$_assigned_to,$_moddaterange,$_sort_col,$_sort_ord,$extra_fields,$_opendaterange,$_closedaterange,
$_summary,$_description,$_followups,$query_type, $query_options)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
} else {
- $feedback .= 'Query Updated';
+ $feedback .= _('Query Updated');
}
$aq->makeDefault();
$query_id=$aq->getID();
- session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse');
+ session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse&feedback='.urlencode($feedback));
//
// Just load the query
//
} elseif ($query_action == 4) {
$aq = new ArtifactQuery($ath,$query_id);
if (!$aq || !is_object($aq)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
}
$aq->makeDefault();
//
@@ -129,29 +129,31 @@
//
} elseif ($query_action == 5) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
- exit_form_double_submit();
+ exit_form_double_submit('tracker');
}
$aq = new ArtifactQuery($ath,$query_id);
if (!$aq || !is_object($aq)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
}
if (!$aq->delete()) {
- $feedback .= $aq->getErrorMessage();
+ $error_msg .= $aq->getErrorMessage();
+ $ret_msg = '&error_msg='.urlencode($error_msg);
} else {
- $feedback .= 'Query Deleted';
+ $feedback .= _('Query Deleted');;
+ $ret_msg = '&feedback='.urlencode($feedback);
}
$query_id=0;
- session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse');
+ session_redirect('/tracker/?atid='.$atid.'&group_id='.$group_id.'&func=browse'.$ret_msg);
exit;
} else {
- exit_error('Error', 'Missing Build Query Action');
+ exit_error(_('Missing Build Query Action'),'tracker');
}
} else {
$user=session_get_user();
$query_id=$user->getPreference('art_query'.$ath->getID());
$aq = new ArtifactQuery($ath,$query_id);
if (!$aq || !is_object($aq)) {
- exit_error('Error',$aq->getErrorMessage());
+ exit_error($aq->getErrorMessage(),'tracker');
}
$aq->makeDefault();
}
Modified: trunk/src/www/tracker/taskmgr.php
===================================================================
--- trunk/src/www/tracker/taskmgr.php 2010-09-27 15:29:02 UTC (rev 10733)
+++ trunk/src/www/tracker/taskmgr.php 2010-09-27 15:43:12 UTC (rev 10734)
@@ -1,26 +1,27 @@
<?php
/**
- * GForge Task Mgr And Tracker Integration
+ * Task Mgr And Tracker Integration
*
* Copyright 2003 GForge, LLC
- * http://gforge.org/
+ * 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 US
*/
-/*existing
-
-http://dev.gforge.org/pm/task.php?func=addartifact
- &add_artifact_id=$add_artifact_id
- &project_task_id=27
- &group_id=1
- &group_project_id=3
-
-//add
-//http://dev.gforge.org/pm/task.php?group_id=1&group_project_id=3&func=addtask
-//$related_artifact_summary
-//$related_artifact_id
-*/
-
require_once('../env.inc.php');
require_once $gfcommon.'include/pre.php';
require_once $gfcommon.'pm/ProjectGroupFactory.class.php';
@@ -32,7 +33,7 @@
$a=new Artifact($ath,$aid);
if (!$a || !is_object($a)) {
- exit_error('ERROR',_('Artifact Could Not Be Created'));
+ exit_error(_('Artifact Could Not Be Created'),'tracker');
}
//
@@ -51,30 +52,30 @@
$pg=new ProjectGroup($group,$group_project_id);
if (!$pg || !is_object($pg)) {
- exit_error('Error',_('Could Not Get ProjectGroup'));
+ exit_error(_('Could Not Get ProjectGroup'),'tracker');
} elseif ($pg->isError()) {
- exit_error('Error',$pg->getErrorMessage());
+ exit_error($pg->getErrorMessage(),'tracker');
}
$ptf = new ProjectTaskFactory($pg);
if (!$ptf || !is_object($ptf)) {
- exit_error('Error',_('Could Not Get ProjectTaskFactory'));
+ exit_error(_('Could Not Get ProjectTaskFactory'),'tracker');
} elseif ($ptf->isError()) {
- exit_error('Error',$ptf->getErrorMessage());
+ exit_error($ptf->getErrorMessage(),'tracker');
}
$ptf->setup($offset,$_order,$max_rows,$set,$_assigned_to,$_status,$_category_id);
if ($ptf->isError()) {
- exit_error('Error',$ptf->getErrorMessage());
+ exit_error($ptf->getErrorMessage(),'tracker');
}
$pt_arr =& $ptf->getTasks();
if (!$pt_arr) {
if ($ptf->isError()) {
- exit_error('Error',$ptf->getErrorMessage());
+ exit_error($ptf->getErrorMessage(),'tracker');
} else {
- exit_error('Error', _('No Existing Tasks Found'));
+ exit_error(_('No Existing Tasks Found'),'tracker');
}
}
@@ -103,14 +104,14 @@
//
} elseif (getStringFromRequest('done_adding')) {
- Header ('Location: '.util_make_url ('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id.'&project_task_id='.$project_task_id.'&func=addartifact&add_artifact_id[]='. $a->getID()) );
+ session_redirect('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id.'&project_task_id='.$project_task_id.'&func=addartifact&add_artifact_id[]='. $a->getID());
//
// Create a new task and relate it to this artifact
//
} elseif (getStringFromRequest('new_task')) {
- Header ('Location: '.util_make_url ('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=addtask&related_artifact_summary='. urlencode($a->getSummary()) .'&related_artifact_id='. $a->getID()) );
+ session_redirect ('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id.'&func=addtask&related_artifact_summary='. urlencode($a->getSummary()) .'&related_artifact_id='. $a->getID());
//
// Show the list of ProjectGroups available
@@ -119,17 +120,17 @@
$pgf=new ProjectGroupFactory($group);
if (!$pgf || !is_object($pgf)) {
- exit_error('Error',_('Could Not Get Factory'));
+ exit_error(_('Could Not Get Factory'),'tracker');
} elseif ($pgf->isError()) {
- exit_error('Error',$pgf->getErrorMessage());
+ exit_error($pgf->getErrorMessage(),'tracker');
}
$pg_arr =& $pgf->getProjectGroups();
if (!$pg_arr) {
if ($pgf->isError()) {
- exit_error('Error',$pgf->getErrorMessage());
+ exit_error($pgf->getErrorMessage(),'tracker');
} else {
- exit_error('Error',_('No Existing Project Groups Found'));
+ exit_error(_('No Existing Project Groups Found'),'tracker');
}
}
More information about the Fusionforge-commits
mailing list