diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-10 16:59:04 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-10 16:59:04 -0700 |
commit | ca870dbf31d31455ab4f5e0f461c5af89e1573fa (patch) | |
tree | 30bf8c1a116828dc0272b5677b717f7721809b3b /mod/ping.php | |
parent | 2128d5a2560383e0d3587087a7dd0aab217bc262 (diff) | |
download | volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.tar.gz volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.tar.bz2 volse-hubzilla-ca870dbf31d31455ab4f5e0f461c5af89e1573fa.zip |
more work on item table optimisation
Diffstat (limited to 'mod/ping.php')
-rw-r--r-- | mod/ping.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/ping.php b/mod/ping.php index d43694358..f2ec93f32 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -43,6 +43,8 @@ function ping_init(&$a) { $vnotify = false; + $item_normal = item_normal(); + if(local_channel()) { $vnotify = get_pconfig(local_channel(),'system','vnotify'); $evdays = intval(get_pconfig(local_channel(),'system','evdays')); @@ -272,7 +274,7 @@ function ping_init(&$a) { $result = array(); $r = q("SELECT * FROM item - WHERE item_restrict = 0 and item_unseen = 1 and uid = %d + WHERE item_unseen = 1 and uid = %d $item_normal and author_xchan != '%s' ORDER BY created DESC limit 300", intval(local_channel()), dbesc($ob_hash) @@ -376,8 +378,9 @@ function ping_init(&$a) { $t1 = dba_timer(); if($vnotify & (VNOTIFY_NETWORK|VNOTIFY_CHANNEL)) { - $r = q("SELECT id, item_restrict, item_flags FROM item - WHERE (item_restrict = 0) and item_unseen = 1 and uid = %d + $r = q("SELECT id, item_flags FROM item + WHERE item_unseen = 1 and uid = %d + $item_normal and author_xchan != '%s'", intval(local_channel()), dbesc($ob_hash) |