diff options
author | redmatrix <mike@macgirvin.com> | 2016-10-03 21:48:53 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-10-03 21:48:53 -0700 |
commit | ce6e81c68221a9f462af886626dc02fdfc26f8aa (patch) | |
tree | 9975c5271a35e532ee1e48a0e36bd4692945c4a6 /Zotlabs/Module/Ping.php | |
parent | c44acb35757700e52db5cc4a7093b8e4624dc3fa (diff) | |
download | volse-hubzilla-ce6e81c68221a9f462af886626dc02fdfc26f8aa.tar.gz volse-hubzilla-ce6e81c68221a9f462af886626dc02fdfc26f8aa.tar.bz2 volse-hubzilla-ce6e81c68221a9f462af886626dc02fdfc26f8aa.zip |
more backticks
Diffstat (limited to 'Zotlabs/Module/Ping.php')
-rw-r--r-- | Zotlabs/Module/Ping.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index e01c3b49a..b145bd2ed 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -173,7 +173,7 @@ class Ping extends \Zotlabs\Web\Controller { ); break; case 'all_events': - $r = q("update event set `dismissed` = 1 where `dismissed` = 0 and uid = %d AND dtstart < '%s' AND dtstart > '%s' ", + $r = q("update event set dismissed = 1 where dismissed = 0 and uid = %d AND dtstart < '%s' AND dtstart > '%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')) @@ -325,9 +325,9 @@ class Ping extends \Zotlabs\Web\Controller { $result = array(); $r = q("SELECT * FROM event left join xchan on event_xchan = xchan_hash - WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0 + WHERE event.uid = %d AND dtstart < '%s' AND dtstart > '%s' and dismissed = 0 and etype in ( 'event', 'birthday' ) - ORDER BY `dtstart` DESC LIMIT 1000", + ORDER BY dtstart DESC LIMIT 1000", 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')) @@ -443,10 +443,10 @@ class Ping extends \Zotlabs\Web\Controller { $t5 = dba_timer(); if($vnotify & (VNOTIFY_EVENT|VNOTIFY_EVENTTODAY|VNOTIFY_BIRTHDAY)) { - $events = q("SELECT etype, dtstart, adjust FROM `event` - WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0 + $events = q("SELECT etype, dtstart, adjust FROM event + WHERE event.uid = %d AND dtstart < '%s' AND dtstart > '%s' and dismissed = 0 and etype in ( 'event', 'birthday' ) - ORDER BY `dtstart` ASC ", + ORDER BY dtstart ASC ", 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')) |