mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update index.php
This commit is contained in:
parent
be18e42d7d
commit
94dc68f611
@ -5,7 +5,8 @@ require('./pagestart.php');
|
||||
// Generate relevant output
|
||||
if (isset($_GET['pane']) && $_GET['pane'] == 'left')
|
||||
{
|
||||
if (!$module = CACHE('bb_cache')->get('admin_module'))
|
||||
$module = [];
|
||||
if (!$module = CACHE('bb_cache')->get('admin_module_' . $user->id))
|
||||
{
|
||||
$dir = @opendir('.');
|
||||
$setmodules = 1;
|
||||
@ -18,9 +19,12 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left')
|
||||
}
|
||||
unset($setmodules);
|
||||
@closedir($dir);
|
||||
CACHE('bb_cache')->set('admin_module', $module, 600);
|
||||
CACHE('bb_cache')->set('admin_module_' . $user->id, $module, 600);
|
||||
}
|
||||
|
||||
// Get modules from cache
|
||||
$module = CACHE('bb_cache')->get('admin_module_' . $user->id);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TPL_ADMIN_NAVIGATE' => true,
|
||||
'U_FORUM_INDEX' => '../index.php',
|
||||
@ -289,4 +293,4 @@ function inarray ($needle, $haystack)
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user