Move login check in inc/mod/auth.php to a function

This allows pages like create.php to not include inc/mod/pages.php while still being able to use the mod auth functions (like generating salts and passwords)
This commit is contained in:
8chan 2014-12-31 22:35:21 -08:00 committed by czaks
parent 93f748e6a8
commit 3eb755ee7e
3 changed files with 49 additions and 33 deletions

View file

@ -12,6 +12,8 @@ require_once 'inc/mod/auth.php';
if ($config['debug'])
$parse_start_time = microtime(true);
check_login(true);
$query = isset($_SERVER['QUERY_STRING']) ? rawurldecode($_SERVER['QUERY_STRING']) : '';
$pages = array(