Authored by xiaofeng.yao@yoho.cn

Merge branch 'release'

@@ -34,7 +34,7 @@ $this->title = '管理后台首页'; @@ -34,7 +34,7 @@ $this->title = '管理后台首页';
34 34
35 <script> 35 <script>
36 $(function(){ 36 $(function(){
37 - $('#import').click(function(){ 37 + $('#import').live("click",function(){
38 var offset = $('#offset').val(); 38 var offset = $('#offset').val();
39 var limit = $('#limit').val(); 39 var limit = $('#limit').val();
40 var loading_html = "<img src='/images/loaders/loader6.gif'>"; 40 var loading_html = "<img src='/images/loaders/loader6.gif'>";
@@ -100,7 +100,7 @@ class LivingController extends BaseController @@ -100,7 +100,7 @@ class LivingController extends BaseController
100 $keys[] = sprintf("%s:online_nums_room_%s",Yii::$app->params['cache_prefix'],$row['room_id']); 100 $keys[] = sprintf("%s:online_nums_room_%s",Yii::$app->params['cache_prefix'],$row['room_id']);
101 } 101 }
102 102
103 - $values = call_user_func_array(array(Yii::$app->redisIm,'mget'), $keys); 103 + $keys ? call_user_func_array(array(Yii::$app->redisIm,'mget'), $keys) : [];
104 foreach ($values as $k=>$value){ 104 foreach ($values as $k=>$value){
105 $_ret[$k]['audience_num'] = (int)($value ? : $_ret[$k]['audience_num']); 105 $_ret[$k]['audience_num'] = (int)($value ? : $_ret[$k]['audience_num']);
106 } 106 }
@@ -183,7 +183,7 @@ class LivingController extends BaseController @@ -183,7 +183,7 @@ class LivingController extends BaseController
183 foreach ($_ret as $k=>$row){ 183 foreach ($_ret as $k=>$row){
184 $keys[] = sprintf("%svideo_id_%s_audience_num",Yii::$app->params['cache_prefix'],$row['video_id']); 184 $keys[] = sprintf("%svideo_id_%s_audience_num",Yii::$app->params['cache_prefix'],$row['video_id']);
185 } 185 }
186 - $values = call_user_func_array(array(Yii::$app->redis,'mget'), $keys); 186 + $keys ? call_user_func_array(array(Yii::$app->redis,'mget'), $keys) : [];
187 foreach ($values as $k=>$value){ 187 foreach ($values as $k=>$value){
188 $_ret[$k]['audience_num'] = (int)($value ? : $_ret[$k]['audience_num']); 188 $_ret[$k]['audience_num'] = (int)($value ? : $_ret[$k]['audience_num']);
189 } 189 }