Skip to content
Permalink
Browse files

Fix permissions #136

  • Loading branch information...
adaur committed Jul 10, 2016
1 parent deaec80 commit 87425b1ed44c23319ec414c901f57363ef23a3a5
Showing with 2 additions and 4 deletions.
  1. +1 −2 featherbb/Model/Post.php
  2. +1 −2 featherbb/Model/Topic.php
@@ -35,8 +35,7 @@ public function get_info_post($tid, $fid)
->select_many($cur_posting['select'])
->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f')
->left_outer_join('forum_perms', 'fp.forum_id=f.id AND fp.group_id='.User::get()->g_id, 'fp')
->left_outer_join('topic_subscriptions', array('t.id', '=', 's.topic_id'), 's')
->left_outer_join('topic_subscriptions', array('s.user_id', '=', User::get()->id), null, true)
->left_outer_join('topic_subscriptions', 't.id=s.topic_id AND s.user_id='.User::get()->g_id, 's')
->where_any_is($cur_posting['where'])
->where('t.id', $tid);
@@ -137,8 +137,7 @@ public function get_info_topic($id)
->table_alias('t')
->select_many($select_get_info_topic)
->inner_join('forums', array('f.id', '=', 't.forum_id'), 'f')
->left_outer_join('topic_subscriptions', array('t.id', '=', 's.topic_id'), 's')
->left_outer_join('topic_subscriptions', array('s.user_id', '=', User::get()->id), null, true)
->left_outer_join('topic_subscriptions', 't.id=s.topic_id AND s.user_id='.User::get()->id, 's')
->left_outer_join('forum_perms', 'fp.forum_id=f.id AND fp.group_id='.User::get()->g_id, 'fp')
->where_any_is($cur_topic['where'])
->where('t.id', $id)

0 comments on commit 87425b1

Please sign in to comment.
You can’t perform that action at this time.