aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-31 15:45:13 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-31 15:45:13 -0700
commitc1a953f96043c63c47bff7f5294005aba077e571 (patch)
tree6d55f13bff3cb2a89ed8f55f0d2730cf3ff47f6c /include/event.php
parent1d218784d180deb0946cb5dd4100ed0ebd489346 (diff)
parent5e985ef34f06964a7d8ac6ab20a8481c4b3ddca7 (diff)
downloadvolse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.tar.gz
volse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.tar.bz2
volse-hubzilla-c1a953f96043c63c47bff7f5294005aba077e571.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: util/messages.po
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php
index 2796ea712..4393e6854 100644
--- a/include/event.php
+++ b/include/event.php
@@ -18,6 +18,7 @@ function format_event_html($ev) {
if(! ((is_array($ev)) && count($ev)))
return '';
+
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM
$o = '<div class="vevent">' . "\r\n";
@@ -165,7 +166,18 @@ function bbtoevent($s) {
$match = '';
if(preg_match("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",$s,$match))
$ev['adjust'] = $match[1];
- $ev['nofinish'] = (((x($ev, 'start') && $ev['start']) && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0);
+ if(array_key_exists('start',$ev)) {
+ if(array_key_exists('finish',$ev)) {
+ if($ev['finish'] === $ev['start'])
+ $ev['nofinish'] = 1;
+ elseif($ev['finish'])
+ $ev['nofinish'] = 0;
+ else
+ $ev['nofinish'] = 1;
+ }
+ else
+ $ev['nofinish'] = 1;
+ }
return $ev;
}
@@ -483,7 +495,7 @@ function event_import_ical($ical, $uid) {
$ev['private'] = 1;
$ev['allow_cid'] = '<' . $channel['channel_hash'] . '>';
-// logger('storing event: ' . print_r($ev,true), LOGGER_ALL);
+ logger('storing event: ' . print_r($ev,true), LOGGER_ALL);
$event = event_store_event($ev);
if($event) {
$item_id = event_store_item($ev,$event);