Works on enhancement of project tasks

Fix: security check
This commit is contained in:
Regis Houssin 2010-02-14 07:24:02 +00:00
parent 1e7b88bb2f
commit 80d808be36
4 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -111,7 +111,7 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorde
if ($mesg) print $mesg;
$tasksarray=$task->getTasksArray(0,0,$project->id,0);
$tasksrole=$task->getUserRolesForProjetsOrTasks($user,0,$project->id,0);
$tasksrole=$task->getUserRolesForProjectsOrTasks($user,0,$project->id,0);
//var_dump($tasksarray);
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';

View File

@ -263,7 +263,7 @@ else
// can have a parent that is not affected to him).
$tasksarray=$task->getTasksArray(0, 0, $project->id, $socid, 0);
// We load also tasks limited to a particular user
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getUserRolesForProjetsOrTasks(0,$user,$project->id,0) : '');
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getUserRolesForProjectsOrTasks(0,$user,$project->id,0) : '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';

View File

@ -73,7 +73,7 @@ $task = new Task($db);
// can have a parent that is not affected to him).
$tasksarray=$taskstatic->getTasksArray(0, 0, $projectstatic->id, $socid);
// We load also tasks limited to a particular user
$tasksrole=($_REQUEST["mode"]=='mine' ? $taskstatic->getUserRolesForProjetsOrTasks(0,$user,$projectstatic->id,0) : '');
$tasksrole=($_REQUEST["mode"]=='mine' ? $taskstatic->getUserRolesForProjectsOrTasks(0,$user,$projectstatic->id,0) : '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';

View File

@ -504,7 +504,7 @@ class Task extends CommonObject
if ((! $obj->public) && ($userp || $usert)) // If not public and we ask a filter on user
{
if (! $this->getUserRolesForProjetsOrTasks($userp, $usert, $obj->projectid, $obj->rowid))
if (! $this->getUserRolesForProjectsOrTasks($userp, $usert, $obj->projectid, $obj->rowid))
{
$error++;
}
@ -542,7 +542,7 @@ class Task extends CommonObject
* @param taskid
* @return array Array of role of user for each projects or each tasks
*/
function getUserRolesForProjetsOrTasks($userp,$usert,$projectid=0,$taskid=0)
function getUserRolesForProjectsOrTasks($userp,$usert,$projectid=0,$taskid=0)
{
$tasksrole = array();