summaryrefslogtreecommitdiff
path: root/inc/mod
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-06 20:12:04 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-06 20:12:04 +1000
commit7f0de936082fb35d4e18fbadfe9849acdfc03ab6 (patch)
tree37bc90513d794dbe804aae05837109af00e035be /inc/mod
parent8a244ab61e7e45f65667a8330b5d61fe918bffb2 (diff)
Cleaner check to make sure inc/ files aren't accessed directly.
Diffstat (limited to 'inc/mod')
-rw-r--r--inc/mod/auth.php5
-rw-r--r--inc/mod/pages.php5
2 files changed, 2 insertions, 8 deletions
diff --git a/inc/mod/auth.php b/inc/mod/auth.php
index 0733646f..f2003dfe 100644
--- a/inc/mod/auth.php
+++ b/inc/mod/auth.php
@@ -4,10 +4,7 @@
* Copyright (c) 2010-2013 Tinyboard Development Group
*/
-if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
- // You cannot request this file directly.
- exit;
-}
+defined('TINYBOARD') or exit;
// create a hash/salt pair for validate logins
function mkhash($username, $password, $salt = false) {
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 99bfcf9d..5e45cdae 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -4,10 +4,7 @@
* Copyright (c) 2010-2013 Tinyboard Development Group
*/
-if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
- // You cannot request this file directly.
- exit;
-}
+defined('TINYBOARD') or exit;
function mod_page($title, $template, $args, $subtitle = false) {
global $config, $mod;