mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 10:37:30 -07:00
Tracker search forum list simplification.
This commit is contained in:
parent
69348b2cc6
commit
175e22e844
2 changed files with 16 additions and 16 deletions
|
@ -508,18 +508,17 @@ $(function(){
|
|||
$('#fs-qs-div').show();
|
||||
}
|
||||
});
|
||||
function get_fs_link ()
|
||||
{
|
||||
var fs_url = '{TRACKER_URL}';
|
||||
var fs_val = $('#fs-main').val();
|
||||
function get_fs_link() {
|
||||
var fs_url = '{TRACKER_URL}';
|
||||
var fs_val = $('#fs-main').val();
|
||||
|
||||
if (fs_val == null) {
|
||||
alert('{L_NOT_SEL_CHAPTERS}');
|
||||
}
|
||||
else {
|
||||
fs_url += 'f[]='+ fs_val.join('&f[]=');
|
||||
window.prompt('{L_SEL_CHAPTERS}:', fs_url);
|
||||
}
|
||||
return false;
|
||||
if (fs_val != null && $.inArray('-1', fs_val) == -1) {
|
||||
fs_url += 'f=' + fs_val.sort().join();
|
||||
window.prompt('{L_SEL_CHAPTERS}:', fs_url);
|
||||
}
|
||||
else {
|
||||
alert('{L_NOT_SEL_CHAPTERS}');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -375,10 +375,11 @@ if (!$set_default) {
|
|||
} // Get requested forum_id(s)
|
||||
elseif ($req_forums =& $_REQUEST[$forum_key]) {
|
||||
if ($req_forums != $search_all) {
|
||||
$req_forums = (array)$req_forums;
|
||||
array_deep($req_forums, 'intval');
|
||||
$valid_forums = array_intersect($req_forums, $allowed_forums);
|
||||
$forum_val = implode(',', $valid_forums);
|
||||
$clean_forums = [];
|
||||
foreach (explode(',', $req_forums) as $req_forum) {
|
||||
$clean_forums[] = (int) $req_forum;
|
||||
}
|
||||
$forum_val = implode(',', array_intersect($clean_forums, $allowed_forums));
|
||||
}
|
||||
} elseif (isset($previous_settings[$forum_key])) {
|
||||
$valid_forums = array_intersect(explode(',', $previous_settings[$forum_key]), $allowed_forums);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue