修复xcat update错误

master
CGDF 8 years ago
parent 6defaac7bd
commit 915b8949d8

@ -9,12 +9,7 @@ use App\Utils\DatatablesHelper;
class Update
{
public static function update()
{
Update::migrateConfig();
}
public static function migrateConfig()
public static function update($xcat)
{
global $System_Config;
$copy_result=copy(BASE_PATH."/config/.config.php",BASE_PATH."/config/.config.php.bak");
@ -33,7 +28,7 @@ class Update
echo('升级ssrdownload结束'.PHP_EOL);
echo('开始升级QQWry...'.PHP_EOL);
XCat::initQQWry();
$xcat->initQQWry();
echo('升级QQWry结束'.PHP_EOL);
echo(PHP_EOL);

@ -88,7 +88,7 @@ class XCat
case("resetAllPort"):
return $this->resetAllPort();
case("update"):
return Update::update();
return Update::update($this);
default:
return $this->defaultAction();
}
@ -205,15 +205,11 @@ class XCat
$user->node_speedlimit=0;
$user->theme=Config::get('theme');
$ga = new GA();
$secret = $ga->createSecret();
$user->ga_token=$secret;
$user->ga_enable=0;
if ($user->save()) {
echo "Successful/添加成功!\n";
return true;

Loading…
Cancel
Save