add sandbox

This commit is contained in:
joyqi
2021-09-04 21:12:14 +08:00
parent f40c5c178e
commit 675efe1e43
11 changed files with 237 additions and 84 deletions
+5 -1
View File
@@ -5,6 +5,7 @@ namespace Utils;
use Typecho\Common;
use Typecho\Db;
use Typecho\Exception;
use Typecho\Widget\Sandbox;
use Widget\Options;
use Widget\Themes\Edit;
use Widget\Upload;
@@ -962,7 +963,10 @@ Typecho_Date::setTimezoneOffset($options->timezone);
*/
public static function v0_8r10_5_17($db, $options)
{
Edit::alloc(null, 'change=' . $options->theme, false)->action();
Sandbox::factory('change=' . $options->theme)
->run(function () {
Edit::alloc()->action();
});
}