From 8b2c6cea2fff52579ea93349a91bf2d25b15ea64 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 12 May 2025 14:37:41 +0700 Subject: [PATCH] fix issues --- include/functions.php | 5 +++-- include/globalfunctions.php | 2 +- lang/cht/lang_mybonus.php | 3 +++ lang/en/lang_mybonus.php | 3 +++ nexus/Install/Update.php | 2 ++ nexus/Install/settings.default.php | 3 +++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/functions.php b/include/functions.php index e9f5c8ca..9a8d4f73 100644 --- a/include/functions.php +++ b/include/functions.php @@ -156,8 +156,9 @@ function print_attachment($dlkey, $enableimage = true, $imageresizer = true) // else{ // $url = $httpdirectory_attachment."/".$row['location']; // } - $url = \Nexus\Attachment\Storage::getDriver($row['driver'])->getImageUrl($row['location']); - do_log(sprintf("driver: %s, location: %s, url: %s", $row['driver'], $row['location'], $url)); + $driver = $row['driver'] ?? 'local'; + $url = \Nexus\Attachment\Storage::getDriver($driver)->getImageUrl($row['location']); + do_log(sprintf("driver: %s, location: %s, url: %s", $driver, $row['location'], $url)); if($imageresizer == true) $onclick = " onclick=\"Previewurl('".$url."')\""; else $onclick = ""; diff --git a/include/globalfunctions.php b/include/globalfunctions.php index a953e315..bf40545e 100644 --- a/include/globalfunctions.php +++ b/include/globalfunctions.php @@ -209,7 +209,7 @@ function do_log($log, $level = 'info', $echo = false) } } $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - $dt = DateTime::createFromFormat('U.u', microtime(true)); + $dt = DateTime::createFromFormat('U.u', sprintf('%.6f', microtime(true))); $dt->setTimezone(new DateTimeZone(nexus_env('TIMEZONE', 'UTC'))); $content = sprintf( "[%s] [%s] [%s] [%s] [%s] [%s] %s.%s %s:%s %s%s%s %s%s", diff --git a/lang/cht/lang_mybonus.php b/lang/cht/lang_mybonus.php index 70de0144..6ba596b9 100644 --- a/lang/cht/lang_mybonus.php +++ b/lang/cht/lang_mybonus.php @@ -168,6 +168,9 @@ $lang_mybonus = array 'text_success_buy_change_username_card' => "祝賀你,成功購買了改名卡!", 'text_change_username_card_already_has' => '已經擁有改名卡', 'text_rainbow_id_already_valid_forever' => '已永久擁有彩虹 ID', + 'text_get_by_medal' => '勛章加成每小時將額外得到如下的魔力值', + 'medal_additional_desc' => '勛章獎勵計算公式同上,不考慮低保', + 'medal_additional_factor' => '最終獎勵為計算所得勛章獎勵乘以勛章加成系數,當前勛章加成系數為: ', ); ?> diff --git a/lang/en/lang_mybonus.php b/lang/en/lang_mybonus.php index db01bbb5..aafae061 100644 --- a/lang/en/lang_mybonus.php +++ b/lang/en/lang_mybonus.php @@ -168,6 +168,9 @@ where