diff options
author | friendica <info@friendica.com> | 2013-01-24 20:05:23 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-24 20:05:23 -0800 |
commit | 99c40ce388fe7666e38372fd1d0006cff7f7fcc8 (patch) | |
tree | f2d5073dd8a2c9cf5c4d4f6ea1bdb22adad920ef | |
parent | 566dd55146c52e8a4dbb0f5e5a6156f3e7fc9c3b (diff) | |
download | volse-hubzilla-99c40ce388fe7666e38372fd1d0006cff7f7fcc8.tar.gz volse-hubzilla-99c40ce388fe7666e38372fd1d0006cff7f7fcc8.tar.bz2 volse-hubzilla-99c40ce388fe7666e38372fd1d0006cff7f7fcc8.zip |
check comment permissions against observer, unbold email subject links for read messages
-rw-r--r-- | include/ItemObject.php | 28 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 1 |
2 files changed, 13 insertions, 16 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index b6f1e53a4..37b9b4a83 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -512,29 +512,26 @@ class Item extends BaseObject { * _ false on failure */ private function get_comment_box($indent) { + if(!$this->is_toplevel() && !get_config('system','thread_allow')) { return ''; } $comment_box = ''; $conv = $this->get_conversation(); - $template = get_markup_template($this->get_comment_box_template()); - $ww = ''; - if( ($conv->get_mode() === 'network') && $this->is_wall_to_wall() ) - $ww = 'ww'; + + $observer = get_app()->get_observer(); + if(! perm_is_allowed($conv->get_profile_owner(),$observer['xchan_hash'],'post_comments')) + return ''; if($conv->is_writable() && $this->is_writable()) { + $template = get_markup_template($this->get_comment_box_template()); + $a = $this->get_app(); - $qc = $qcomment = null; - - /* - * Hmmm, code depending on the presence of a particular plugin? - * This should be better if done by a hook - */ - if(in_array('qcomment',$a->plugins)) { - $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null); - $qcomment = (($qc) ? explode("\n",$qc) : null); - } + + $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null); + $qcomment = (($qc) ? explode("\n",$qc) : null); + $comment_box = replace_macros($template,array( '$return_path' => '', '$threaded' => $this->is_threaded(), @@ -559,8 +556,7 @@ class Item extends BaseObject { '$edvideo' => t('Video'), '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''), '$indent' => $indent, - '$sourceapp' => t($a->sourcename), - '$ww' => (($conv->get_mode() === 'network') ? $ww : '') + '$sourceapp' => get_app()->sourcename )); } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 7302891e5..91aa38618 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2244,6 +2244,7 @@ tr.mceLast { margin-top: 10px; } a.mail-list-link { + font-weight: normal; display: block; font-size: 1.3em; padding: 4px 0; |