--- dokuwiki-plugin-icalevents-20100501/syntax.php 2010-12-05 22:33:33.062976306 +0200
+++ iCalEvents/syntax.php 2010-12-05 22:44:54.218325084 +0200
@@ -74,20 +74,32 @@
$previewSec = 60*24*3600; # two month
}
+ # Take dateformat from params, or
+ # If dateformat is set in plugin configuration ('dformat'), then use it.
+ # Otherwise fall back to dokuwiki's default dformat from the global /conf/dokuwiki.php.
+ if (!empty($params['dformat'])) {
+ $dateFormat = $params['dformat'];
+ } else {
+ global $conf;
+ $dateFormat = $this->getConf('dformat') ? $this->getConf('dformat') : $conf['dformat'];
+ }
+
+ $showEndDates = !empty($params['showEndDates']);
+
#echo "url=$icsURL from = $from previewSec = $previewSec
";
- return array($icsURL, $from, $previewSec);
+ return array($icsURL, $from, $previewSec, $dateFormat, $showEndDates);
}
/**
* loads the ics file via HTTP, parses it and renders an HTML table.
*/
function render($mode, &$renderer, $data) {
- list($url, $from, $previewSec) = $data;
+ list($url, $from, $previewSec, $dateFormat, $showEndDates) = $data;
$ret = '';
if($mode == 'xhtml'){
# parse the ICS file
- $entries = $this->_parseIcs($url, $from, $previewSec);
+ $entries = $this->_parseIcs($url, $from, $previewSec, $dateFormat);
if ($this->error) {
$renderer->doc .= "Error in Plugin iCalEvents: ".$this->error;
return true;
@@ -103,7 +115,7 @@
foreach ($entries as $entry) {
$rowCount++;
$ret .= '