[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] tts/newticket.php, 1.31.2.3.4.4
From: |
nomail |
Subject: |
[Phpgroupware-cvs] tts/newticket.php, 1.31.2.3.4.4 |
Date: |
Thu, 20 May 2004 16:47:01 -0000 |
Update of /tts
Modified Files:
Branch: Version-0_9_16-branch
newticket.php
date: 2004/04/20 12:52:17; author: lpiepho; state: Exp; lines: +18 -7
Log Message:
Fix in attachments. Multiple attachments are possible now.
=====================================================================
No syntax errors detected in -
=====================================================================
Index: tts/newticket.php
diff -u tts/newticket.php:1.31.2.3.4.3 tts/newticket.php:1.31.2.3.4.4
--- tts/newticket.php:1.31.2.3.4.3 Fri Apr 16 11:30:05 2004
+++ tts/newticket.php Tue Apr 20 12:52:17 2004
@@ -41,26 +41,37 @@
{
//File-Upload
if ($HTTP_POST_FILES['attachment']['name'] != '')
- {
+ {
+ $basedir = $GLOBALS['basedir'] . "/tts";
//Check if home/groupdirectory exists. If not, we
create it
- if (!file_exists($GLOBALS['basedir'] . "/home/tts"))
+ if (!file_exists($basedir))
{
+ $GLOBALS['phpgw']->vfs->override_acl = 1;
$GLOBALS['phpgw']->vfs->mkdir (array (
- 'string' => $GLOBALS['basedir']
. "/home/tts",
+ 'string' => $basedir,
'relatives' => array
(RELATIVE_ALL)));
+ $GLOBALS['phpgw']->vfs->override_acl = 0;
}
- $tid = $ticket_id =
$phpgw->db->get_last_insert_id('phpgw_tts_tickets','ticket_id');
- $attdir = "home/tts/t" . $tid;
+ $GLOBALS['phpgw']->db->query("SELECT max(ticket_id)
from phpgw_tts_tickets",__LINE__,__FILE__);
+ $GLOBALS['phpgw']->db->next_record();
+ $tid = ($GLOBALS['phpgw']->db->f('max(ticket_id)')) + 1;
+
+ //$tid = $ticket_id =
$phpgw->db->get_last_insert_id('phpgw_tts_tickets','ticket_id');
+ $attdir = $basedir . "/" . $tid;
+ $GLOBALS['phpgw']->vfs->override_acl = 1;
$GLOBALS['phpgw']->vfs->mkdir (array (
'string' => $attdir,
'relatives' => array
(RELATIVE_ALL)));
-
+ $GLOBALS['phpgw']->vfs->override_acl = 0;
+
+ $GLOBALS['phpgw']->vfs->override_acl = 1;
$GLOBALS['phpgw']->vfs->cp(array (
'from' =>
$HTTP_POST_FILES['attachment']['tmp_name'],
'to' => $attdir . '/' .
$HTTP_POST_FILES['attachment']['name'],
'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
+ $GLOBALS['phpgw']->vfs->override_acl = 0;
$GLOBALS['phpgw']->db->query("SELECT max(file_id) from
phpgw_vfs",__LINE__,__FILE__);
$GLOBALS['phpgw']->db->next_record();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] tts/newticket.php, 1.31.2.3.4.4,
nomail <=