diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-31 15:45:13 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-31 15:45:13 -0700 |
commit | c1a953f96043c63c47bff7f5294005aba077e571 (patch) | |
tree | 6d55f13bff3cb2a89ed8f55f0d2730cf3ff47f6c | |
parent | 1d218784d180deb0946cb5dd4100ed0ebd489346 (diff) | |
parent | 5e985ef34f06964a7d8ac6ab20a8481c4b3ddca7 (diff) | |
download | volse-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
-rw-r--r-- | include/bbcode.php | 9 | ||||
-rw-r--r-- | include/event.php | 16 | ||||
-rwxr-xr-x | mod/events.php | 2 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 2 |
5 files changed, 25 insertions, 6 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 2e201344c..66b63d395 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -950,14 +950,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) // start which is always required). Allow desc with a missing summary for compatibility. if ((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) { + $sub = format_event_html($ev); + $sub = str_replace('$',"\0",$sub); + + $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text); + $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text); $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text); - $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text); $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text); $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text); $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); + + $Text = str_replace("\0",'$',$Text); + } // Unhide all [noparse] contained bbtags unspacefying them 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); diff --git a/mod/events.php b/mod/events.php index 0af81278f..c2bacfe44 100755 --- a/mod/events.php +++ b/mod/events.php @@ -491,7 +491,7 @@ function events_content(&$a) { '$export' => array($a->get_baseurl()."/events/$y/$m/export",t('Export'),'',''), '$calendar' => cal($y,$m,$links, ' eventcal'), '$events' => $events, - '$upload' => t('Upload'), + '$upload' => t('Import'), '$submit' => t('Submit') )); diff --git a/version.inc b/version.inc index 110ed7a67..c937dfd57 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-07-30.1109 +2015-07-31.1110 diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index c91419783..bb6ca63a4 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -3,7 +3,7 @@ <h2>{{$title}}</h2> <div class="pull-right"> -<button class="btn btn-xs" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button> <button class="btn btn-xs" onclick="exportDate(); return false;" >{{$export.1}}</button> <button class="btn btn-xs btn-success" onclick="openClose('event-upload-form');"><i class="icon-upload"></i> {{$upload}}</button> +<button class="btn btn-xs" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button> <button class="btn btn-xs" onclick="exportDate(); return false;" ><i class="icon-download"></i> {{$export.1}}</button> <button class="btn btn-xs" onclick="openClose('event-upload-form');"><i class="icon-upload"></i> {{$upload}}</button> </div> <div id="event-upload-form" style="display:none;"> |