[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15372] controller: documents to procedures
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15372] controller: documents to procedures |
Date: |
Mon, 25 Jul 2016 13:43:27 +0000 (UTC) |
Revision: 15372
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15372
Author: sigurdne
Date: 2016-07-25 13:43:26 +0000 (Mon, 25 Jul 2016)
Log Message:
-----------
controller: documents to procedures
Modified Paths:
--------------
trunk/controller/inc/class.sodocument.inc.php
trunk/controller/inc/class.uidocument.inc.php
Modified: trunk/controller/inc/class.sodocument.inc.php
===================================================================
--- trunk/controller/inc/class.sodocument.inc.php 2016-07-25 13:07:13 UTC
(rev 15371)
+++ trunk/controller/inc/class.sodocument.inc.php 2016-07-25 13:43:26 UTC
(rev 15372)
@@ -313,6 +313,12 @@
$path .= "/{$name}";
$file = array('string' => $path, RELATIVE_NONE);
+ return $vfs->cp(array(
+ 'from' =>
$temporary_name,
+ 'to' => $path,
+ 'relatives' =>
array(RELATIVE_NONE | VFS_REAL, RELATIVE_ALL))
+ );
+/*
return $vfs->write
(
array
@@ -322,6 +328,7 @@
'content' =>
file_get_contents($temporary_name)
)
);
+ */
}
public function read_document_from_vfs( string $document_type,
$id, $name )
@@ -352,10 +359,8 @@
$vfs = CreateObject('phpgwapi.vfs');
$vfs->override_acl = 1;
- return $vfs->rm
- (
- array
- (
+ return $vfs->rm(
+ array(
'string' => $path,
RELATIVE_NONE
)
@@ -364,6 +369,7 @@
public function delete_document( $id )
{
+ $id = (int)$id;
$sql = "DELETE FROM controller_document WHERE id =
{$id}";
$result = $this->db->query($sql, __LINE__, __FILE__);
Modified: trunk/controller/inc/class.uidocument.inc.php
===================================================================
--- trunk/controller/inc/class.uidocument.inc.php 2016-07-25 13:07:13 UTC
(rev 15371)
+++ trunk/controller/inc/class.uidocument.inc.php 2016-07-25 13:43:26 UTC
(rev 15372)
@@ -280,13 +280,16 @@
else
{
// Handle failure on storing
document
- $this->redirect($document,
$document_propeties, '', '');
+ $this->redirect($document,
$document_properties, '', '');
}
}
else
{
+
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'controller.uidocument.show',
+ 'procedure_id' =>
$procedure->get_id(),
+ 'tab' => 'documents'));
//Handle vfs failure to store document
- $this->redirect($document,
$document_propeties, '', '');
+// $this->redirect($document,
$document_properties, '', '');
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15372] controller: documents to procedures,
sigurdne <=