make discover items interactive
This commit is contained in:
@@ -52,14 +52,14 @@ class Conversation extends BaseObject {
|
||||
|
||||
switch($mode) {
|
||||
case 'network':
|
||||
if(array_key_exists('firehose',$a->data) && intval($a->data['firehose'])) {
|
||||
$this->profile_owner = intval($a->data['firehose']);
|
||||
$this->writable = false;
|
||||
}
|
||||
else {
|
||||
// if(array_key_exists('firehose',$a->data) && intval($a->data['firehose'])) {
|
||||
// $this->profile_owner = intval($a->data['firehose']);
|
||||
// $this->writable = false;
|
||||
// }
|
||||
// else {
|
||||
$this->profile_owner = local_user();
|
||||
$this->writable = true;
|
||||
}
|
||||
// }
|
||||
break;
|
||||
case 'channel':
|
||||
$this->profile_owner = $a->profile['profile_uid'];
|
||||
|
||||
+10
-2
@@ -101,11 +101,19 @@ class Item extends BaseObject {
|
||||
else
|
||||
$edpost = false;
|
||||
|
||||
|
||||
if($observer['xchan_hash'] == $this->get_data_value('author_xchan')
|
||||
|| $observer['xchan_hash'] == $this->get_data_value('owner_xchan')
|
||||
|| $this->get_data_value('uid') == local_user())
|
||||
$dropping = true;
|
||||
|
||||
|
||||
if(array_key_exists('real_uid',$item)) {
|
||||
$edpost = false;
|
||||
$dropping = false;
|
||||
}
|
||||
|
||||
|
||||
if($dropping) {
|
||||
$drop = array(
|
||||
'dropping' => $dropping,
|
||||
@@ -119,7 +127,7 @@ class Item extends BaseObject {
|
||||
);
|
||||
}
|
||||
|
||||
$filer = (($conv->get_profile_owner() == local_user()) ? t("Save to Folder") : false);
|
||||
$filer = ((($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) ? t("Save to Folder") : false);
|
||||
|
||||
$profile_avatar = $item['author']['xchan_photo_m'];
|
||||
$profile_link = chanlink_url($item['author']['xchan_url']);
|
||||
@@ -163,7 +171,7 @@ class Item extends BaseObject {
|
||||
|
||||
if($this->is_toplevel()) {
|
||||
// FIXME check this permission
|
||||
if($conv->get_profile_owner() == local_user()) {
|
||||
if(($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) {
|
||||
|
||||
// FIXME we don't need all this stuff, some can be done in the template
|
||||
|
||||
|
||||
@@ -1230,11 +1230,19 @@ function add_children_to_list($children, &$arr) {
|
||||
}
|
||||
}
|
||||
|
||||
function conv_sort($arr,$order) {
|
||||
function conv_sort($arr,$order,$uid = 0) {
|
||||
|
||||
if((!(is_array($arr) && count($arr))))
|
||||
return array();
|
||||
|
||||
if($uid) {
|
||||
for($x = 0; $x < count($arr); $x ++) {
|
||||
$arr[$x]['real_uid'] = $arr[$x]['uid'];
|
||||
$arr[$x]['uid'] = $uid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$parents = array();
|
||||
$children = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user