mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
Cleaner check to make sure inc/ files aren't accessed directly.
This commit is contained in:
parent
8a244ab61e
commit
7f0de93608
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$hidden_inputs_twig = array();
|
$hidden_inputs_twig = array();
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
defined('TINYBOARD') or exit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for generating json API compatible with 4chan API
|
* Class for generating json API compatible with 4chan API
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Cache {
|
class Cache {
|
||||||
private static $cache;
|
private static $cache;
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class PreparedQueryDebug {
|
class PreparedQueryDebug {
|
||||||
protected $query;
|
protected $query;
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
function event() {
|
function event() {
|
||||||
global $events;
|
global $events;
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Filter {
|
class Filter {
|
||||||
private $condition;
|
private $condition;
|
||||||
|
@ -9,6 +9,8 @@ if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define('TINYBOARD', null);
|
||||||
|
|
||||||
$microtime_start = microtime(true);
|
$microtime_start = microtime(true);
|
||||||
|
|
||||||
require_once 'inc/display.php';
|
require_once 'inc/display.php';
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Image {
|
class Image {
|
||||||
public $src, $format, $image, $size;
|
public $src, $format, $image, $size;
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create a hash/salt pair for validate logins
|
// create a hash/salt pair for validate logins
|
||||||
function mkhash($username, $password, $salt = false) {
|
function mkhash($username, $password, $salt = false) {
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mod_page($title, $template, $args, $subtitle = false) {
|
function mod_page($title, $template, $args, $subtitle = false) {
|
||||||
global $config, $mod;
|
global $config, $mod;
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Remote {
|
class Remote {
|
||||||
public function __construct($config) {
|
public function __construct($config) {
|
||||||
|
@ -4,10 +4,7 @@
|
|||||||
* Copyright (c) 2010-2013 Tinyboard Development Group
|
* Copyright (c) 2010-2013 Tinyboard Development Group
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (realpath($_SERVER['SCRIPT_FILENAME']) == str_replace('\\', '/', __FILE__)) {
|
defined('TINYBOARD') or exit;
|
||||||
// You cannot request this file directly.
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$twig = false;
|
$twig = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user