aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-08 20:57:37 -0800
committerfriendica <info@friendica.com>2015-02-08 20:57:37 -0800
commit08b757a22cd2804bfec8ecf682b6987b8c06ca49 (patch)
tree477f3a8e84388aab2a4f3c938a166597c7467d19 /mod
parent4b348d248975ba07ba9cea62f51eb52d6afb5645 (diff)
parent247579ebf13ead372eee87bd2351078f7219321e (diff)
downloadvolse-hubzilla-08b757a22cd2804bfec8ecf682b6987b8c06ca49.tar.gz
volse-hubzilla-08b757a22cd2804bfec8ecf682b6987b8c06ca49.tar.bz2
volse-hubzilla-08b757a22cd2804bfec8ecf682b6987b8c06ca49.zip
Merge branch 'master' into tres
Conflicts: mod/events.php view/css/mod_events.css
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php7
-rw-r--r--mod/item.php1
-rw-r--r--mod/ping.php6
3 files changed, 8 insertions, 6 deletions
diff --git a/mod/events.php b/mod/events.php
index 99e965e90..d02a29de6 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -242,7 +242,7 @@ function events_content(&$a) {
$mode = 'view';
$y = 0;
$m = 0;
- $ignored = ((x($_REQUEST,'ignored')) ? intval($_REQUEST['ignored']) : 0);
+ $ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : '');
if(argc() > 1) {
if(argc() > 2 && argv(1) == 'event') {
@@ -338,11 +338,10 @@ function events_content(&$a) {
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
from event left join item on event_hash = resource_id
- where resource_type = 'event' and event.uid = %d and event.ignore = %d
+ where resource_type = 'event' and event.uid = %d $ignored
AND (( `adjust` = 0 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )
OR ( `adjust` = 1 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )) ",
intval(local_channel()),
- intval($ignored),
dbesc($start),
dbesc($finish),
dbesc($adjust_start),
@@ -588,8 +587,8 @@ function events_content(&$a) {
'$n_checked' => $n_checked,
'$f_text' => t('Event Finishes:'),
'$f_dsel' => datetimesel($f,new DateTime(),DateTime::createFromFormat('Y',$fyear+5),DateTime::createFromFormat('Y-m-d H:i',"$fyear-$fmonth-$fday $fhour:$fminute"),'finish_text',true,true,'start_text'),
+ '$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked),
'$a_text' => t('Adjust for viewer timezone'),
- '$a_checked' => $a_checked,
'$d_text' => t('Description:'),
'$d_orig' => $d_orig,
'$l_text' => t('Location:'),
diff --git a/mod/item.php b/mod/item.php
index f4024f83c..74c043d5a 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -511,6 +511,7 @@ function item_post(&$a) {
* First protect any url inside certain bbcode tags so we don't double link it.
*/
+
$body = preg_replace_callback('/\[code(.*?)\[\/(code)\]/ism','red_escape_codeblock',$body);
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','red_escape_codeblock',$body);
diff --git a/mod/ping.php b/mod/ping.php
index e13dc5de2..a15f4c925 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -168,8 +168,10 @@ function ping_init(&$a) {
);
break;
case 'all_events':
- $r = q("update event set `ignore` = 1 where `ignore` = 0 and uid = %d",
- intval(local_channel())
+ $r = q("update event set `ignore` = 1 where `ignore` = 0 and uid = %d AND start < '%s' AND start > '%s' ",
+ intval(local_channel()),
+ dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
+ dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
);
break;
case 'notify':