mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix issues
This commit is contained in:
@@ -156,8 +156,9 @@ function print_attachment($dlkey, $enableimage = true, $imageresizer = true)
|
|||||||
// else{
|
// else{
|
||||||
// $url = $httpdirectory_attachment."/".$row['location'];
|
// $url = $httpdirectory_attachment."/".$row['location'];
|
||||||
// }
|
// }
|
||||||
$url = \Nexus\Attachment\Storage::getDriver($row['driver'])->getImageUrl($row['location']);
|
$driver = $row['driver'] ?? 'local';
|
||||||
do_log(sprintf("driver: %s, location: %s, url: %s", $row['driver'], $row['location'], $url));
|
$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)
|
if($imageresizer == true)
|
||||||
$onclick = " onclick=\"Previewurl('".$url."')\"";
|
$onclick = " onclick=\"Previewurl('".$url."')\"";
|
||||||
else $onclick = "";
|
else $onclick = "";
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ function do_log($log, $level = 'info', $echo = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
$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')));
|
$dt->setTimezone(new DateTimeZone(nexus_env('TIMEZONE', 'UTC')));
|
||||||
$content = sprintf(
|
$content = sprintf(
|
||||||
"[%s] [%s] [%s] [%s] [%s] [%s] %s.%s %s:%s %s%s%s %s%s",
|
"[%s] [%s] [%s] [%s] [%s] [%s] %s.%s %s:%s %s%s%s %s%s",
|
||||||
|
|||||||
@@ -168,6 +168,9 @@ $lang_mybonus = array
|
|||||||
'text_success_buy_change_username_card' => "祝賀你,成功購買了<b>改名卡</b>!",
|
'text_success_buy_change_username_card' => "祝賀你,成功購買了<b>改名卡</b>!",
|
||||||
'text_change_username_card_already_has' => '已經擁有改名卡',
|
'text_change_username_card_already_has' => '已經擁有改名卡',
|
||||||
'text_rainbow_id_already_valid_forever' => '已永久擁有彩虹 ID',
|
'text_rainbow_id_already_valid_forever' => '已永久擁有彩虹 ID',
|
||||||
|
'text_get_by_medal' => '勛章加成每小時將額外得到如下的魔力值',
|
||||||
|
'medal_additional_desc' => '勛章獎勵計算公式同上,不考慮低保',
|
||||||
|
'medal_additional_factor' => '最終獎勵為計算所得勛章獎勵乘以勛章加成系數,當前勛章加成系數為: ',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -168,6 +168,9 @@ where<ul><li><b>A</b> is an intermediate variable</li><li><b>Ti</b> is the <b>i<
|
|||||||
'text_success_buy_change_username_card' => "Congratulations on your successful purchase of a <b>change username card</b>!",
|
'text_success_buy_change_username_card' => "Congratulations on your successful purchase of a <b>change username card</b>!",
|
||||||
'text_change_username_card_already_has' => 'Already have a change username card',
|
'text_change_username_card_already_has' => 'Already have a change username card',
|
||||||
'text_rainbow_id_already_valid_forever' => 'Already have a permanent Rainbow ID',
|
'text_rainbow_id_already_valid_forever' => 'Already have a permanent Rainbow ID',
|
||||||
|
'text_get_by_medal' => 'Medal bonus will get the following additional bonus value per hour',
|
||||||
|
'medal_additional_desc' => 'Medal bonus calculation formula is the same as above, regardless of minimum guarantee',
|
||||||
|
'medal_additional_factor' => 'The final bonus is the calculated medal bonus multiplied by the medal_additional_factor',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -346,6 +346,8 @@ class Update extends Install
|
|||||||
Artisan::call("upgrade:migrate_torrents_table_text_column");
|
Artisan::call("upgrade:migrate_torrents_table_text_column");
|
||||||
Language::updateTransStatus();
|
Language::updateTransStatus();
|
||||||
$this->addSetting('main.complain_enabled', 'yes');
|
$this->addSetting('main.complain_enabled', 'yes');
|
||||||
|
$this->addSetting('image_hosting.driver', 'local');
|
||||||
|
$this->addSetting('permission.user_token_allowed', json_encode(TokenRepository::listUserTokenPermissions(false)));
|
||||||
}
|
}
|
||||||
if (!$redis->exists(Setting::USER_TOKEN_PERMISSION_ALLOWED_CACHE_KRY)) {
|
if (!$redis->exists(Setting::USER_TOKEN_PERMISSION_ALLOWED_CACHE_KRY)) {
|
||||||
Setting::updateUserTokenPermissionAllowedCache(TokenRepository::listUserTokenPermissions(false));
|
Setting::updateUserTokenPermissionAllowedCache(TokenRepository::listUserTokenPermissions(false));
|
||||||
|
|||||||
@@ -459,4 +459,7 @@ return array (
|
|||||||
'permission' => [
|
'permission' => [
|
||||||
'user_token_allowed' => \App\Repositories\TokenRepository::listUserTokenPermissions(false),
|
'user_token_allowed' => \App\Repositories\TokenRepository::listUserTokenPermissions(false),
|
||||||
],
|
],
|
||||||
|
'image_hosting' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user