[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: nntp/inc class.mail.inc.php,1.6,1.7 class.decode
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: nntp/inc class.mail.inc.php,1.6,1.7 class.decode.inc.php,1.8,1.9 |
Date: |
Sat, 26 Jan 2002 19:34:40 -0500 |
Update of /cvsroot/phpgroupware/nntp/inc
In directory subversions:/tmp/cvs-serv30696/nntp/inc
Modified Files:
class.mail.inc.php class.decode.inc.php
Log Message:
This will now write/read/delete files to the users .NNTP app directory
correctly.
Index: class.mail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/nntp/inc/class.mail.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.mail.inc.php 29 Dec 2001 18:12:55 -0000 1.6
--- class.mail.inc.php 27 Jan 2002 00:34:37 -0000 1.7
***************
*** 427,441 ****
{
case '+':
! (int)$ta[1] += $tzhours;
! (int)$ta[2] += $tzmins;
break;
case '-':
! (int)$ta[1] -= $tzhours;
! (int)$ta[2] -= $tzmins;
break;
}
}
! // echo 'NNTP: class.mail.inc.php: Date = ('.$dta[1].')
('.$month[$dta[2]].') ('.$dta[3].')<br>'."\n";
! return
mktime($ta[1],$ta[2],$ta[3],$month[$dta[2]],$dta[1],$dta[3]);
}
--- 427,441 ----
{
case '+':
! (int)$ta[0] += $tzhours;
! (int)$ta[1] += $tzmins;
break;
case '-':
! (int)$ta[0] -= $tzhours;
! (int)$ta[1] -= $tzmins;
break;
}
}
! echo 'NNTP: class.mail.inc.php: Date = ('.$dta[1].')
('.$month[$dta[2]].') ('.$dta[3].') TIME:
('.$ta[0].':'.$ta[1].':'.$ta[2].')<br>'."\n";
! return
mktime($ta[0],$ta[1],$ta[2],$month[$dta[2]],$dta[1],$dta[3]);
}
Index: class.decode.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/nntp/inc/class.decode.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.decode.inc.php 29 Dec 2001 18:12:55 -0000 1.8
--- class.decode.inc.php 27 Jan 2002 00:34:37 -0000 1.9
***************
*** 33,37 ****
{
$string = ereg_replace("'", "\'", $string);
! $string = preg_replace("/\=\?(.*?)\?b\?(.*?)\?\=/ieU",
base64_decode('\\2'),
$string);
--- 33,37 ----
{
$string = ereg_replace("'", "\'", $string);
! $string =
preg_replace("/\=\?(.*?)\?{b,B}\?(.*?)\?\=/ieU",
base64_decode('\\2'),
$string);
***************
*** 42,46 ****
{
$string = ereg_replace("'", "\'", $string);
! $string = preg_replace("/\=\?(.*?)\?q\?(.*?)\?\=/ieU",
$this->phpGW_quoted_printable_decode('\\2'),
$string);
--- 42,46 ----
{
$string = ereg_replace("'", "\'", $string);
! $string =
preg_replace("/\=\?(.*?)\?{q,Q}\?(.*?)\?\=/ieU",
$this->phpGW_quoted_printable_decode('\\2'),
$string);
***************
*** 51,59 ****
{
/* Decode from qp or base64 form */
! if (preg_match("/\=\?(.*?)\?b\?/i", $string))
{
return $this->decode_base64($string);
}
! if (preg_match("/\=\?(.*?)\?q\?/i", $string))
{
return $this->decode_qp($string);
--- 51,59 ----
{
/* Decode from qp or base64 form */
! if (preg_match("/\=\?(.*?)\?{b,B}\?/i", $string))
{
return $this->decode_base64($string);
}
! if (preg_match("/\=\?(.*?)\?{q,Q}\?/i", $string))
{
return $this->decode_qp($string);
***************
*** 260,266 ****
{
$bsub = strip_tags($bsub);
!
if(!$GLOBALS['phpgw']->vfs->file_exists('.nntp',array(RELATIVE_USER)))
! {
!
$GLOBALS['phpgw']->vfs->mkdir('.nntp',array(RELATIVE_USER));
}
$last_dot = strrpos($att_name,'.');
--- 260,277 ----
{
$bsub = strip_tags($bsub);
! if(!$GLOBALS['phpgw']->vfs->file_exists(
! Array(
! 'string' => '.nntp',
! 'relatives' =>
array(RELATIVE_USER)
! )
! )
! )
! {
! $GLOBALS['phpgw']->vfs->mkdir(
! Array(
! 'string' => '.nntp',
! 'relatives' =>
array(RELATIVE_USER)
! )
! );
}
$last_dot = strrpos($att_name,'.');
***************
*** 268,272 ****
$file_name = substr($att_name,0,$last_dot);
$ext_version = '_1';
!
while($GLOBALS['phpgw']->vfs->file_exists($att_name,array(RELATIVE_USER_APP)))
{
$work_name =
str_replace($file_name,'',substr($att_name,0,strrpos($att_name,'.')));
--- 279,290 ----
$file_name = substr($att_name,0,$last_dot);
$ext_version = '_1';
! echo 'ATT_NAME: '.$att_name.'<br>'."\n";
! while($GLOBALS['phpgw']->vfs->file_exists(
! Array(
! 'string' => $att_name,
! 'relatives' =>
array(RELATIVE_USER_APP)
! )
! )
! )
{
$work_name =
str_replace($file_name,'',substr($att_name,0,strrpos($att_name,'.')));
***************
*** 276,281 ****
}
$att_name = $file_name.$ext_version.$file_ext;
}
!
$GLOBALS['phpgw']->vfs->write($att_name,array(RELATIVE_USER_APP),base64_decode($bsub));
// we want to display images here, even though they are
attachments.
return '</td></tr><tr align="center"><td
align="center"><img
src="'.$GLOBALS['phpgw']->link('/nntp/view_attachment.php','file='.urlencode($att_name)).'"><p>';
--- 294,306 ----
}
$att_name = $file_name.$ext_version.$file_ext;
+ echo 'ATT_NAME: '.$att_name.'<br>'."\n";
}
! $GLOBALS['phpgw']->vfs->write(
! Array(
! 'string' => $att_name,
! 'relatives' =>
array(RELATIVE_USER_APP),
! 'content' => base64_decode($bsub)
! )
! );
// we want to display images here, even though they are
attachments.
return '</td></tr><tr align="center"><td
align="center"><img
src="'.$GLOBALS['phpgw']->link('/nntp/view_attachment.php','file='.urlencode($att_name)).'"><p>';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: nntp/inc class.mail.inc.php,1.6,1.7 class.decode.inc.php,1.8,1.9,
Mark A Peters <address@hidden> <=