mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Удаление IN_FORUM
Лишние определения констант.
This commit is contained in:
parent
c8c322d11f
commit
86baf27073
30 changed files with 5 additions and 61 deletions
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
define('BB_ROOT', './../');
|
||||
define('IN_FORUM', true);
|
||||
define('IN_ADMIN', true);
|
||||
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'callseed');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
|
|
@ -12,7 +12,6 @@ if (empty($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = '';
|
|||
if (empty($_SERVER['SERVER_NAME'])) $_SERVER['SERVER_NAME'] = '';
|
||||
|
||||
if (!defined('BB_ROOT')) define('BB_ROOT', './');
|
||||
if (!defined('IN_FORUM') && !defined('IN_TRACKER')) define('IN_FORUM', true);
|
||||
|
||||
header('X-Frame-Options: SAMEORIGIN');
|
||||
|
||||
|
@ -476,7 +475,7 @@ function log_request ($file = '', $prepend_str = false, $add_post = true)
|
|||
}
|
||||
|
||||
// Board init
|
||||
if (defined('IN_FORUM'))
|
||||
if (!defined('IN_TRACKER'))
|
||||
{
|
||||
require(INC_DIR .'init_bb.php');
|
||||
}
|
||||
|
|
1
dl.php
1
dl.php
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'dl');
|
||||
define('NO_GZIP', true);
|
||||
define('BB_ROOT', './');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'dl_list');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
1
feed.php
1
feed.php
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'feed');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'group');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'group_edit');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'index');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
require(INC_DIR . 'functions_upload.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
|
||||
require(ATTACH_DIR .'includes/functions_includes.php');
|
||||
require(ATTACH_DIR .'includes/functions_attach.php');
|
||||
require(ATTACH_DIR .'includes/functions_delete.php');
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
|
||||
$allowed_extensions = array();
|
||||
$display_categories = array();
|
||||
$download_modes = array();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die(basename(__FILE__));
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
global $bb_cfg, $t_data, $poster_id, $is_auth, $dl_link_css, $dl_status_css, $lang, $images;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
|
||||
$imagick = '';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
|
||||
define('FILENAME_PREFIX', false);
|
||||
define('FILENAME_PREFIX_LENGTH', 6);
|
||||
define('FILENAME_MAX_LENGTH', 180);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die('Hacking attempt');
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
if (empty($_GET['u']) || empty($_GET['act_key']))
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
// Is send through board enabled? No, return to index
|
||||
if (!$bb_cfg['board_email_form'])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (!defined('IN_FORUM')) die("Hacking attempt");
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
set_die_append_msg();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'login');
|
||||
define('IN_LOGIN', true);
|
||||
define('BB_ROOT', './');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'memberlist');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'modcp');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'posting');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'pm');
|
||||
define('IN_PM', true);
|
||||
define('BB_ROOT', './');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'forum');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
define('IN_FORUM', true);
|
||||
define('BB_SCRIPT', 'topic');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
@ -61,32 +60,6 @@ if (!$topic_id && !$post_id)
|
|||
$tracking_topics = get_tracks('topic');
|
||||
$tracking_forums = get_tracks('forum');
|
||||
|
||||
// Find topic id if user requested a newer or older topic
|
||||
if ($topic_id && isset($_GET['view']) && ($_GET['view'] == 'next' || $_GET['view'] == 'previous'))
|
||||
{
|
||||
$sql_condition = ($_GET['view'] == 'next') ? '>' : '<';
|
||||
$sql_ordering = ($_GET['view'] == 'next') ? 'ASC' : 'DESC';
|
||||
|
||||
$sql = "SELECT t.topic_id
|
||||
FROM ". BB_TOPICS ." t, ". BB_TOPICS ." t2
|
||||
WHERE t2.topic_id = $topic_id
|
||||
AND t.forum_id = t2.forum_id
|
||||
AND t.topic_moved_id = 0
|
||||
AND t.topic_last_post_id $sql_condition t2.topic_last_post_id
|
||||
ORDER BY t.topic_last_post_id $sql_ordering
|
||||
LIMIT 1";
|
||||
|
||||
if ($row = DB()->fetch_row($sql))
|
||||
{
|
||||
$next_topic_id = $topic_id = $row['topic_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = ($_GET['view'] == 'next') ? $lang['NO_NEWER_TOPICS'] : $lang['NO_OLDER_TOPICS'];
|
||||
bb_die($message);
|
||||
}
|
||||
}
|
||||
|
||||
// Get forum/topic data
|
||||
if ($topic_id)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue