taxonomy create/edit redirect

This commit is contained in:
xiaomlove
2022-11-09 21:56:03 +08:00
parent b92b911b1e
commit 6479f0a799
17 changed files with 105 additions and 20 deletions
+13
View File
@@ -156,6 +156,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
$query[] = "search_mode=".$search_mode;
}
}
if (!empty($_POST['sort']) && in_array($_POST['sort'], ['newest', 'sticky'])) {
$query[] = "sort=" . $_POST['sort'];
} else {
$query[] = "sort=sticky";
}
$inclbookmarked=intval($_POST['inclbookmarked'] ?? 0);
if($inclbookmarked)
{
@@ -317,6 +322,14 @@ if (get_setting('main.spsct') == 'yes') {
<input type="radio" name="inclbookmarked" id="inclbookmarked0" value="0" checked="checked" /><label for="inclbookmarked0"><?php echo $lang_getrss['text_all']?></label>&nbsp;<input type="radio" name="inclbookmarked" id="inclbookmarked1" value="1" /><label for="inclbookmarked1"><?php echo $lang_getrss['text_only_bookmarked']?></label><div><?php echo $lang_getrss['text_show_bookmarked_note']?></div>
</td>
</tr>
<tr>
<td class="rowhead"><?php echo $lang_getrss['row_sort']?>
</td>
<td class="rowfollow" align="left">
<label><input type="radio" name="sort" value="sticky"><?php echo $lang_getrss['sort_sticky']?></label>
<label><input type="radio" name="sort" value="newest"><?php echo $lang_getrss['sort_newest']?></label>
</td>
</tr>
<tr>
<td class="rowhead"><?php echo $lang_getrss['row_item_title_type']?>
</td>
+8 -2
View File
@@ -94,7 +94,7 @@ if ($approvalStatusNoneVisible == 'no' && !user_can('staffmem')) {
function get_where($tablename = "sources", $itemname = "source", $getname = "sou")
{
global $where;
$items = searchbox_item_list($tablename);
$items = searchbox_item_list($tablename, 0);
$whereitemina = array();
foreach ($items as $item)
{
@@ -118,8 +118,14 @@ get_where("teams", "team", "tea");
get_where("audiocodecs", "audiocodec", "aud");
if ($where)
$where = "WHERE ".$where;
$query = "SELECT torrents.id, torrents.category, torrents.name, torrents.small_descr, torrents.descr, torrents.info_hash, torrents.size, torrents.added, torrents.anonymous, users.username AS username, categories.id AS cat_id, categories.name AS cat_name FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where ORDER BY torrents.added DESC LIMIT $limit";
if (!empty($_GET['sort']) && $_GET['sort'] == 'newest') {
$sort = "id desc";
} else {
$sort = "pos_state desc, id desc";
}
$query = "SELECT torrents.id, torrents.category, torrents.name, torrents.small_descr, torrents.descr, torrents.info_hash, torrents.size, torrents.added, torrents.anonymous, users.username AS username, categories.id AS cat_id, categories.name AS cat_name FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where ORDER BY $sort LIMIT $limit";
$list = \Nexus\Database\NexusDB::select($query);
$list = apply_filter('torrent_list', $list, $startindex == 0 ? 0 : 1, null);
$torrentRep = new \App\Repositories\TorrentRepository();
$url = get_protocol_prefix().$BASEURL;
$year = substr($datefounded, 0, 4);
+1 -1
View File
@@ -207,7 +207,7 @@ elseif ($CURUSER['notifs']){
$special_state = 5;
elseif (strpos($CURUSER['notifs'], "[spstate=6]") !== false)
$special_state = 6;
elseif (strpos($CURUSER['notifs'], "[spstate=6]") !== false)
elseif (strpos($CURUSER['notifs'], "[spstate=7]") !== false)
$special_state = 7;
}