From fd4519a9729083c8a4ae7e365bc73e90440a8c49 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 6 Jan 2017 10:43:16 -0700 Subject: [PATCH] Allow projectmanager to restore deleted infologs --- infolog/inc/class.infolog_datasource.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_datasource.inc.php b/infolog/inc/class.infolog_datasource.inc.php index 8f3b890f0c..82c866f466 100644 --- a/infolog/inc/class.infolog_datasource.inc.php +++ b/infolog/inc/class.infolog_datasource.inc.php @@ -241,9 +241,12 @@ class infolog_datasource extends datasource function change_status($id,$status) { //error_log("datasource_infolog::change_status($id,$status)"); - if (($info = $this->infolog_bo->read($id)) && $this->infolog_bo->check_access($info,Acl::EDIT)) + if (($info = $this->infolog_bo->read($id)) && ( + $this->infolog_bo->check_access($info,Acl::EDIT) || + $info['info_status'] == 'deleted' && $this->infolog_bo->check_access($info, infolog_bo::ACL_UNDELETE) + )) { - if ($status == 'active' && in_array($info['info_status'],array('template','nonactive','archive'))) + if ($status == 'active' && in_array($info['info_status'],array('template','nonactive','archive','deleted'))) { $status = $this->infolog_bo->activate($info); }