add alert when full site in promotion

This commit is contained in:
xiaomlove
2022-06-12 22:14:16 +08:00
parent 024ef8b665
commit 921f74c93e
5 changed files with 14 additions and 4 deletions
+6 -4
View File
@@ -77,10 +77,12 @@ class Test extends Command
*/
public function handle()
{
$end = Carbon::parse('2022-06-06 14:10');
$begin = Carbon::parse('2022-06-06 03:10');
$r = $end->diffInHours($begin);
dd($r);
$a = [];
if ($a) {
echo 'Bad';
} else {
echo 'OK';
}
}
+4
View File
@@ -2669,6 +2669,10 @@ else {
}
if ($msgalert)
{
$spStateGlobal = get_global_sp_state();
if ($spStateGlobal != \App\Models\Torrent::PROMOTION_NORMAL) {
msgalert("torrents.php", sprintf($lang_functions['full_site_promotion_in_effect'], \App\Models\Torrent::$promotionTypes[$spStateGlobal]['text']), "green");
}
if($CURUSER['leechwarn'] == 'yes')
{
$kicktimeout = gettime($CURUSER['leechwarnuntil'], false, false, true);
+1
View File
@@ -319,6 +319,7 @@ $lang_functions = array
'menu_claim' => '认领: ',
'text_complains' => '有%s%u个待处理的申诉%s',
'text_contactstaff' => '联系管理组',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!',
);
?>
+1
View File
@@ -326,6 +326,7 @@ $lang_functions = array
'menu_claim' => '認領: ',
'text_complains' => '有%s%u個待處理的申诉%s',
'text_contactstaff' => '聯系管理組',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!',
);
?>
+2
View File
@@ -327,6 +327,8 @@ $lang_functions = array
'menu_claim' => 'Claim: ',
'text_complains' => 'There %s %u pending complaint%s.',
'text_contactstaff' => 'Contact staff',
'full_site_promotion_in_effect' => 'Full site [%s] in effect!',
);
?>