* Compatible with php5.3.

This commit is contained in:
hufangzhou
2023-02-09 05:54:15 +00:00
parent 8a7d835dc3
commit 8d26dceb4b
15 changed files with 42 additions and 26 deletions
+3 -2
View File
@@ -3643,6 +3643,7 @@ class taskModel extends model
if(!empty($task->team))
{
global $app;
$myself = new self();
if($task->mode == 'linear')
{
if($action == 'assignto' and strpos('done,cencel,closed', $task->status) === false) return false;
@@ -3650,14 +3651,14 @@ class taskModel extends model
{
if($task->assignedTo != $app->user->account) return false;
$currentTeam = (new self())->getTeamByAccount($task->team, $app->user->account);
$currentTeam = $myself->getTeamByAccount($task->team, $app->user->account);
if($currentTeam and $currentTeam->status == 'wait') return true;
}
if($action == 'finish' and $task->assignedTo != $app->user->account) return false;
}
elseif($task->mode == 'multi')
{
$currentTeam = (new self())->getTeamByAccount($task->team, $app->user->account);
$currentTeam = $myself->getTeamByAccount($task->team, $app->user->account);
if($action == 'start' and strpos('wait,doing', $task->status) !== false and $currentTeam and $currentTeam->status == 'wait') return true;
if($action == 'finish' and (empty($currentTeam) or $currentTeam->status == 'done')) return false;
}