aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-30 22:29:10 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-30 22:29:10 -0700
commitacc9a8e43bac0fbb8fa8570e035850102bd57bfd (patch)
treeca2be243943e9df3b9dcfc978894e0c9be255940 /include/event.php
parent4c6368d0750650ac2281d5a1b1831ca9d5b00501 (diff)
downloadvolse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.tar.gz
volse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.tar.bz2
volse-hubzilla-acc9a8e43bac0fbb8fa8570e035850102bd57bfd.zip
escape $ in events
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php
index 4e36f5090..4b95e5c2f 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,12 @@ 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) && (! $ev['finish']))
+ $ev['nofinish'] = 0;
+ else
+ $ev['nofinish'] = 1;
+ }
return $ev;
}
@@ -483,7 +489,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);