Commit 2a67a230 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/explore' into 'master'

fix See merge request !213
parents 485ab183 52b7dd64
......@@ -30,7 +30,7 @@ class ExploreController extends BaseController
}
foreach ($app_category_model as $key => $val) {
unset($val->apps);
$val->name = $val->name[$this->lang];
$val->name = isset($val->name[$this->lang]) ? $val->name[$this->lang] : '';
$apps_model = ExploreApp::find()->select('id, name, icon, type, app_url, slogan')
->where(['app_category_id' => (int)$val->id, 'status' => ExploreApp::STATUS_ON])
->orderBy('sort')
......@@ -41,7 +41,7 @@ class ExploreController extends BaseController
continue;
}
foreach ($apps_model as &$app) {
$app->name = $app->name[$this->lang];
$app->name = isset($app->name[$this->lang]) ? $app->name[$this->lang] : '';
}
$val->apps = $apps_model;
unset($val->sort);
......@@ -79,9 +79,9 @@ class ExploreController extends BaseController
}
foreach ($app_category_model as &$val) {
foreach ($val->applications as $app) {
$app->name = $app->name[$this->lang];
$app->name = isset($app->name[$this->lang]) ? $app->name[$this->lang] : '';
}
$val->name = $val->name[$this->lang];
$val->name = isset($val->name[$this->lang]) ? $val->name[$this->lang] : '';
$val->apps = $val->applications;
unset($val->id);
unset($val->sort);
......@@ -124,7 +124,7 @@ class ExploreController extends BaseController
goto doEnd;
}
foreach ($apps_model as &$app) {
$app->name = $app->name[$this->lang];
$app->name = isset($app->name[$this->lang]) ? $app->name[$this->lang] : '';
}
$data = $apps_model;
$msg = 'success';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment