change torrent pos_state to varchar, support more sticky level

This commit is contained in:
xiaomlove
2021-06-01 01:28:46 +08:00
parent 8e35dc0886
commit 5760adc0c4
17 changed files with 139 additions and 14 deletions
+2 -5
View File
@@ -147,12 +147,9 @@ if(get_user_class()>=$torrentonpromotion_class)
}
}
}
if(get_user_class()>=$torrentsticky_class)
if(get_user_class()>=$torrentsticky_class && isset($_POST['sel_posstate']) && isset(\App\Models\Torrent::$posStates[$_POST['sel_posstate']]))
{
if(intval($_POST["sel_posstate"] ?? 0) == 0)
$updateset[] = "pos_state = 'normal'";
elseif(intval($_POST["sel_posstate"] ?? 0) == 1)
$updateset[] = "pos_state = 'sticky'";
$updateset[] = "pos_state = '" . $_POST['sel_posstate'] . "'";
}
$pick_info = "";