Commit 5f91bd8d authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/explore' into 'master'

fix See merge request !210
parents 5ca09605 344ee7f9
......@@ -31,15 +31,10 @@ class ExploreAppController extends BaseController
$model->setScenario(ExploreAppCategory::SCENARIOS_CREATE);
$params = Yii::$app->request->post();
$params['platform_id'] = $platform_id;
$lang = [
'zh-CN',
'en-US',
'ja'
];
$name_arr = $params['name'];
$name = [];
foreach ($lang as $key => $val) {
foreach (Yii::$app->params['lang'] as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
......@@ -108,15 +103,10 @@ class ExploreAppController extends BaseController
$model->setScenario(ExploreAppCategory::SCENARIOS_UPDATE);
unset($params['id']);
$params['platform_id'] = $platform_id;
$lang = [
'zh-CN',
'en-US',
'ja'
];
$name_arr = $params['name'];
$name = [];
foreach ($lang as $key => $val) {
foreach (Yii::$app->params['lang'] as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
......@@ -212,15 +202,10 @@ class ExploreAppController extends BaseController
$model->setScenario(ExploreApp::SCENARIOS_CREATE);
$params = Yii::$app->request->post();
$params['platform_id'] = $platform_id;
$lang = [
'zh-CN',
'en-US',
'ja'
];
$name_arr = $params['name'];
$name = [];
foreach ($lang as $key => $val) {
foreach (Yii::$app->params['lang'] as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
......@@ -270,15 +255,10 @@ class ExploreAppController extends BaseController
$model->setScenario(ExploreApp::SCENARIOS_UPDATE);
unset($params['id']);
$params['platform_id'] = $platform_id;
$lang = [
'zh-CN',
'en-US',
'ja'
];
$name_arr = $params['name'];
$name = [];
foreach ($lang as $key => $val) {
foreach (Yii::$app->params['lang'] as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
......
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