From fbc8aa7be73a3c5fc23501d9ab3ed1d51cb23b95 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 30 Jan 2008 06:43:55 +0000 Subject: [PATCH] new parameter to set the date/time for touch, default the the current time --- phpgwapi/inc/class.vfs_sql.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.vfs_sql.inc.php b/phpgwapi/inc/class.vfs_sql.inc.php index bb3f667553..4561093d55 100644 --- a/phpgwapi/inc/class.vfs_sql.inc.php +++ b/phpgwapi/inc/class.vfs_sql.inc.php @@ -604,6 +604,7 @@ */ function acl_check ($data) { + //error_log(__METHOD__.'('.print_r($data,true).')'); if (!is_array ($data)) { $data = array (); @@ -928,7 +929,8 @@ $default_values = array ( - 'relatives' => array (RELATIVE_CURRENT) + 'relatives' => array (RELATIVE_CURRENT), + 'time' => $this->now, ); $data = array_merge ($this->default_values ($data, $default_values), $data); @@ -950,7 +952,7 @@ PHP's touch function will automatically decide whether to create the file or set the modification time */ - $rr = @touch ($p->real_full_path); + $rr = @touch ($p->real_full_path,$data['time']); if ($p->outside) { @@ -979,7 +981,7 @@ 'relatives' => array ($p->mask), 'attributes' => array( 'modifiedby_id' => $account_id, - 'modified' => $this->now + 'modified' => $data['time'], ) ) ); @@ -1007,7 +1009,7 @@ 'relatives' => array ($p->mask), 'attributes' => array ( 'createdby_id' => $account_id, - 'created' => $this->now, + 'created' => $data['time'], 'size' => 0, 'deleteable' => 'Y', 'app' => $currentapp