mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
r161
Критический недочет в аяксе, мелочи. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@161 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
4cf9acb595
commit
d837ce6225
5 changed files with 30 additions and 82 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
define('IN_AJAX', true);
|
||||
$ajax =& new ajax_common();
|
||||
$ajax = new ajax_common();
|
||||
|
||||
require('./common.php');
|
||||
|
||||
|
@ -206,7 +206,6 @@ class ajax_common
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$response_js = bb_json_encode($this->response);
|
||||
|
||||
if (GZIP_OUTPUT_ALLOWED && !defined('NO_GZIP'))
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* @package attachment_mod
|
||||
* @version $Id: attachment_mod.php,v 1.6 2005/11/06 18:35:43 acydburn Exp $
|
||||
* @copyright (c) 2002 Meik Sievertsen
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
* Minimum Requirement: PHP 4.2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
die('Hacking attempt');
|
||||
|
@ -55,13 +44,6 @@ function attach_mod_get_lang($language_file)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include attachment mod language entries
|
||||
*/
|
||||
function include_attach_lang()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attachment mod configuration
|
||||
*/
|
||||
|
@ -71,8 +53,7 @@ function get_config()
|
|||
|
||||
$attach_config = array();
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . BB_ATTACH_CONFIG;
|
||||
$sql = 'SELECT * FROM ' . BB_ATTACH_CONFIG;
|
||||
|
||||
if ( !($result = DB()->sql_query($sql)) )
|
||||
{
|
||||
|
@ -99,10 +80,7 @@ if (!($attach_config = CACHE('bb_cache')->get('attach_config')))
|
|||
CACHE('bb_cache')->set('attach_config', $attach_config, 86400);
|
||||
}
|
||||
|
||||
// Please do not change the include-order, it is valuable for proper execution.
|
||||
// Functions for displaying Attachment Things
|
||||
include(BB_ROOT .'attach_mod/displaying.php');
|
||||
// Posting Attachments Class (HAVE TO BE BEFORE PM)
|
||||
include(BB_ROOT .'attach_mod/posting_attachments.php');
|
||||
|
||||
if (!intval($attach_config['allow_ftp_upload']))
|
||||
|
|
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.0.2';
|
||||
$bb_cfg['tp_release_state'] = 'TP II r158';
|
||||
$bb_cfg['tp_release_state'] = 'TP II r161';
|
||||
$bb_cfg['tp_release_date'] = '26-07-2011';
|
||||
|
||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||
|
|
|
@ -97,8 +97,7 @@ function prepare_message ($message)
|
|||
// Either in a window or inline
|
||||
function generate_smilies($mode)
|
||||
{
|
||||
global $bb_cfg, $template, $lang, $images;
|
||||
global $user;
|
||||
global $bb_cfg, $template, $lang, $images, $user;
|
||||
|
||||
$inline_columns = 4;
|
||||
$inline_rows = 7;
|
||||
|
@ -114,6 +113,7 @@ function generate_smilies($mode)
|
|||
$sql = DB()->fetch_rowset("SELECT emoticon, code, smile_url FROM ". BB_SMILIES ." ORDER BY smilies_id");
|
||||
CACHE('bb_cache')->set('smilies', $sql);
|
||||
}
|
||||
|
||||
if ($sql)
|
||||
{
|
||||
$num_smilies = 0;
|
||||
|
@ -179,7 +179,6 @@ function generate_smilies($mode)
|
|||
|
||||
$template->assign_vars(array(
|
||||
'PAGE_TITLE' => $lang['EMOTICONS'],
|
||||
'L_EMOTICONS' => $lang['EMOTICONS'],
|
||||
'S_SMILIES_COLSPAN' => $s_colspan,
|
||||
));
|
||||
}
|
||||
|
|
|
@ -79,15 +79,12 @@ function set_tracks ($cookie_name, &$tracking_ary, $tracks = null, $val = TIMENO
|
|||
{
|
||||
$tracking_ary[$key] = $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($curr_track_val < $user->data['user_lastvisit'])
|
||||
elseif ($curr_track_val < $user->data['user_lastvisit'])
|
||||
{
|
||||
unset($tracking_ary[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$overflow = count($tracking_topics) + count($tracking_forums) - COOKIE_MAX_TRACKS;
|
||||
|
||||
|
@ -1813,12 +1810,14 @@ function obtain_word_list(&$orig_word, &$replacement_word)
|
|||
$sql = DB()->fetch_rowset("SELECT word, replacement FROM ". BB_WORDS);
|
||||
CACHE('bb_cache')->set('censored', $sql, 7200);
|
||||
}
|
||||
|
||||
foreach($sql as $row)
|
||||
{
|
||||
//$orig_word[] = '#(?<!\S)(' . str_replace('\*', '\S*?', preg_quote($row['word'], '#')) . ')(?!\S)#iu';
|
||||
$orig_word[] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#iu';
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1832,25 +1831,6 @@ function smiley_sort ($a, $b)
|
|||
return (strlen($a['code']) > strlen($b['code'])) ? -1 : 1;
|
||||
}
|
||||
|
||||
//
|
||||
// This is general replacement for die(), allows templated
|
||||
// output in users (or default) language, etc.
|
||||
//
|
||||
// $msg_code can be one of these constants:
|
||||
//
|
||||
// GENERAL_MESSAGE : Use for any simple text message, eg. results
|
||||
// of an operation, authorisation failures, etc.
|
||||
//
|
||||
// GENERAL ERROR : Use for any error which occurs _AFTER_ the
|
||||
// common.php include and session code, ie. most errors in
|
||||
// pages/functions
|
||||
//
|
||||
// CRITICAL_MESSAGE : Used when basic config data is available but
|
||||
// a session may not exist, eg. banned users
|
||||
//
|
||||
// CRITICAL_ERROR : Used when config data cannot be obtained, eg
|
||||
// no database connection. Should _not_ be used in 99.5% of cases
|
||||
//
|
||||
function bb_die ($msg_text)
|
||||
{
|
||||
if (defined('IN_AJAX'))
|
||||
|
@ -1862,8 +1842,7 @@ function bb_die ($msg_text)
|
|||
|
||||
function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')
|
||||
{
|
||||
global $DBS, $template, $bb_cfg, $theme, $lang, $nav_links, $gen_simple_header, $images;
|
||||
global $userdata;
|
||||
global $DBS, $template, $bb_cfg, $theme, $lang, $nav_links, $gen_simple_header, $images, $userdata;
|
||||
|
||||
if (defined('HAS_DIED'))
|
||||
{
|
||||
|
@ -1969,18 +1948,11 @@ function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = ''
|
|||
}
|
||||
else
|
||||
{
|
||||
# while (@ob_end_clean());
|
||||
echo "<html>\n<body>\n". $msg_title ."\n<br /><br />\n". $msg_text ."</body>\n</html>";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// This function is for compatibility with PHP 4.x's realpath()
|
||||
// function. In later versions of PHP, it needs to be called
|
||||
// to do checks with some functions. Older versions of PHP don't
|
||||
// seem to need this, so we'll just return the original value.
|
||||
// dougk_ff7 <October 5, 2002>
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue