Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
This commit is contained in:
14
mod/ping.php
14
mod/ping.php
@@ -272,9 +272,8 @@ function ping_init(&$a) {
|
||||
$result = array();
|
||||
|
||||
$r = q("SELECT * FROM item
|
||||
WHERE item_restrict = %d and item_unseen = 1 and uid = %d
|
||||
and author_xchan != '%s' ORDER BY created DESC",
|
||||
intval(ITEM_VISIBLE),
|
||||
WHERE item_restrict = 0 and item_unseen = 1 and uid = %d
|
||||
and author_xchan != '%s' ORDER BY created DESC limit 300",
|
||||
intval(local_channel()),
|
||||
dbesc($ob_hash)
|
||||
);
|
||||
@@ -287,7 +286,7 @@ function ping_init(&$a) {
|
||||
$result[] = format_notification($item);
|
||||
}
|
||||
}
|
||||
logger('ping (network||home): ' . print_r($result, true), LOGGER_DATA);
|
||||
// logger('ping (network||home): ' . print_r($result, true), LOGGER_DATA);
|
||||
echo json_encode(array('notify' => $result));
|
||||
killme();
|
||||
}
|
||||
@@ -295,7 +294,7 @@ function ping_init(&$a) {
|
||||
if(argc() > 1 && (argv(1) === 'intros')) {
|
||||
$result = array();
|
||||
|
||||
$r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or xchan_deleted = 1 or xchan_orphan = 1) ORDER BY abook_created DESC",
|
||||
$r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or xchan_deleted = 1 or xchan_orphan = 1) ORDER BY abook_created DESC LIMIT 50",
|
||||
intval(local_channel()),
|
||||
intval(ABOOK_FLAG_PENDING),
|
||||
intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED)
|
||||
@@ -326,7 +325,7 @@ function ping_init(&$a) {
|
||||
|
||||
$r = q("SELECT * FROM event left join xchan on event_xchan = xchan_hash
|
||||
WHERE `event`.`uid` = %d AND start < '%s' AND start > '%s' and `ignore` = 0
|
||||
ORDER BY `start` DESC ",
|
||||
ORDER BY `start` 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'))
|
||||
@@ -378,9 +377,8 @@ function ping_init(&$a) {
|
||||
|
||||
if($vnotify & (VNOTIFY_NETWORK|VNOTIFY_CHANNEL)) {
|
||||
$r = q("SELECT id, item_restrict, item_flags FROM item
|
||||
WHERE (item_restrict = %d) and item_unseen = 1 and uid = %d
|
||||
WHERE (item_restrict = 0) and item_unseen = 1 and uid = %d
|
||||
and author_xchan != '%s'",
|
||||
intval(ITEM_VISIBLE),
|
||||
intval(local_channel()),
|
||||
dbesc($ob_hash)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user