aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-11-25 15:14:20 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-11-25 15:14:20 -0800
commit192e85ffa45916ea631ac3c2c59dc264249f537e (patch)
treeb24e8610a19ec757ae4e44a1ab5b914dc87312d1 /mod
parentb33420179712c0ba5dce484e63e7a9a0201daab1 (diff)
parent3ea84d7eab20947ac52dc7e6c205252f0a76c047 (diff)
downloadvolse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.tar.gz
volse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.tar.bz2
volse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.zip
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/mod/events.php b/mod/events.php
index d55d22f44..64d7dfb93 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -91,7 +91,11 @@ function events_post(&$a) {
linkify_tags($a, $location, local_channel());
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
- $onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
+
+ //fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location)
+ //$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
+ $onerror_url = $a->get_baseurl() . "/events";
+
if(strcmp($finish,$start) < 0 && !$nofinish) {
notice( t('Event can not end before it has started.') . EOL);
if(intval($_REQUEST['preview'])) {
@@ -366,7 +370,7 @@ function events_content(&$a) {
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
- $fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
+ $fdt = ((x($orig_event)) ? $orig_event['finish'] : '+1 hour');
$tz = date_default_timezone_get();
if(x($orig_event))
@@ -380,8 +384,12 @@ function events_content(&$a) {
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
- $shour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'H') : '00');
- $sminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'i') : '00');
+// $shour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'H') : '00');
+// $sminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'i') : '00');
+
+ $shour = datetime_convert('UTC', $tz, $sdt, 'H');
+ $sminute = datetime_convert('UTC', $tz, $sdt, 'i');
+
$stext = datetime_convert('UTC',$tz,$sdt);
$stext = substr($stext,0,14) . "00:00";
@@ -393,8 +401,12 @@ function events_content(&$a) {
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
- $fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : '00');
- $fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : '00');
+// $fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : '00');
+// $fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : '00');
+
+ $fhour = datetime_convert('UTC', $tz, $fdt, 'H');
+ $fminute = datetime_convert('UTC', $tz, $fdt, 'i');
+
$ftext = datetime_convert('UTC',$tz,$fdt);
$ftext = substr($ftext,0,14) . "00:00";
$type = ((x($orig_event)) ? $orig_event['type'] : 'event');