1
This commit is contained in:
parent
361b7f7423
commit
980ac0ca85
@ -6,6 +6,7 @@ class BaseController {
|
||||
|
||||
private $nowtime = 0;
|
||||
private $marketDbConn = null;
|
||||
private $relationDbConn = null;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
@ -126,18 +127,18 @@ class BaseController {
|
||||
|
||||
public function _getRelationDbMysql()
|
||||
{
|
||||
if ($this->marketDbConn) {
|
||||
return $this->marketDbConn;
|
||||
if ($this->relationDbConn) {
|
||||
return $this->relationDbConn;
|
||||
}
|
||||
$mysql_conf = getMarketMysqlConfig(crc32(''));
|
||||
$this->marketDbConn = new phpcommon\Mysql(array(
|
||||
$this->relationDbConn = new phpcommon\Mysql(array(
|
||||
'host' => $mysql_conf['host'],
|
||||
'port' => $mysql_conf['port'],
|
||||
'user' => $mysql_conf['user'],
|
||||
'passwd' => $mysql_conf['passwd'],
|
||||
'dbname' => getXVal($mysql_conf, 'dbname', 'relationdb1')
|
||||
));
|
||||
return $this->marketDbConn;
|
||||
return $this->relationDbConn;
|
||||
}
|
||||
|
||||
|
||||
|
@ -166,14 +166,10 @@ class EventRankingController extends BaseAuthedController
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$ranked += 1;
|
||||
|
||||
// $guildDb = null;
|
||||
if (!$userInfo['guild_id']){
|
||||
$this->myRanked['guild'] = array();
|
||||
error_log('*********************************************************');
|
||||
error_log(json_encode($this->myRanked));
|
||||
}
|
||||
$guildDb = null;
|
||||
$guildDb = Guild::find($userInfo['guild_id']);
|
||||
if($userInfo['guild_id'] && $userInfo['guild_id'] == $row['guild_id']){
|
||||
// $guildDb = Guild::find($row['guild_id']);
|
||||
$this->myRanked['ranked'] = $ranked;
|
||||
|
Loading…
x
Reference in New Issue
Block a user