[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13732] clean up
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13732] clean up |
Date: |
Mon, 17 Aug 2015 12:38:15 +0000 |
Revision: 13732
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13732
Author: sigurdne
Date: 2015-08-17 12:38:15 +0000 (Mon, 17 Aug 2015)
Log Message:
-----------
clean up
Modified Paths:
--------------
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/inc/class.uicomponent.inc.php
trunk/phpgwapi/inc/class.send.inc.php
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2015-08-17 12:37:47 UTC
(rev 13731)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2015-08-17 12:38:15 UTC
(rev 13732)
@@ -1410,14 +1410,6 @@
//Create Email Headers
$mime_boundary = "----Meeting Booking----".md5(time());
- $headers = <<<HTML
- From: {$from_name} <{$from_address}>
- Reply-To: {$from_name} <{$from_address}>
- MIME-Version: 1.0
- Content-Type: multipart/alternative;
boundary=\"{$mime_boundary}\"
- Content-class: urn:content-classes:calendarmessage
-HTML;
-
//Create Email Body (HTML)
$message = <<<HTML
--{$mime_boundary}
@@ -1431,9 +1423,17 @@
</body>
</html>
--{$mime_boundary}
+HTML;
+ //Create Email Body (HTML)
+ $message = <<<HTML
+ <html>
+ <body>
+ <p>Dear {$to_name}</p>
+ <p>{$description}</p>
+ </body>
+ </html>
+HTML;
-
-HTML;
$last_modified = date("Ymd\TGis");
$uid = date("Ymd\TGis", $startTime).rand()."@".$domain;
$dtstamp = date("Ymd\TGis");
@@ -1444,7 +1444,7 @@
$ical = <<<HTML
BEGIN:VCALENDAR
-PRODID:controller
+PRODID: controller {$domain}
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
@@ -1475,15 +1475,30 @@
- $message .= $ical;
+// $message .= $ical;
+ $message = $ical;
+
+ //Might work....
+ $attachment = array
+ (
+ // 'content' => base64_encode($ical),
+ 'content' => $ical,
+ 'name' => 'meeting.ics',
+ // 'encoding' => 'base64',//'7bit',
+ 'encoding' => '7bit',
+ 'type' =>
"text/calendar;charset=utf-8; method=REQUEST",
+ 'disposition' => 'inline'
+ );
+
+
$rc = false;
if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
$send= CreateObject('phpgwapi.send');
try
{
- $rc = $send->msg('email', $to_address,
$subject, $message, $msgtype='Ical', $cc='', $bcc='', $from_address,
$from_name,'html',$mime_boundary);
+ $rc = $send->msg('email', $to_address,
$subject, $message, $msgtype='Ical', $cc='', $bcc='', $from_address,
$from_name,'html',$mime_boundary);//, array($attachment));
}
catch (phpmailerException $e)
{
@@ -1495,9 +1510,6 @@
phpgwapi_cache::message_set(lang('SMTP server
is not set! (admin section)'), 'error');
}
-
- // $mailsent = mail($to_address, $subject, $message,
$headers);
-
return $rc;
}
}
Modified: trunk/controller/inc/class.uicomponent.inc.php
===================================================================
--- trunk/controller/inc/class.uicomponent.inc.php 2015-08-17 12:37:47 UTC
(rev 13731)
+++ trunk/controller/inc/class.uicomponent.inc.php 2015-08-17 12:38:15 UTC
(rev 13732)
@@ -612,11 +612,16 @@
$control
= $so_control->get_single($control_id);
$repeat_type
= $control->get_repeat_type();
-
+
+ //FIXME: Not currently supported
+ if($repeat_type <=
controller_control::REPEAT_TYPE_WEEK)
+ {
+ $repeat_type =
controller_control::REPEAT_TYPE_MONTH;
+ }
// LOCATIONS: Process aggregated values
for controls with repeat type day or week
if($repeat_type <=
controller_control::REPEAT_TYPE_WEEK)
{
- //FIX ME: Not currently
supported
+ //FIXME: Not currently supported
$component->set_xml_short_desc("
{$location_type_name[$location_id]}</br>{$short_description}");
@@ -1132,4 +1137,4 @@
return $to_month;
}
- }
\ No newline at end of file
+ }
Modified: trunk/phpgwapi/inc/class.send.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.send.inc.php 2015-08-17 12:37:47 UTC (rev
13731)
+++ trunk/phpgwapi/inc/class.send.inc.php 2015-08-17 12:38:15 UTC (rev
13732)
@@ -181,13 +181,27 @@
{
foreach($attachments as $key => $value)
{
- $mail->AddAttachment
- (
- $value['file'],
- utf8_decode($value['name']),
- 'base64',
- $value['type']
- );
+ if(isset($value['content']) &&
$value['content'])
+ {
+ $mail->AddStringAttachment
+ (
+ $value['content'],
+ $value['name'],
//meeting.ics
+ $value['encoding'],
//7bit
+ $value['type'],
//"text/calendar;charset=utf-8; method=REQUEST"
+ $value['disposition']
// 'attachment' | inline
+ );
+ }
+ else
+ {
+ $mail->AddAttachment
+ (
+ $value['file'],
+
utf8_decode($value['name']),
+ 'base64',
+ $value['type']
+ );
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13732] clean up,
Sigurd Nes <=