From 34eeaccea9f3809fdfa465e9910c8fa84f836011 Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 5 Apr 2015 16:31:20 +0200 Subject: [PATCH] optimization: we don`t need bans.php most of the time and bans.php has big dependencies --- inc/functions.php | 1 - mod.php | 7 ++++--- post.php | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 76b1d9a8..b1b1b042 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -18,7 +18,6 @@ require_once 'inc/template.php'; require_once 'inc/database.php'; require_once 'inc/events.php'; require_once 'inc/api.php'; -require_once 'inc/bans.php'; if (!extension_loaded('gettext')) { require_once 'inc/lib/gettext/gettext.inc'; } diff --git a/mod.php b/mod.php index e06d5db6..5697e2b5 100644 --- a/mod.php +++ b/mod.php @@ -4,9 +4,10 @@ * Copyright (c) 2010-2014 Tinyboard Development Group */ -require 'inc/functions.php'; -require 'inc/mod/pages.php'; -require 'inc/mod/auth.php'; +require_once 'inc/functions.php'; +require_once 'inc/bans.php'; +require_once 'inc/mod/pages.php'; +require_once 'inc/mod/auth.php'; if ($config['debug']) $parse_start_time = microtime(true); diff --git a/post.php b/post.php index 09a5f53f..2b903b1c 100644 --- a/post.php +++ b/post.php @@ -3,8 +3,9 @@ * Copyright (c) 2010-2014 Tinyboard Development Group */ -require 'inc/functions.php'; -require 'inc/anti-bot.php'; +require_once 'inc/functions.php'; +require_once 'inc/anti-bot.php'; +require_once 'inc/bans.php'; // Fix for magic quotes if (get_magic_quotes_gpc()) {