[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15581] controller: delete doc
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15581] controller: delete doc |
Date: |
Mon, 5 Sep 2016 08:07:09 +0000 (UTC) |
Revision: 15581
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15581
Author: sigurdne
Date: 2016-09-05 08:07:08 +0000 (Mon, 05 Sep 2016)
Log Message:
-----------
controller: delete doc
Modified Paths:
--------------
trunk/controller/inc/class.uidocument.inc.php
Modified: trunk/controller/inc/class.uidocument.inc.php
===================================================================
--- trunk/controller/inc/class.uidocument.inc.php 2016-09-05 07:52:50 UTC
(rev 15580)
+++ trunk/controller/inc/class.uidocument.inc.php 2016-09-05 08:07:08 UTC
(rev 15581)
@@ -56,10 +56,10 @@
parent::__construct();
$this->so = controller_sodocument::get_instance();
$this->so_procedure =
controller_soprocedure::get_instance();
- $this->read = $GLOBALS['phpgw']->acl->check('.control',
PHPGW_ACL_READ, 'controller');//1
- $this->add = $GLOBALS['phpgw']->acl->check('.control',
PHPGW_ACL_ADD, 'controller');//2
- $this->edit = $GLOBALS['phpgw']->acl->check('.control',
PHPGW_ACL_EDIT, 'controller');//4
- $this->delete =
$GLOBALS['phpgw']->acl->check('.control', PHPGW_ACL_DELETE, 'controller');//8
+ $this->read =
$GLOBALS['phpgw']->acl->check('.procedure', PHPGW_ACL_READ, 'controller');//1
+ $this->add =
$GLOBALS['phpgw']->acl->check('.procedure', PHPGW_ACL_ADD, 'controller');//2
+ $this->edit =
$GLOBALS['phpgw']->acl->check('.procedure', PHPGW_ACL_EDIT, 'controller');//4
+ $this->delete =
$GLOBALS['phpgw']->acl->check('.procedure', PHPGW_ACL_DELETE, 'controller');//8
$GLOBALS['phpgw']->css->add_external_file('controller/templates/base/css/base.css');
}
@@ -349,20 +349,21 @@
return;
} */
- $result = $this->so->delete_document_from_vfs
- (
+ $result = $this->so->delete_document_from_vfs(
$document_properties['document_type'],
$document_properties['id'], $document->get_name()
);
if ($result)
{
$this->so->delete_document($document_id);
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'controller.uidocument.show',
+ }
+ else
+ {
+ phpgwapi_cache::message_set('Not deleted',
'error');
+ }
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'controller.uidocument.show',
'procedure_id' => $procedure->get_id(),
'tab' => 'documents'));
- }
- // TODO: communicate error/message to user
- return false;
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15581] controller: delete doc,
sigurdne <=