|
@@ -259,17 +259,17 @@ class TranslateLogic extends BaseLogic |
|
@@ -259,17 +259,17 @@ class TranslateLogic extends BaseLogic |
|
259
|
// try {
|
259
|
// try {
|
|
260
|
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
|
260
|
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
|
|
261
|
if($info === false){
|
261
|
if($info === false){
|
|
262
|
- $data = $this->getRouteSource($this->param['url']);
|
262
|
+ $sourceInfo = $this->getRouteSource($this->param['url']);
|
|
263
|
$param = [
|
263
|
$param = [
|
|
264
|
'type'=>$this->param['type'],
|
264
|
'type'=>$this->param['type'],
|
|
265
|
'project_id'=>$this->user['project_id'],
|
265
|
'project_id'=>$this->user['project_id'],
|
|
266
|
'url'=>str_replace_url($this->param['url']),
|
266
|
'url'=>str_replace_url($this->param['url']),
|
|
267
|
'language_id'=>$this->param['language_id'],
|
267
|
'language_id'=>$this->param['language_id'],
|
|
268
|
'alias'=>$this->param['alias'],
|
268
|
'alias'=>$this->param['alias'],
|
|
269
|
- 'source'=>$data['source'],
|
|
|
|
270
|
- 'source_id'=>$data['source_id'],
|
|
|
|
271
|
- 'is_list'=>$data['is_list'],
|
|
|
|
272
|
- 'is_custom'=>$data['is_custom']
|
269
|
+ 'source'=>$sourceInfo['source'],
|
|
|
|
270
|
+ 'source_id'=>$sourceInfo['source_id'],
|
|
|
|
271
|
+ 'is_list'=>$sourceInfo['is_list'],
|
|
|
|
272
|
+ 'is_custom'=>$sourceInfo['is_custom']
|
|
273
|
];
|
273
|
];
|
|
274
|
$param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
274
|
$param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
275
|
$rs = $this->model->add($param);
|
275
|
$rs = $this->model->add($param);
|