diff --git a/sk-admin/view/user/edit.php b/sk-admin/view/user/edit.php
index 6ad2ba139fa1108086dda78d7f031ecb07dc8a2c..9b90eaab322f4c32f2cb61289e96ae9b610e8c4c 100644
--- a/sk-admin/view/user/edit.php
+++ b/sk-admin/view/user/edit.php
@@ -66,8 +66,8 @@ if (isset($_GET['uid'])) {
角色
@@ -79,8 +79,8 @@ if (isset($_GET['uid'])) {
状态
diff --git a/sk-include/app/controller/api.php b/sk-include/app/controller/api.php
index dc9ea697303772701bba9b781db5855fbfb8d8bb..3f8e76b6b8b42d381f1d03a6a7306667cc354838 100644
--- a/sk-include/app/controller/api.php
+++ b/sk-include/app/controller/api.php
@@ -89,7 +89,6 @@ class Api extends FrameWork
} else {
jsonMsg(403, '权限不足!');
}
- break;
case 'add':
case 'edit':
if (!isset($_POST) && !is_array($_POST)) jsonMsg(403, '参数错误');
@@ -251,7 +250,6 @@ class Api extends FrameWork
} else {
jsonMsg(403, '权限不足!');
}
- break;
case 'add':
case 'edit':
if (!isset($_POST) && !is_array($_POST)) jsonMsg(403, '参数错误');
@@ -370,7 +368,6 @@ class Api extends FrameWork
} else {
jsonMsg(403, '权限不足!');
}
- break;
case 'add':
// 验证数据合法性
if (is_array(Utils::DecodeRequestData('POST', 'data'))) {
@@ -527,7 +524,6 @@ class Api extends FrameWork
} else {
jsonMsg(403, '权限不足!');
}
- break;
case 'add':
case 'edit':
if (!isset($_POST) && !is_array($_POST)) jsonMsg(403, '参数错误');
@@ -788,10 +784,8 @@ class Api extends FrameWork
} else {
exit(json_encode(['code' => 500, 'msg' => '更新包下载失败']));
}
- break;
default:
exit(json_encode(array('code' => 400, 'msg' => '操作失败', 'error' => null)));
- break;
}
}
diff --git a/sk-include/core/FrameWork.php b/sk-include/core/FrameWork.php
index 7d55254541db4e9163281008eb75936c1a574c94..8d738a60b244e53856457deb9c5dc243aa1af703 100644
--- a/sk-include/core/FrameWork.php
+++ b/sk-include/core/FrameWork.php
@@ -17,6 +17,7 @@ use ReflectionClass;
use FrameWork\User\User;
use FrameWork\View\View;
use FrameWork\Plugin\Plugin;
+use Exception;
class FrameWork
{
@@ -351,17 +352,14 @@ class Utils
} else {
return false;
}
- break;
case 'POST':
if (isset($_POST[$key])) {
return json_decode(base64_decode($_POST[$key]), true);
} else {
return false;
}
- break;
default:
return false;
- break;
}
} else {
return false;
diff --git a/sk-include/core/inc/File.php b/sk-include/core/inc/File.php
index de3f28c833440fe822fa289ec8d639a885c77a8a..2a0426706b87380ef60fdb522ab27d7b42276581 100644
--- a/sk-include/core/inc/File.php
+++ b/sk-include/core/inc/File.php
@@ -13,6 +13,7 @@
namespace FrameWork\File;
use FrameWork\FrameWork;
+use Exception;
class File
{
diff --git a/sk-include/core/inc/plugin.php b/sk-include/core/inc/plugin.php
index fcb8bbf5a1727179cc442a5c1aa6bf817eead8f5..ab82d51aa7a4a51a0c70963dd9551794424553dc 100644
--- a/sk-include/core/inc/plugin.php
+++ b/sk-include/core/inc/plugin.php
@@ -12,6 +12,7 @@
namespace FrameWork\Plugin;
use FrameWork\FrameWork;
+use Illuminate\Support\Facades\Storage;
class Plugin
{
@@ -88,7 +89,7 @@ class Plugin
if (is_dir($path)) {
$files = array_diff(scandir($path), array('.', '..'));
foreach ($files as $file) {
- (is_dir("$path/$file")) ? deleteDirectory("$path/$file") : unlink("$path/$file");
+ (is_dir("$path/$file")) ? Storage::deleteDirectory("$path/$file") : unlink("$path/$file");
}
return rmdir($path);
}
diff --git a/sk-include/core/inc/user.php b/sk-include/core/inc/user.php
index d1f2c998b81222687b9bfe819df6d647708767d2..2a001d0f202c95a235298c104d3c568e19760fd7 100644
--- a/sk-include/core/inc/user.php
+++ b/sk-include/core/inc/user.php
@@ -14,6 +14,7 @@ namespace FrameWork\User;
use Illuminate\Database\Capsule\Manager as DB;
use FrameWork\FrameWork;
+use Exception;
class User
{
diff --git a/sk-include/core/inc/view.php b/sk-include/core/inc/view.php
index 25ca63b5629d65e57ebf5a36e4541d5f0b273498..705e7b96ab9f37c145a64e7fe351c93639653a7d 100644
--- a/sk-include/core/inc/view.php
+++ b/sk-include/core/inc/view.php
@@ -166,7 +166,7 @@ class View
$data = toArray(Db::table('sk_content')->where('cid', $cid)->get());
break;
default:
- self::WARNING(0, "在调用模板方法时产生错误【View::query】,没有方法【' . $a . '】'");
+ FrameWork::WARNING(0, "在调用模板方法时产生错误【View::query】,没有方法【' . $a . '】'");
break;
}
return $data;
diff --git a/sk-include/static/js/sharkcms.min.js b/sk-include/static/js/sharkcms.min.js
index ee3efc64c65aed98739b117e2d2d6074c231e691..7805f6245b36feced9cf69d8199929de4a341618 100644
--- a/sk-include/static/js/sharkcms.min.js
+++ b/sk-include/static/js/sharkcms.min.js
@@ -9,7 +9,7 @@ sk.getData = function () {
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
- strs = str.split("&");
+ var strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
}