mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 04:50:33 -07:00
Generate jumpbox files only if enabled (#764)
This commit is contained in:
parent
788d7a8b1a
commit
ce9c3d9b47
2 changed files with 14 additions and 8 deletions
|
@ -106,6 +106,7 @@ $this->store('cat_forums', $data);
|
|||
//
|
||||
// jumpbox
|
||||
//
|
||||
if ($bb_cfg['show_jumpbox']) {
|
||||
$data = array(
|
||||
'guest' => get_forum_select('guest', 'f', null, null, null, 'id="jumpbox" onchange="window.location.href=\'viewforum.php?f=\'+this.value;"'),
|
||||
'user' => get_forum_select('user', 'f', null, null, null, 'id="jumpbox" onchange="window.location.href=\'viewforum.php?f=\'+this.value;"'),
|
||||
|
@ -115,6 +116,7 @@ $this->store('jumpbox', $data);
|
|||
|
||||
file_write($data['guest'], AJAX_HTML_DIR . '/jumpbox_guest.html', false, true, true);
|
||||
file_write($data['user'], AJAX_HTML_DIR . '/jumpbox_user.html', false, true, true);
|
||||
}
|
||||
|
||||
//
|
||||
// viewtopic_forum_select
|
||||
|
|
|
@ -1000,7 +1000,11 @@ function get_userdata($u, $force_name = false, $allow_guest = false)
|
|||
|
||||
function make_jumpbox($selected = 0)
|
||||
{
|
||||
global $datastore, $template;
|
||||
global $datastore, $template, $bb_cfg;
|
||||
|
||||
if (!$bb_cfg['show_jumpbox']) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$jumpbox = $datastore->get('jumpbox')) {
|
||||
$datastore->update('jumpbox');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue