diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Channel_calendar.php | 22 | ||||
-rw-r--r-- | Zotlabs/Module/Display.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 12 |
3 files changed, 9 insertions, 27 deletions
diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index a600adbfa..67e6557f9 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -125,10 +125,6 @@ class Channel_calendar extends \Zotlabs\Web\Controller { } //goaway($onerror_url); } - - // $share = ((intval($_POST['distr'])) ? intval($_POST['distr']) : 0); - - $share = 1; $channel = \App::get_channel(); @@ -152,23 +148,10 @@ class Channel_calendar extends \Zotlabs\Web\Controller { $created = $x[0]['created']; $edited = datetime_convert(); - - if($x[0]['allow_cid'] === '<' . $channel['channel_hash'] . '>' - && $x[0]['allow_gid'] === '' && $x[0]['deny_cid'] === '' && $x[0]['deny_gid'] === '') { - $share = false; - } - else { - $share = true; - } } else { $created = $edited = datetime_convert(); - if($share) { - $acl->set_from_array($_POST); - } - else { - $acl->set(array('allow_cid' => '<' . $channel['channel_hash'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '')); - } + $acl->set_from_array($_POST); } $post_tags = array(); @@ -239,8 +222,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller { } } - if($share) - \Zotlabs\Daemon\Master::Summon(array('Notifier','event',$item_id)); + \Zotlabs\Daemon\Master::Summon(array('Notifier','event',$item_id)); killme(); diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index b7d4a5922..5983578b3 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -265,7 +265,7 @@ class Display extends \Zotlabs\Web\Controller { $sysid = $sys['channel_id']; if(local_channel()) { - $r = q("SELECT item.parent as item_id from item WHERE uid = %d and mid = '%s' $item_normal limit 1", + $r = q("SELECT item.id as item_id from item WHERE uid = %d and mid = '%s' $item_normal limit 1", intval(local_channel()), dbesc($target_item['parent_mid']) ); diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 11ce1d268..93df95f49 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -329,13 +329,13 @@ class Item extends Controller { $obj_type = ACTIVITY_OBJ_COMMENT; if($parent) { - // Get commented post data - $rr = q("SELECT parent, mid FROM item WHERE id = %d LIMIT 1", + // Get replied comment data + $reply = q("SELECT parent, mid FROM item WHERE id = %d LIMIT 1", intval($parent) ); // and its parent $r = q("SELECT * FROM item WHERE id = %d LIMIT 1", - intval($rr[0]['parent']) + intval($reply[0]['parent']) ); } elseif($parent_mid && $uid) { @@ -379,7 +379,7 @@ class Item extends Controller { // multi-level threading - preserve the info but re-parent to our single level threading - $thr_parent = $parent_mid; + $thr_parent = $reply[0]['mid']; $route = $parent_item['route']; @@ -915,7 +915,7 @@ class Item extends Controller { } if($parent_item) - $parent_mid = $rr[0]['mid']; + $parent_mid = $parent_item['mid']; // Fallback so that we alway have a thr_parent @@ -1164,7 +1164,7 @@ class Item extends Controller { 'verb' => ACTIVITY_POST, 'otype' => 'item', 'parent' => $parent, - 'parent_mid' => $rr[0]['mid'] + 'parent_mid' => $parent_item['mid'] )); } |