General fixes

+Fixed a bug that permitted to create threads and post in closed forums
(only who have the permission to manage the forum can do that)
+Fixed a bug that permitted to write posts to closed threads
+Fixed a bug that permitted to view not shared forums under certain
circumnstances
This commit is contained in:
iopietro
2018-05-30 20:10:59 +02:00
parent f40d43b6e6
commit d171ac02cc
6 changed files with 26 additions and 12 deletions
+5 -5
View File
@@ -2268,8 +2268,8 @@ class MYSQLi_DB implements IDbConnection {
'%$alliance,%'
OR
display_to_alliances
LIKE
'%$alliance%'
=
'$alliance'
OR
display_to_users
LIKE
@@ -2284,8 +2284,8 @@ class MYSQLi_DB implements IDbConnection {
'%$uid,%'
OR
display_to_users
LIKE
'%$uid%'
=
'$uid'
";
$result = mysqli_query($this->dblink, $q);
if(!empty($result)){
@@ -2472,7 +2472,7 @@ class MYSQLi_DB implements IDbConnection {
list($id) = $this->escape_input($id);
$q = "SELECT alliance from " . TB_PREFIX . "forum_cat where id = $id LIMIT 1";
$result = mysqli_query($this->dblink,$q);
$result = mysqli_query($this->dblink, $q);
$dbarray = mysqli_fetch_array($result);
return $dbarray['alliance'];
}