mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 02:20:54 +08:00
cache rss + redis require 2.0
This commit is contained in:
@@ -5,7 +5,7 @@ namespace App\Console\Commands;
|
||||
use App\Repositories\ToolRepository;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class BackuAll extends Command
|
||||
class BackupAll extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
@@ -91,6 +91,7 @@ class NexusUpdate extends Command
|
||||
$symbolicLinks = $settingTableRows['symbolic_links'];
|
||||
$fails = $settingTableRows['fails'];
|
||||
$mysqlInfo = $this->update->getMysqlVersionInfo();
|
||||
$redisInfo = $this->update->getRedisVersionInfo();
|
||||
|
||||
if (!empty($fails)) {
|
||||
foreach ($fails as $value) {
|
||||
@@ -102,6 +103,10 @@ class NexusUpdate extends Command
|
||||
$this->doLog("Error: MySQL version: {$mysqlInfo['version']} is too low, please use the newest version of 5.7 or above.", 'error');
|
||||
return 0;
|
||||
}
|
||||
if (!$redisInfo['match']) {
|
||||
$this->doLog("Error: Redis version: {$mysqlInfo['version']} is too low, please use 2.0.0 or above.", 'error');
|
||||
return 0;
|
||||
}
|
||||
$this->doLog("going to createSymbolicLinks...");
|
||||
$this->update->createSymbolicLinks($symbolicLinks);
|
||||
$this->doLog("createSymbolicLinks done!");
|
||||
|
||||
@@ -293,7 +293,7 @@ class ExamRepository extends BaseRepository
|
||||
$logPrefix = "uid: $uid, examId: $examId, begin: $begin, end: $end";
|
||||
$exam = Exam::query()->find($examId);
|
||||
$user = User::query()->findOrFail($uid);
|
||||
if (Auth::user()->Class <= $user->class) {
|
||||
if (Auth::user()->class <= $user->class) {
|
||||
throw new NexusException("No permission !");
|
||||
}
|
||||
if (!$this->isExamMatchUser($exam, $user)) {
|
||||
|
||||
@@ -233,7 +233,7 @@ class UserRepository extends BaseRepository
|
||||
}
|
||||
$sourceField = $fieldMap[$field];
|
||||
$targetUser = User::query()->findOrFail($uid, User::$commonFields);
|
||||
if (Auth::user()->Class <= $targetUser->class) {
|
||||
if (Auth::user()->class <= $targetUser->class) {
|
||||
throw new NexusException("No permission !");
|
||||
}
|
||||
$old = $targetUser->{$sourceField};
|
||||
|
||||
Reference in New Issue
Block a user