mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 08:18:41 +00:00
style(web/app/controllers): subfolder move command as a single line
8 lines are too much. Why not make it into one line?
This commit is contained in:
parent
a522d58f1d
commit
50f26075ac
@ -58,14 +58,7 @@
|
|||||||
if ($zip->open($up_filename) === TRUE){
|
if ($zip->open($up_filename) === TRUE){
|
||||||
$zip->extractTo("/var/uoj_data/upload/{$problem['id']}");
|
$zip->extractTo("/var/uoj_data/upload/{$problem['id']}");
|
||||||
$zip->close();
|
$zip->close();
|
||||||
exec(
|
exec("cd /var/uoj_data/upload/{$problem['id']}; for sub_dir in `find -maxdepth 1 -type d ! -name .`; do mv -f \$sub_dir/* . && rm -rf \$sub_dir; done");
|
||||||
<<<EOD
|
|
||||||
cd /var/uoj_data/upload/$problem['id']
|
|
||||||
for sub_dir in `find -maxdepth 1 -type d ! -name .`; do
|
|
||||||
mv -f \$sub_dir/* . && rm -rf \$sub_dir
|
|
||||||
done
|
|
||||||
EOD
|
|
||||||
);
|
|
||||||
echo "<script>alert('上传成功!')</script>";
|
echo "<script>alert('上传成功!')</script>";
|
||||||
}else{
|
}else{
|
||||||
$errmsg = "解压失败!";
|
$errmsg = "解压失败!";
|
||||||
|
Loading…
Reference in New Issue
Block a user