Alliance forum fixes part 5

+Confederation and shared forums are now visible to the confederation
alliances or selected alliances/users
+Sticked topics are now displayed first
+Fixed a bug that permitted to add confederated alliances/users to
shared forums
+Minor bug fixing
This commit is contained in:
iopietro
2018-05-20 21:45:14 +02:00
parent 807b684e29
commit 3a14da51e0
7 changed files with 175 additions and 47 deletions
+6 -3
View File
@@ -70,10 +70,11 @@ class Session {
var $bonus3 = 0;
var $bonus4 = 0;
var $timer = 0;
var $sharedForums = [];
var $checker, $mchecker;
public $userinfo = array();
private $userarray = array();
var $villages = array();
public $userinfo = [];
private $userarray = [];
var $villages = [];
function __construct() {
global $database; //TienTN fix
@@ -238,6 +239,7 @@ class Session {
private function PopulateVar() {
global $database;
$this->userarray = $this->userinfo = $database->getUserArray($_SESSION['username'], 0);
$this->username = $this->userarray['username'];
$this->uid = $_SESSION['id_user'] = $this->userarray['id'];
@@ -257,6 +259,7 @@ class Session {
$this->cp = floor($this->userarray['cp']);
$this->gold = $this->userarray['gold'];
$this->oldrank = $this->userarray['oldrank'];
$this->sharedForums = $database->getSharedForums($this->uid, $this->alliance);
$_SESSION['ok'] = $this->userarray['ok'];
if($this->userarray['b1'] > $this->time) {
$this->bonus1 = 1;