From 83cadfe77c0010b500e9a01726ba115be230ef82 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Thu, 11 Aug 2022 20:47:02 +0800 Subject: [PATCH] fix change username card useage --- README-EN.md | 3 ++- README.md | 3 ++- nexus/Install/Install.php | 2 +- public/userdetails.php | 16 +++++++++++----- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README-EN.md b/README-EN.md index 02652952..8dfc8afd 100644 --- a/README-EN.md +++ b/README-EN.md @@ -15,6 +15,7 @@ Complete PT website building solution. Based on NexusPHP + Laravel + Filament. - Attendance - Retroactive attendance card - Medal +- Props - Custom tags - SeedBox rule - Forum @@ -36,7 +37,7 @@ Complete PT website building solution. Based on NexusPHP + Laravel + Filament. ## System Requirements - PHP: 8.0, must have extensions: bcmath, ctype, curl, fileinfo, json, mbstring, openssl, pdo_mysql, tokenizer, xml, mysqli, gd, redis, pcntl, sockets, posix, gmp - Mysql: 5.7 latest version or above -- Redis:2.0.0 or above +- Redis:2.6.12 or above ## Quick Start Install docker. diff --git a/README.md b/README.md index 96d8429e..6265bfb4 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - 签到 - 补签卡 - 勋章 +- 道具 - 自定义标签 - 盒子规则 - 论坛 @@ -35,7 +36,7 @@ ## 系统要求 - PHP: 8.0,必须扩展:bcmath, ctype, curl, fileinfo, json, mbstring, openssl, pdo_mysql, tokenizer, xml, mysqli, gd, redis, pcntl, sockets, posix, gmp - Mysql: 5.7 最新版或以上版本 -- Redis:2.0.0 或以上版本 +- Redis:2.6.12 或以上版本 ## 快速开始 安装 docker。 diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 7f7c8c08..33c79f50 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -668,7 +668,7 @@ class Install $redis = NexusDB::redis(); $result = $redis->info(); $version = $result['redis_version']; - $match = version_compare($version, '2.0.0', '>='); + $match = version_compare($version, '2.6.12', '>='); return compact('version', 'match'); } diff --git a/public/userdetails.php b/public/userdetails.php index 6f63c751..f0719c33 100644 --- a/public/userdetails.php +++ b/public/userdetails.php @@ -313,11 +313,16 @@ if ($metas->has($metaKey)) { $triggerId = "consume-$metaKey"; $changeUsernameCards = $metas->get($metaKey); $cardName = $changeUsernameCards->first()->meta_key_text; + $useInput = ''; + if ($CURUSER['id'] == $user['id']) { + $useInput = sprintf('', $lang_userdetails['consume'], $triggerId); + } $props[] = sprintf( - '
[%s](%s)
', - $cardName, $changeUsernameCards->count(), $lang_userdetails['consume'], $triggerId + '
[%s](%s)
%s', + $cardName, $changeUsernameCards->count(), $useInput ); - $consumeChangeUsernameForm = <<
@@ -328,7 +333,7 @@ if ($metas->has($metaKey)) {
HTML; - $consumeChangeUsernameJs = <<