aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-28 22:46:07 -0700
committerfriendica <info@friendica.com>2013-04-28 22:46:07 -0700
commit50db4a7120d7e4417f097621e36359fbb8b6a5e4 (patch)
treeed1fa811bf5d97413147ddc716a33b68505feb08 /include
parentac64c93bf8714550d47a546faec59cfea0b4daeb (diff)
downloadvolse-hubzilla-50db4a7120d7e4417f097621e36359fbb8b6a5e4.tar.gz
volse-hubzilla-50db4a7120d7e4417f097621e36359fbb8b6a5e4.tar.bz2
volse-hubzilla-50db4a7120d7e4417f097621e36359fbb8b6a5e4.zip
port superblock core code (except Red will use an xchan instead of a URL)
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 882d108f5..a615dfcc5 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -375,6 +375,20 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
$ssl_state = ((local_user()) ? true : false);
+
+ $arr_blocked = null;
+
+ if(local_user()) {
+ $str_blocked = get_pconfig(local_user(),'system','blocked');
+ if($str_blocked) {
+ $arr_blocked = explode(',',$str_blocked);
+ for($x = 0; $x < count($arr_blocked); $x ++)
+ $arr_blocked[$x] = trim($arr_blocked[$x]);
+ }
+
+ }
+
+
$profile_owner = 0;
$page_writeable = false;
$live_update_div = '';
@@ -497,10 +511,27 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
// "New Item View" on network page or search page results
// - just loop through the items and format them minimally for display
+
+
+
+
//$tpl = get_markup_template('search_item.tpl');
$tpl = 'search_item.tpl';
foreach($items as $item) {
+
+ if($arr_blocked) {
+ $blocked = false;
+ foreach($arr_blocked as $b) {
+ if(($b) && ($item['author_xchan'] == $b)) {
+ $blocked = true;
+ break;
+ }
+ }
+ if($blocked)
+ continue;
+ }
+
$threadsid++;
$comment = '';
@@ -672,6 +703,18 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
$threads = array();
foreach($items as $item) {
+ if($arr_blocked) {
+ $blocked = false;
+ foreach($arr_blocked as $b) {
+ if(($b) && ($item['author_xchan'] == $b)) {
+ $blocked = true;
+ break;
+ }
+ }
+ if($blocked)
+ continue;
+ }
+
// Can we put this after the visibility check?
like_puller($a,$item,$alike,'like');