read debugdir from egw config

This commit is contained in:
Lars Kneschke 2005-12-25 16:41:35 +00:00
parent afaa6f2815
commit 6f05e93e26
4 changed files with 95 additions and 70 deletions

View File

@ -160,9 +160,11 @@
);
}
break;
case 'CLASS':
$attributes['CLASS'] = $event['public'] ? 'PUBLIC' : 'PRIVATE';
break;
case 'ORGANIZER': // according to iCalendar standard, ORGANIZER not used for events in the own calendar
if (!isset($event['participants'][$event['owner']]) || count($event['participants']) > 1)
{
@ -172,10 +174,12 @@
$GLOBALS['egw']->accounts->id2name($event['owner'],'account_lastname'));
}
break;
case 'DTEND':
if(date('H:i:s',$event['end']) == '23:59:59') $event['end']++;
$attributes[$icalFieldName] = $event['end'];
break;
case 'RRULE':
if ($event['recur_type'] == MCAL_RECUR_NONE) break; // no recuring event
$rrule = array('FREQ' => $this->recur_egw2ical[$event['recur_type']]);
@ -189,9 +193,11 @@
}
$rrule['BYDAY'] = implode(',',$days);
break;
case MCAL_RECUR_MONTHLY_MDAY: // date of the month: BYMONTDAY={1..31}
$rrule['BYMONTHDAY'] = (int) date('d',$event['start']);
break;
case MCAL_RECUR_MONTHLY_WDAY: // weekday of the month: BDAY={1..5}{MO..SO}
$rrule['BYDAY'] = (1 + (int) ((date('d',$event['start'])-1) / 7)).
strtoupper(substr(date('l',$event['start']),0,2));
@ -208,6 +214,7 @@
}
$attributes['RRULE'] = implode(';',$attributes['RRULE']);
break;
case 'EXDATE':
if ($event['recur_exception'])
{
@ -220,12 +227,15 @@
$parameters['EXDATE']['VALUE'] = 'DATE';
}
break;
case 'PRIORITY':
$attributes['PRIORITY'] = (int) $this->priority_egw2ical[$event['priority']];
break;
case 'TRANSP':
$attributes['TRANSP'] = $event['non_blocking'] ? 'TRANSPARENT' : 'OPAQUE';
break;
case 'CATEGORIES':
if ($event['category'])
{
@ -280,6 +290,7 @@
function importVCal($_vcalData, $cal_id=-1)
{
error_log('CALENDAR('.__LINE__.") $cal_id");
// our (patched) horde classes, do NOT unfold folded lines, which causes a lot trouble in the import
$_vcalData = preg_replace("/[\r\n]+ /",'',$_vcalData);
@ -541,7 +552,9 @@
switch(strtolower($_productName))
{
default:
$this->supportedFields = $defaultFields + array('participants' => 'participants');
# participants disabled until working correctly
#$this->supportedFields = $defaultFields + array('participants' => 'participants');
$this->supportedFields = $defaultFields;
break;
}
break;

View File

@ -69,6 +69,10 @@ class Horde_RPC_syncml extends Horde_RPC {
// that's not part of the valid response.
ob_start();
if(isset($GLOBALS['config_syncml']['syncml_debug_dir']))
{
$this->_debugDir = $GLOBALS['config_syncml']['syncml_debug_dir'];
}
// Very useful for debugging. Logs XML packets to
// $this->_debugDir.
if (!empty($this->_debugDir) && is_dir($this->_debugDir)) {

View File

@ -37,6 +37,10 @@ class Horde_RPC_syncml_wbxml extends Horde_RPC_syncml {
// that's not part of the valid response.
ob_start();
if(isset($GLOBALS['config_syncml']['syncml_debug_dir']))
{
$this->_debugDir = $GLOBALS['config_syncml']['syncml_debug_dir'];
}
// Very useful for debugging. Logs WBXML packets to
// $this->_debugDir.
if (!empty($this->_debugDir) && is_dir($this->_debugDir)) {

View File

@ -26,10 +26,14 @@ include('./header.inc.php');
// SyncML works currently only with PHP sessions
if($GLOBALS['egw_info']['server']['sessions_type'] == 'db')
{
error_log('SyncML support is not available with DB sessions. Please switch to PHP4 sessions in header.inc.php.');
error_log('SyncML support is currently not available with DB sessions. Please switch to PHP4 sessions in header.inc.php.');
exit;
}
$config =& CreateObject('phpgwapi.config','syncml');
$config->read_repository();
$GLOBALS['config_syncml'] =& $config->config_data;
unset($config);
/* Look at the Content-type of the request, if it is available, to try
* and determine what kind of request this is. */