mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r89
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@89 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
b877e01097
commit
920187016b
5 changed files with 19 additions and 12 deletions
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
||||||
|
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.0.2';
|
$bb_cfg['tp_version'] = '2.0.2';
|
||||||
$bb_cfg['tp_release_state'] = 'TP II r86';
|
$bb_cfg['tp_release_state'] = 'TP II r89';
|
||||||
$bb_cfg['tp_release_date'] = '05-07-2011';
|
$bb_cfg['tp_release_date'] = '05-07-2011';
|
||||||
|
|
||||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||||
|
|
|
@ -505,9 +505,13 @@ function vdump ($var, $title = '')
|
||||||
echo '</pre>';
|
echo '</pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function htmlCHR ($txt, $replace_space = false)
|
function htmlCHR ($txt, $double_encode = false, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
|
||||||
{
|
{
|
||||||
return ($replace_space) ? str_replace(' ', ' ', htmlspecialchars($txt, ENT_QUOTES)) : htmlspecialchars($txt, ENT_QUOTES);
|
if (is_array($txt))
|
||||||
|
{
|
||||||
|
log_request('htmlCHR');
|
||||||
|
}
|
||||||
|
return (string) htmlspecialchars($txt, $quote_style, $charset, $double_encode);
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_url ($path)
|
function make_url ($path)
|
||||||
|
|
|
@ -440,6 +440,8 @@ foreach ($profile_fields as $field => $can_edit)
|
||||||
$sig = isset($_POST['user_sig']) ? (string) $_POST['user_sig'] : $pr_data['user_sig'];
|
$sig = isset($_POST['user_sig']) ? (string) $_POST['user_sig'] : $pr_data['user_sig'];
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
|
$sig_esc = prepare_message($sig);
|
||||||
|
|
||||||
if (mb_strlen($sig) > $bb_cfg['max_sig_chars'])
|
if (mb_strlen($sig) > $bb_cfg['max_sig_chars'])
|
||||||
{
|
{
|
||||||
$errors[] = $lang['SIGNATURE_TOO_LONG'];
|
$errors[] = $lang['SIGNATURE_TOO_LONG'];
|
||||||
|
|
|
@ -563,7 +563,7 @@ if( $refresh || isset($_POST['del_poll_option']) || $error_msg || ($submit && $t
|
||||||
{
|
{
|
||||||
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
$username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
|
||||||
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
$subject = ( !empty($_POST['subject']) ) ? clean_title($_POST['subject']) : '';
|
||||||
$message = ( !empty($_POST['message']) ) ? $_POST['message'] : '';
|
$message = ( !empty($_POST['message']) ) ? prepare_message($_POST['message']) : '';
|
||||||
|
|
||||||
$poll_title = ( !empty($_POST['poll_title']) ) ? clean_title($_POST['poll_title']) : '';
|
$poll_title = ( !empty($_POST['poll_title']) ) ? clean_title($_POST['poll_title']) : '';
|
||||||
$poll_length = ( isset($_POST['poll_length']) ) ? max(0, intval($_POST['poll_length'])) : 0;
|
$poll_length = ( isset($_POST['poll_length']) ) ? max(0, intval($_POST['poll_length'])) : 0;
|
||||||
|
@ -594,7 +594,8 @@ if( $refresh || isset($_POST['del_poll_option']) || $error_msg || ($submit && $t
|
||||||
{
|
{
|
||||||
$preview_subject = $subject;
|
$preview_subject = $subject;
|
||||||
$preview_username = $username;
|
$preview_username = $username;
|
||||||
$preview_message = bbcode2html($message);
|
$preview_message = htmlCHR($message, false, ENT_NOQUOTES);
|
||||||
|
$preview_message = bbcode2html($preview_message);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'TPL_PREVIEW_POST' => true,
|
'TPL_PREVIEW_POST' => true,
|
||||||
|
|
|
@ -985,7 +985,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['NO_TO_USER'];
|
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['NO_TO_USER'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$privmsg_subject = trim(strip_tags($_POST['subject']));
|
$privmsg_subject = htmlCHR($_POST['subject']);
|
||||||
if ( empty($privmsg_subject) )
|
if ( empty($privmsg_subject) )
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
|
@ -996,7 +996,7 @@ else if ( $submit || $refresh || $mode != '' )
|
||||||
{
|
{
|
||||||
if ( !$error )
|
if ( !$error )
|
||||||
{
|
{
|
||||||
$privmsg_message = $_POST['message'];
|
$privmsg_message = prepare_message($_POST['message']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue