fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15579] controller: delete doc


From: sigurdne
Subject: [Fmsystem-commits] [15579] controller: delete doc
Date: Mon, 5 Sep 2016 07:47:02 +0000 (UTC)

Revision: 15579
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15579
Author:   sigurdne
Date:     2016-09-05 07:47:01 +0000 (Mon, 05 Sep 2016)
Log Message:
-----------
controller: delete doc

Modified Paths:
--------------
    branches/Version-1_0-branch/controller/inc/class.uidocument.inc.php

Modified: branches/Version-1_0-branch/controller/inc/class.uidocument.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uidocument.inc.php 
2016-09-04 17:07:10 UTC (rev 15578)
+++ branches/Version-1_0-branch/controller/inc/class.uidocument.inc.php 
2016-09-05 07:47:01 UTC (rev 15579)
@@ -336,15 +336,17 @@
                 $document->get_name()
             );
             
-            if($result)
-            {
-                $this->so->delete_document($document_id);
-                $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;
+                       if ($result)
+                       {
+                               $this->so->delete_document($document_id);
+                       }
+                       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'));
         }
                
         /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]