From bcb0e7732c18100b79def9f79071e23e4a7dfcfc Mon Sep 17 00:00:00 2001 From: z Date: Mon, 21 Sep 2020 16:51:16 +0800 Subject: [PATCH] * adjust for low php version. --- module/project/view/task.html.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index e15273b344..080a0963e8 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -210,11 +210,12 @@ js::set('foldAll', $lang->project->treeLevel['root']); $widths = $this->datatable->setFixedFieldWidth($customFields); $columns = 0; - $canBatchEdit = common::hasPriv('task', 'batchEdit', !empty(reset($tasks)) ? reset($tasks) : null); - $canBatchClose = (common::hasPriv('task', 'batchClose', !empty(reset($tasks)) ? reset($tasks) : null) and strtolower($browseType) != 'closed'); - $canBatchCancel = common::hasPriv('task', 'batchCancel', !empty(reset($tasks)) ? reset($tasks) : null); - $canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty(reset($tasks)) ? reset($tasks) : null); - $canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty(reset($tasks)) ? reset($tasks) : null); + $task = reset($tasks); + $canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null); + $canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) and strtolower($browseType) != 'closed'); + $canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($task) ? $task : null); + $canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($task) ? $task : null); + $canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null); $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchCancel or $canBatchChangeModule or $canBatchAssignTo); ?>