1
This commit is contained in:
@@ -386,7 +386,6 @@ class Article extends Controller {
|
|||||||
if (!$rule->check($data)) {
|
if (!$rule->check($data)) {
|
||||||
return jsonError($rule->getError());
|
return jsonError($rule->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||||
if(!is_dir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'))){
|
if(!is_dir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'))){
|
||||||
mkdir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'));
|
mkdir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'));
|
||||||
@@ -409,7 +408,6 @@ class Article extends Controller {
|
|||||||
$co = @copy("http://api.tmrjournals.com/public/articleicon/".$data['icon'],ROOT_PATH.'public'.DS.'articleicon'.DS.date('Ymd').DS.$cfile_name);
|
$co = @copy("http://api.tmrjournals.com/public/articleicon/".$data['icon'],ROOT_PATH.'public'.DS.'articleicon'.DS.date('Ymd').DS.$cfile_name);
|
||||||
$insert['icon'] = date('Ymd').DS.$cfile_name;
|
$insert['icon'] = date('Ymd').DS.$cfile_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($data['file_sub'])&&$data['file_sub']!=''){
|
if(isset($data['file_sub'])&&$data['file_sub']!=''){
|
||||||
$cfile_name = substr($data['file_sub'],strripos($data['file_sub'],'/')+1);
|
$cfile_name = substr($data['file_sub'],strripos($data['file_sub'],'/')+1);
|
||||||
if(!is_dir(ROOT_PATH.'public'.DS.'articleSUB'.DS.date('Ymd'))){
|
if(!is_dir(ROOT_PATH.'public'.DS.'articleSUB'.DS.date('Ymd'))){
|
||||||
@@ -592,6 +590,20 @@ class Article extends Controller {
|
|||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑文章信息
|
||||||
|
*/
|
||||||
|
public function changeArticleForSubmit(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require',
|
||||||
|
'sort'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更改文章客座
|
* 更改文章客座
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user