aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-09-28 15:46:14 +0200
committerMax Kostikov <max@kostikov.co>2018-09-28 15:46:14 +0200
commit4a904fa3a8af1c101ede76657249fb7eb47faf60 (patch)
tree544509813fb68579ef2b556ce879a971d183269a /include/items.php
parentf5f6ec3d71acb3e0488386819d5060e59331ec23 (diff)
parentc13d7e29ef9676b0f0e4ae23aa52e203f4ad8895 (diff)
downloadvolse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.gz
volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.tar.bz2
volse-hubzilla-4a904fa3a8af1c101ede76657249fb7eb47faf60.zip
Merge branch 'patch-29' into 'dev'
Patch 29 See merge request Kostikov/core!3
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index b0f6a89cf..58461cc3a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3997,6 +3997,7 @@ function zot_feed($uid, $observer_hash, $arr) {
$result = array();
$mindate = null;
$message_id = null;
+ $wall = true;
require_once('include/security.php');
@@ -4008,6 +4009,10 @@ function zot_feed($uid, $observer_hash, $arr) {
$message_id = $arr['message_id'];
}
+ if(array_key_exists('wall',$arr)) {
+ $wall = intval($arr['wall']);
+ }
+
if(! $mindate)
$mindate = NULL_DATE;
@@ -4036,6 +4041,10 @@ function zot_feed($uid, $observer_hash, $arr) {
$limit = '';
}
+ if($wall) {
+ $sql_extra .= " and item_wall = 1 ";
+ }
+
$items = [];
@@ -4048,7 +4057,6 @@ function zot_feed($uid, $observer_hash, $arr) {
$r = q("SELECT parent, postopts FROM item
WHERE uid IN ( %s )
- AND item_wall = 1
AND item_private = 0
$item_normal
$sql_extra ORDER BY created ASC $limit",
@@ -4058,7 +4066,6 @@ function zot_feed($uid, $observer_hash, $arr) {
else {
$r = q("SELECT parent, postopts FROM item
WHERE uid = %d
- AND item_wall = 1
$item_normal
$sql_extra ORDER BY created ASC $limit",
intval($uid)
@@ -4152,7 +4159,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$sql_extra .= protect_sprintf(term_query('item', $arr['cat'], TERM_CATEGORY));
if($arr['gid'] && $uid) {
- $r = q("SELECT * FROM groups WHERE id = %d AND uid = %d LIMIT 1",
+ $r = q("SELECT * FROM pgrp WHERE id = %d AND uid = %d LIMIT 1",
intval($arr['group']),
intval($uid)
);