diff options
author | friendica <info@friendica.com> | 2013-03-06 18:52:42 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-03-06 18:52:42 -0800 |
commit | 3d299f066eafbba2a9f5b3f2fd369492a271b27d (patch) | |
tree | 5195d1776013647a6f7f10924b8415a0be5245e5 /include | |
parent | 5a9dae78a2839d8d466a5c3ecda9e83cf1f4c50c (diff) | |
download | volse-hubzilla-3d299f066eafbba2a9f5b3f2fd369492a271b27d.tar.gz volse-hubzilla-3d299f066eafbba2a9f5b3f2fd369492a271b27d.tar.bz2 volse-hubzilla-3d299f066eafbba2a9f5b3f2fd369492a271b27d.zip |
fix comment permissions on display (again) and clean up an error seen in the logs
Diffstat (limited to 'include')
-rw-r--r-- | include/ConversationObject.php | 9 | ||||
-rw-r--r-- | include/zot.php | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/ConversationObject.php b/include/ConversationObject.php index 307cb2d17..7cf39f757 100644 --- a/include/ConversationObject.php +++ b/include/ConversationObject.php @@ -47,7 +47,10 @@ class Conversation extends BaseObject { $this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments'); break; case 'display': - $this->profile_owner = $a->profile['uid']; + // in this mode we set profile_owner after initialisation (from conversation()) and then + // pull some trickery which allows us to re-invoke this function afterward + // it's an ugly hack so FIXME +// $this->profile_owner = $a->profile['uid']; $this->writable = perm_is_allowed($this->profile_owner,$ob_hash,'post_comments'); break; case 'page': @@ -60,6 +63,7 @@ class Conversation extends BaseObject { break; } $this->mode = $mode; + } /** @@ -92,6 +96,9 @@ class Conversation extends BaseObject { public function set_profile_owner($uid) { $this->profile_owner = $uid; + $mode = $this->get_mode(); + $this->mode = null; + $this->set_mode($mode); } diff --git a/include/zot.php b/include/zot.php index 7be46434a..1cf34170e 100644 --- a/include/zot.php +++ b/include/zot.php @@ -832,7 +832,7 @@ function allowed_public_recips($msg) { $condensed_recips[] = $rr['hash']; $results = array(); - $r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_hash = '%s' ", + $r = q("select channel_hash as hash from channel left join abook on abook_channel = channel_id where abook_xchan = '%s' ", dbesc($hash) ); if($r) { |