Remove at

This commit is contained in:
Vasily Komrakov 2016-03-13 01:06:18 +03:00
commit b6fead9f48
56 changed files with 194 additions and 194 deletions

View file

@ -76,7 +76,7 @@ switch ($mode)
));
//detect cron status
if (@file_exists('../triggers/cron_running'))
if (file_exists('../triggers/cron_running'))
{
$template->assign_vars(array(
'CRON_RUNNING' => true,
@ -85,7 +85,7 @@ switch ($mode)
break;
case 'repair':
if (@file_exists('../triggers/cron_running'))
if (file_exists('../triggers/cron_running'))
{
rename("../triggers/cron_running", "../triggers/cron_allowed");
}

View file

@ -52,7 +52,7 @@ foreach ($forum_auth_fields as $auth_type)
$forum_auth_levels = array('ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN');
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
if (@$_REQUEST[POST_FORUM_URL])
if ($_REQUEST[POST_FORUM_URL])
{
$forum_id = (int) $_REQUEST[POST_FORUM_URL];
$forum_sql = "WHERE forum_id = $forum_id";
@ -154,7 +154,7 @@ else
// Output the authorisation details if an id was specified
$forum_name = $forum_rows[0]['forum_name'];
@reset($simple_auth_ary);
reset($simple_auth_ary);
while (list($key, $auth_levels) = each($simple_auth_ary))
{
$matched = 1;

View file

@ -28,7 +28,7 @@ $default_forum_auth = array(
'auth_download' => AUTH_REG,
);
$mode = (@$_REQUEST['mode']) ? (string) $_REQUEST['mode'] : '';
$mode = ($_REQUEST['mode']) ? (string) $_REQUEST['mode'] : '';
$cat_forums = get_cat_forums();

View file

@ -7,7 +7,7 @@ if (!empty($setmodules))
}
require('./pagestart.php');
@set_time_limit(1200);
set_time_limit(1200);
$subject = (string) trim(request_var('subject', ''));
$message = (string) request_var('message', '');

View file

@ -76,7 +76,7 @@ if ($mode != '')
'RANK' => !empty($rank_info['rank_title']) ? $rank_info['rank_title'] : '',
'SPECIAL_RANK' => $rank_is_special,
'NOT_SPECIAL_RANK' => $rank_is_not_special,
'MINIMUM' => ($rank_is_special) ? '' : @$rank_info['rank_min'],
'MINIMUM' => ($rank_is_special) ? '' : $rank_info['rank_min'],
'IMAGE' => !empty($rank_info['rank_image']) ? $rank_info['rank_image'] : 'styles/images/ranks/rank_image.png',
'STYLE' => !empty($rank_info['rank_style']) ? $rank_info['rank_style'] : '',
'IMAGE_DISPLAY' => !empty($rank_info['rank_image']) ? '<img src="../'. $rank_info['rank_image'] .'" />' : '',

View file

@ -20,14 +20,14 @@ define('REBUILD_SEARCH_COMPLETED', 2); // when all the db posts have been proce
//
$def_post_limit = 50;
$def_refresh_rate = 3;
$def_time_limit = ($sys_time_limit = @ini_get('max_execution_time')) ? $sys_time_limit : 30;
$def_time_limit = ($sys_time_limit = ini_get('max_execution_time')) ? $sys_time_limit : 30;
$last_session_data = get_rebuild_session_details('last', 'all');
$last_session_id = (int) $last_session_data['rebuild_session_id'];
$max_post_id = get_latest_post_id();
$start_time = TIMENOW;
$mode = (string) @$_REQUEST['mode'];
$mode = (string) $_REQUEST['mode'];
// check if the user has choosen to stop processing
if (isset($_REQUEST['cancel_button']))
@ -46,7 +46,7 @@ if (isset($_REQUEST['cancel_button']))
}
// from which post to start processing
$start = abs(intval(@$_REQUEST['start']));
$start = abs(intval($_REQUEST['start']));
// get the total number of posts in the db
$total_posts = get_total_posts();
@ -62,7 +62,7 @@ $session_posts_processed = ( $mode == 'refresh' ) ? get_processed_posts('session
$total_posts_processing = $total_posts - $total_posts_processed;
// how many posts to process in this session
if ($session_posts_processing = @intval($_REQUEST['session_posts_processing']))
if ($session_posts_processing = intval($_REQUEST['session_posts_processing']))
{
if ($mode == 'submit')
{
@ -140,7 +140,7 @@ if ($mode == 'submit')
}
// Increase maximum execution time in case of a lot of posts, but don't complain about it if it isn't allowed.
@set_time_limit($time_limit + 20);
set_time_limit($time_limit + 20);
// check if we are should start processing
if ($mode == 'submit' || $mode == 'refresh')
@ -179,7 +179,7 @@ if ($mode == 'submit' || $mode == 'refresh')
while ($row = DB()->fetch_next($result) AND !$timer_expired)
{
@set_time_limit(600);
set_time_limit(600);
$start_post_id = ($num_rows == 0) ? $row['post_id'] : $start_post_id;
$end_post_id = $row['post_id'];

View file

@ -21,13 +21,13 @@ else
$delimeter = '=+:';
// Read a listing of uploaded smilies for use in the add or edit smliey code
$dir = @opendir(BB_ROOT . $bb_cfg['smilies_path']);
$dir = opendir(BB_ROOT . $bb_cfg['smilies_path']);
while ($file = @readdir($dir))
while ($file = readdir($dir))
{
if (!@is_dir(bb_realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file)))
if (!is_dir(bb_realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file)))
{
$img_size = @getimagesize(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file);
$img_size = getimagesize(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file);
if ($img_size[0] && $img_size[1])
{
@ -40,7 +40,7 @@ while ($file = @readdir($dir))
}
}
@closedir($dir);
closedir($dir);
// Select main mode
if (isset($_GET['import_pack']) || isset($_POST['import_pack']))
@ -78,7 +78,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack']))
}
}
$fcontents = @file(BB_ROOT . $bb_cfg['smilies_path'] . '/'. $smile_pak);
$fcontents = file(BB_ROOT . $bb_cfg['smilies_path'] . '/'. $smile_pak);
if (empty($fcontents))
{
@ -133,7 +133,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack']))
{
// Display the script to get the smile_pak cfg file
$smile_paks_select = '<select name="smile_pak"><option value="">' . $lang['SELECT_PAK'] . '</option>';
while (list($key, $value) = @each($smiley_paks))
while (list($key, $value) = each($smiley_paks))
{
if (!empty($value))
{
@ -341,7 +341,7 @@ else
$template->assign_vars(array(
'TPL_SMILE_MAIN' => true,
'S_HIDDEN_FIELDS' => @$s_hidden_fields,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SMILEY_ACTION' => 'admin_smilies.php',
));

View file

@ -15,10 +15,10 @@ require(INC_DIR .'functions_group.php');
$yes_sign = '&radic;';
$no_sign = 'x';
$group_id = (int) @$_REQUEST['g'];
$user_id = (int) @$_REQUEST['u'];
$cat_id = (int) @$_REQUEST['c'];
$mode = (string) @$_REQUEST['mode'];
$group_id = (int) $_REQUEST['g'];
$user_id = (int) $_REQUEST['u'];
$cat_id = (int) $_REQUEST['c'];
$mode = (string) $_REQUEST['mode'];
$submit = isset($_POST['submit']);
$group_data = array();
@ -71,7 +71,7 @@ if ($submit && $mode == 'user')
}
// Make user an admin (if already user)
if (@$_POST['userlevel'] === 'admin')
if ($_POST['userlevel'] === 'admin')
{
if ($userdata['user_id'] == $user_id || $user_id == GUEST_UID || $user_id == BOT_UID)
{
@ -90,7 +90,7 @@ if ($submit && $mode == 'user')
bb_die($message);
}
// Make admin a user (if already admin)
else if (@$_POST['userlevel'] === 'user')
else if ($_POST['userlevel'] === 'user')
{
// ignore if you're trying to change yourself from an admin to user!
if ($userdata['user_id'] == $user_id)
@ -114,7 +114,7 @@ if ($submit && $mode == 'user')
//
$auth = array();
if (is_array(@$_POST['auth']))
if (is_array($_POST['auth']))
{
array_deep($_POST['auth'], 'intval');
@ -142,7 +142,7 @@ if ($submit && $mode == 'user')
//
// Submit new GROUP permissions
//
else if ($submit && $mode == 'group' && is_array(@$_POST['auth']))
else if ($submit && $mode == 'group' && is_array($_POST['auth']))
{
if (!$group_data = get_group_data($group_id))
{

View file

@ -890,7 +890,7 @@ else
$select_sql .= " ORDER BY ";
switch (strtolower(@$_GET['sort']))
switch (strtolower($_GET['sort']))
{
case 'regdate':
$sort = 'regdate';
@ -918,7 +918,7 @@ else
$select_sql .= 'u.username';
}
switch (@$_GET['order'])
switch ($_GET['order'])
{
case 'DESC':
$order = 'DESC';
@ -932,7 +932,7 @@ else
$select_sql .= " $order";
$page = ( isset($_GET['page']) ) ? intval($_GET['page']) : intval(trim(@$_POST['page']));
$page = ( isset($_GET['page']) ) ? intval($_GET['page']) : intval(trim($_POST['page']));
if ($page < 1)
{

View file

@ -7,9 +7,9 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left')
{
if (!$module = CACHE('bb_cache')->get('admin_module' . $user->id))
{
$dir = @opendir('.');
$dir = opendir('.');
$setmodules = 1;
while ($file = @readdir($dir))
while ($file = readdir($dir))
{
if (preg_match('/^admin_.*?\.php$/', $file))
{
@ -17,7 +17,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left')
}
}
unset($setmodules);
@closedir($dir);
closedir($dir);
CACHE('bb_cache')->set('admin_module' . $user->id, $module, 600);
}
@ -76,16 +76,16 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
$avatar_dir_size = 0;
if ($avatar_dir = @opendir(BB_ROOT . $bb_cfg['avatar_path']))
if ($avatar_dir = opendir(BB_ROOT . $bb_cfg['avatar_path']))
{
while( $file = @readdir($avatar_dir) )
while( $file = readdir($avatar_dir) )
{
if( $file != '.' && $file != '..' )
{
$avatar_dir_size += @filesize(BB_ROOT . $bb_cfg['avatar_path'] . '/' . $file);
$avatar_dir_size += filesize(BB_ROOT . $bb_cfg['avatar_path'] . '/' . $file);
}
}
@closedir($avatar_dir);
closedir($avatar_dir);
$avatar_dir_size = humn_size($avatar_dir_size);
}
@ -129,7 +129,7 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
$dbsize = 0;
for ($i = 0; $i < count($tabledata_ary); $i++)
{
if( @$tabledata_ary[$i]['Type'] != 'MRG_MYISAM' )
if( $tabledata_ary[$i]['Type'] != 'MRG_MYISAM' )
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
@ -165,7 +165,7 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
'ZF_VERSION' => Zend\Version\Version::VERSION,
));
if (@$_GET['users_online'])
if ($_GET['users_online'])
{
$template->assign_vars(array(
'SHOW_USERS_ONLINE' => true,

View file

@ -35,7 +35,7 @@ function tracker_exit ()
function silent_exit ()
{
while (@ob_end_clean());
while (ob_end_clean());
tracker_exit();
}
@ -105,7 +105,7 @@ class sql_db
$this->selected_db = $this->select_db();
// Set charset
if ($this->cfg['charset'] && !@mysql_set_charset($this->cfg['charset'], $this->link))
if ($this->cfg['charset'] && !mysql_set_charset($this->cfg['charset'], $this->link))
{
if (!$this->sql_query("SET NAMES {$this->cfg['charset']}"))
{
@ -476,12 +476,12 @@ class sql_db
$msg[] = str_compact($this->cur_query);
$msg[] = '';
$msg[] = 'Source : '. $this->debug_find_source();
$msg[] = 'IP : '. @$_SERVER['REMOTE_ADDR'];
$msg[] = 'IP : '. $_SERVER['REMOTE_ADDR'];
$msg[] = 'Date : '. date('Y-m-d H:i:s');
$msg[] = 'Agent : '. @$_SERVER['HTTP_USER_AGENT'];
$msg[] = 'Req_URI : '. @$_SERVER['REQUEST_URI'];
$msg[] = 'Referer : '. @$_SERVER['HTTP_REFERER'];
$msg[] = 'Method : '. @$_SERVER['REQUEST_METHOD'];
$msg[] = 'Agent : '. $_SERVER['HTTP_USER_AGENT'];
$msg[] = 'Req_URI : '. $_SERVER['REQUEST_URI'];
$msg[] = 'Referer : '. $_SERVER['HTTP_REFERER'];
$msg[] = 'Method : '. $_SERVER['REQUEST_METHOD'];
$msg[] = 'Request : '. trim(print_r($_REQUEST, true)) . str_repeat('_', 78) . LOG_LF;
$msg[] = '';
bb_log($msg, 'sql_error_tr');

View file

@ -257,7 +257,7 @@ function file_write ($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $repla
{
$bytes_written = false;
if ($max_size && @filesize($file) >= $max_size)
if ($max_size && filesize($file) >= $max_size)
{
$old_name = $file; $ext = '';
if (preg_match('#^(.+)(\.[^\\/]+)$#', $file, $matches))
@ -266,31 +266,31 @@ function file_write ($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $repla
}
$new_name = $old_name .'_[old]_'. date('Y-m-d_H-i-s_') . getmypid() . $ext;
clearstatcache();
if (@file_exists($file) && @filesize($file) >= $max_size && !@file_exists($new_name))
if (file_exists($file) && filesize($file) >= $max_size && !file_exists($new_name))
{
@rename($file, $new_name);
rename($file, $new_name);
}
}
if (!$fp = @fopen($file, 'ab'))
if (!$fp = fopen($file, 'ab'))
{
if ($dir_created = bb_mkdir(dirname($file)))
{
$fp = @fopen($file, 'ab');
$fp = fopen($file, 'ab');
}
}
if ($fp)
{
if ($lock)
{
@flock($fp, LOCK_EX);
flock($fp, LOCK_EX);
}
if ($replace_content)
{
@ftruncate($fp, 0);
@fseek($fp, 0, SEEK_SET);
ftruncate($fp, 0);
fseek($fp, 0, SEEK_SET);
}
$bytes_written = @fwrite($fp, $str);
@fclose($fp);
$bytes_written = fwrite($fp, $str);
fclose($fp);
}
return $bytes_written;
@ -312,7 +312,7 @@ function mkdir_rec ($path, $mode)
}
else
{
return (mkdir_rec(dirname($path), $mode)) ? @mkdir($path, $mode) : false;
return (mkdir_rec(dirname($path), $mode)) ? mkdir($path, $mode) : false;
}
}

View file

@ -4,7 +4,7 @@ define('BB_ROOT', './');
require(BB_ROOT . 'common.php');
require(INC_DIR . 'functions_upload.php');
while (@ob_end_flush()) ;
while (ob_end_flush()) ;
ob_implicit_flush();
error_reporting(E_ALL);
ini_set('display_errors', 1);

View file

@ -3,7 +3,7 @@
define('BB_ROOT', './');
require(BB_ROOT . 'common.php');
while (@ob_end_flush()) ;
while (ob_end_flush()) ;
ob_implicit_flush();
error_reporting(E_ALL);
ini_set('display_errors', 1);

View file

@ -3,7 +3,7 @@
define('BB_ROOT', './');
require(BB_ROOT . 'common.php');
while (@ob_end_flush()) ;
while (ob_end_flush()) ;
ob_implicit_flush();
error_reporting(E_ALL);
ini_set('display_errors', 1);

View file

@ -39,12 +39,12 @@ switch ($mode)
$match = 'tpl_';
$match_len = strlen($match);
$dir = $template->cachedir;
$res = @opendir($dir);
$res = opendir($dir);
while (($file = readdir($res)) !== false)
{
if (substr($file, 0, $match_len) === $match)
{
@unlink($dir . $file);
unlink($dir . $file);
}
}
closedir($res);

View file

@ -112,7 +112,7 @@ switch($this->request['type'])
$message = htmlCHR($message, false, ENT_NOQUOTES);
$this->response['message_html'] = bbcode2html($message);
$this->response['res_id'] = @$this->request['res_id'];
$this->response['res_id'] = $this->request['res_id'];
break;
case 'edit':

View file

@ -12,7 +12,7 @@ switch ($mode)
{
case 'create':
$map->create();
if (@file_exists(SITEMAP_DIR. 'sitemap.xml'))
if (file_exists(SITEMAP_DIR. 'sitemap.xml'))
{
$html .= $lang['SITEMAP_CREATED'].': <b>'.bb_date(TIMENOW, $bb_cfg['post_date_format']).'</b> '.$lang['SITEMAP_AVAILABLE'].': <a href="'.make_url('sitemap.xml').'" target="_blank">'.make_url('sitemap.xml').'</a>';
} else {
@ -21,7 +21,7 @@ switch ($mode)
break;
case 'search_update':
if (!@file_exists(SITEMAP_DIR. 'sitemap.xml')) $map->create();
if (!file_exists(SITEMAP_DIR. 'sitemap.xml')) $map->create();
$map_link = make_url(SITEMAP_DIR. 'sitemap.xml');

View file

@ -133,7 +133,7 @@ switch ($mode)
$this->ajax_die($msg);
}
$sql = "UPDATE ". BB_TOPIC_TPL ." SET ". DB()->build_array('UPDATE', $sql_args) ." WHERE tpl_id = $tpl_id LIMIT 1";
if (!@DB()->query($sql))
if (!DB()->query($sql))
{
$sql_error = DB()->sql_error();
}
@ -146,7 +146,7 @@ switch ($mode)
// создание нового шаблона
case 'new':
$sql = "INSERT INTO ". BB_TOPIC_TPL . DB()->build_array('INSERT', $sql_args);
if (!@DB()->query($sql))
if (!DB()->query($sql))
{
$sql_error = DB()->sql_error();
}

View file

@ -4,8 +4,8 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
global $user, $lang;
$post_id = (int) @$this->request['post_id'];
$topic_id = (int) @$this->request['topic_id'];
$post_id = (int) $this->request['post_id'];
$topic_id = (int) $this->request['topic_id'];
if (!$post_id)
{

View file

@ -564,7 +564,7 @@ class SphinxClient extends cache_common
{
// we are in persistent connection mode, so we have a socket
// however, need to check whether it's still alive
if ( !@feof ( $this->_socket ) )
if ( !feof ( $this->_socket ) )
return $this->_socket;
// force reopen
@ -587,9 +587,9 @@ class SphinxClient extends cache_common
}
if ( $this->_timeout<=0 )
$fp = @fsockopen ( $host, $port, $errno, $errstr );
$fp = fsockopen ( $host, $port, $errno, $errstr );
else
$fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout );
$fp = fsockopen ( $host, $port, $errno, $errstr, $this->_timeout );
if ( !$fp )
{

View file

@ -127,7 +127,7 @@ function generate_smilies($mode)
$row = 0;
$col = 0;
while (list($smile_url, $data) = @each($rowset))
while (list($smile_url, $data) = each($rowset))
{
if (!$col)
{
@ -401,7 +401,7 @@ function replace_synonyms ($text)
if (is_null($syn_match))
{
preg_match_all("#(\w+) (\w+)(\r?\n|$)#", @file_get_contents(LANG_DIR .'search_synonyms.txt'), $m);
preg_match_all("#(\w+) (\w+)(\r?\n|$)#", file_get_contents(LANG_DIR .'search_synonyms.txt'), $m);
$syn_match = $m[2];
$syn_replace = $m[1];

View file

@ -31,7 +31,7 @@ class cache_memcache extends cache_common
$this->cur_query = $connect_type .' '. $this->cfg['host'] .':'. $this->cfg['port'];
$this->debug('start');
if (@$this->memcache->$connect_type($this->cfg['host'], $this->cfg['port']))
if ($this->memcache->$connect_type($this->cfg['host'], $this->cfg['port']))
{
$this->connected = true;
}

View file

@ -29,7 +29,7 @@ class cache_redis extends cache_common
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
$this->debug('start');
if (@$this->redis->connect($this->cfg['host'], $this->cfg['port']))
if ($this->redis->connect($this->cfg['host'], $this->cfg['port']))
{
$this->connected = true;
}

View file

@ -139,7 +139,7 @@ class sqlite_common extends cache_common
$this->cur_query = ($this->dbg_enabled) ? 'connect to: '. $this->cfg['db_file_path'] : 'connect';
$this->debug('start');
if (@$this->dbh = new SQLite3($this->cfg['db_file_path']))
if ($this->dbh = new SQLite3($this->cfg['db_file_path']))
{
$this->connected = true;
}
@ -200,7 +200,7 @@ class sqlite_common extends cache_common
$this->cur_query = $query;
$this->debug('start');
if (!$result = @$this->dbh->query($query))
if (!$result = $this->dbh->query($query))
{
$rowsresult = $this->dbh->query("PRAGMA table_info({$this->cfg['table_name']})");
$rowscount = 0;

View file

@ -102,17 +102,17 @@ class emailer
{
$tpl_file = LANG_ROOT_DIR ."$template_lang/email/$template_file.html";
if (!@file_exists(@bb_realpath($tpl_file)))
if (!file_exists(bb_realpath($tpl_file)))
{
$tpl_file = LANG_ROOT_DIR ."{$bb_cfg['default_lang']}/email/$template_file.html";
if (!@file_exists(@bb_realpath($tpl_file)))
if (!file_exists(bb_realpath($tpl_file)))
{
bb_die('Could not find email template file :: ' . $template_file);
}
}
if (!($fd = @fopen($tpl_file, 'r')))
if (!($fd = fopen($tpl_file, 'r')))
{
bb_die('Failed opening template file :: ' . $tpl_file);
}
@ -192,10 +192,10 @@ class emailer
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
}
$to = @$this->addresses['to'];
$to = $this->addresses['to'];
$cc = (@count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
$bcc = (@count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
$cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
$bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
// Build header
$type = ($email_format == 'html') ? 'html' : 'plain';
@ -215,7 +215,7 @@ class emailer
{
$to = ($to == '') ? ' ' : $to;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
$result = mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
}
// Did it work?

View file

@ -170,7 +170,7 @@ class sitemap
return $data;
} else {
return @file_get_contents($file);
return file_get_contents($file);
}
}
@ -179,19 +179,19 @@ class sitemap
if (!$this->limit) $this->limit = $row['count'];
if ($this->limit > 40000) {
$pages_count = @ceil($row['count'] / 40000);
$pages_count = ceil($row['count'] / 40000);
$sitemap = $this->build_index($pages_count);
$handler = fopen(SITEMAP_DIR. "sitemap.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(SITEMAP_DIR. "sitemap.xml", 0666);
chmod(SITEMAP_DIR. "sitemap.xml", 0666);
$sitemap = $this->build_stat();
$handler = fopen(SITEMAP_DIR. "sitemap1.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(SITEMAP_DIR. "sitemap.xml", 0666);
chmod(SITEMAP_DIR. "sitemap.xml", 0666);
for ($i = 0; $i < $pages_count; $i++) {
$t = $i + 2;
@ -201,14 +201,14 @@ class sitemap
$handler = fopen(SITEMAP_DIR. "sitemap{$t}.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(SITEMAP_DIR. "sitemap{$t}.xml", 0666);
chmod(SITEMAP_DIR. "sitemap{$t}.xml", 0666);
}
} else {
$sitemap = $this->build_map();
$handler = fopen(SITEMAP_DIR. "sitemap.xml", "wb+");
fwrite($handler, $sitemap);
fclose($handler);
@chmod(SITEMAP_DIR. "sitemap.xml", 0666);
chmod(SITEMAP_DIR. "sitemap.xml", 0666);
}
$params['sitemap_time'] = TIMENOW;

View file

@ -67,7 +67,7 @@ class sql_db
$this->selected_db = $this->select_db();
// Set charset
if ($this->cfg['charset'] && !@mysql_set_charset($this->cfg['charset'], $this->link))
if ($this->cfg['charset'] && !mysql_set_charset($this->cfg['charset'], $this->link))
{
if (!$this->sql_query("SET NAMES {$this->cfg['charset']}"))
{
@ -91,7 +91,7 @@ class sql_db
$connect_type = ($this->cfg['persist']) ? 'mysql_pconnect' : 'mysql_connect';
if (!$link = @$connect_type($this->cfg['dbhost'], $this->cfg['dbuser'], $this->cfg['dbpasswd']))
if (!$link = $connect_type($this->cfg['dbhost'], $this->cfg['dbuser'], $this->cfg['dbpasswd']))
{
$server = (DBG_USER) ? $this->cfg['dbhost'] : '';
header("HTTP/1.0 503 Service Unavailable");
@ -115,7 +115,7 @@ class sql_db
$this->cur_query = ($this->dbg_enabled) ? "select db: {$this->cfg['dbname']}" : 'select db';
$this->debug('start');
if (!@mysql_select_db($this->cfg['dbname'], $this->link))
if (!mysql_select_db($this->cfg['dbname'], $this->link))
{
$database = (DBG_USER) ? $this->cfg['dbhost'] : '';
die("Could not select database $database");
@ -213,7 +213,7 @@ class sql_db
{
if($rownum > -1)
{
$result = @mysql_result($query_id, $rownum, $field);
$result = mysql_result($query_id, $rownum, $field);
}
else
{
@ -716,7 +716,7 @@ class sql_db
}
}
@define('IN_FIRST_SLOW_QUERY', true);
define('IN_FIRST_SLOW_QUERY', true);
CACHE('bb_cache')->set('dont_log_slow_query', $new_priority, $ignoring_time);
}
@ -881,12 +881,12 @@ class sql_db
$msg[] = str_compact($this->cur_query);
$msg[] = '';
$msg[] = 'Source : '. $this->debug_find_source() ." :: $this->db_server.$this->selected_db";
$msg[] = 'IP : '. @$_SERVER['REMOTE_ADDR'];
$msg[] = 'IP : '. $_SERVER['REMOTE_ADDR'];
$msg[] = 'Date : '. date('Y-m-d H:i:s');
$msg[] = 'Agent : '. @$_SERVER['HTTP_USER_AGENT'];
$msg[] = 'Req_URI : '. @$_SERVER['REQUEST_URI'];
$msg[] = 'Referer : '. @$_SERVER['HTTP_REFERER'];
$msg[] = 'Method : '. @$_SERVER['REQUEST_METHOD'];
$msg[] = 'Agent : '. $_SERVER['HTTP_USER_AGENT'];
$msg[] = 'Req_URI : '. $_SERVER['REQUEST_URI'];
$msg[] = 'Referer : '. $_SERVER['HTTP_REFERER'];
$msg[] = 'Method : '. $_SERVER['REQUEST_METHOD'];
$msg[] = 'PID : '. sprintf('%05d', getmypid());
$msg[] = 'Request : '. trim(print_r($_REQUEST, true)) . str_repeat('_', 78) . LOG_LF;
$msg[] = '';
@ -919,9 +919,9 @@ class sql_db
{
$html_table = false;
if ($result = @mysql_query("EXPLAIN $query", $this->link))
if ($result = mysql_query("EXPLAIN $query", $this->link))
{
while ($row = @mysql_fetch_assoc($result))
while ($row = mysql_fetch_assoc($result))
{
$html_table = $this->explain('add_explain_row', $html_table, $row);
}

View file

@ -13,7 +13,7 @@ function cron_get_file_lock ()
{
# bb_log(date('H:i:s - ') . getmypid() .' -x-- FILE-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check');
$lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING);
}
elseif (file_exists(CRON_RUNNING))
{
@ -22,7 +22,7 @@ function cron_get_file_lock ()
elseif (!file_exists(CRON_ALLOWED) && !file_exists(CRON_RUNNING))
{
file_write('', CRON_ALLOWED);
$lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING);
}
return $lock_obtained;
@ -30,7 +30,7 @@ function cron_get_file_lock ()
function cron_track_running ($mode)
{
@define('CRON_STARTMARK', TRIGGERS_DIR .'cron_started_at_'. date('Y-m-d_H-i-s') .'_by_pid_'. getmypid());
define('CRON_STARTMARK', TRIGGERS_DIR .'cron_started_at_'. date('Y-m-d_H-i-s') .'_by_pid_'. getmypid());
if ($mode == 'start')
{
@ -39,7 +39,7 @@ function cron_track_running ($mode)
}
elseif ($mode == 'end')
{
@unlink(CRON_STARTMARK);
unlink(CRON_STARTMARK);
}
}

View file

@ -8,7 +8,7 @@ $users_per_cycle = 1000;
while (true)
{
@set_time_limit(600);
set_time_limit(600);
$prune_users = $not_activated_users = $not_active_users = array();

View file

@ -7,7 +7,7 @@ require(CLASS_DIR .'sitemap.php');
$map = new sitemap();
$map->create();
if (@file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
if (file_exists(BB_ROOT. "/sitemap/sitemap.xml"))
{
$map_link = make_url('/sitemap/sitemap.xml');

View file

@ -30,7 +30,7 @@ class datastore_memcache extends datastore_common
$this->cur_query = $connect_type .' '. $this->cfg['host'] .':'. $this->cfg['port'];
$this->debug('start');
if (@$this->memcache->$connect_type($this->cfg['host'], $this->cfg['port']))
if ($this->memcache->$connect_type($this->cfg['host'], $this->cfg['port']))
{
$this->connected = true;
}

View file

@ -28,7 +28,7 @@ class datastore_redis extends datastore_common
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
$this->debug('start');
if (@$this->redis->connect($this->cfg['host'],$this->cfg['port']))
if ($this->redis->connect($this->cfg['host'],$this->cfg['port']))
{
$this->connected = true;
}

View file

@ -26,13 +26,13 @@ function get_attach_path ($id, $ext_id = '', $base_path = null, $first_div = 100
function delete_avatar ($user_id, $avatar_ext_id)
{
$avatar_file = ($avatar_ext_id) ? get_avatar_path($user_id, $avatar_ext_id) : '';
return ($avatar_file && file_exists($avatar_file)) ? @unlink($avatar_file) : false;
return ($avatar_file && file_exists($avatar_file)) ? unlink($avatar_file) : false;
}
function delete_attach ($topic_id, $attach_ext_id)
{
$attach_file = ($attach_ext_id) ? get_attach_path($topic_id, $attach_ext_id) : '';
return ($attach_file && file_exists($attach_file)) ? @unlink($attach_file) : false;
return ($attach_file && file_exists($attach_file)) ? unlink($attach_file) : false;
}
function get_tracks ($type)
@ -53,7 +53,7 @@ function get_tracks ($type)
default:
trigger_error(__FUNCTION__ .": invalid type '$type'", E_USER_ERROR);
}
$tracks = !empty($_COOKIE[$c_name]) ? @unserialize($_COOKIE[$c_name]) : false;
$tracks = !empty($_COOKIE[$c_name]) ? unserialize($_COOKIE[$c_name]) : false;
return ($tracks) ? $tracks : array();
}
@ -1779,7 +1779,7 @@ function bb_simple_die ($txt)
function bb_realpath ($path)
{
return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
return (!function_exists('realpath') || !realpath(INC_DIR . 'functions.php')) ? $path : realpath($path);
}
function login_redirect ($url = '')
@ -2357,7 +2357,7 @@ function remove_stopwords ($text)
if (is_null($stopwords))
{
$stopwords = explode(' ', str_compact(@file_get_contents(LANG_DIR .'search_stopwords.txt')));
$stopwords = explode(' ', str_compact(file_get_contents(LANG_DIR .'search_stopwords.txt')));
array_deep($stopwords, 'pad_with_space');
}

View file

@ -802,7 +802,7 @@ function user_delete ($user_id, $delete_posts = false)
foreach (explode(',', $user_csv) as $user_id)
{
$file_path = $bb_cfg['atom']['path'] .'/u/'. floor($user_id/5000) .'/'. ($user_id % 100) .'/'. $user_id .'.atom';
@unlink($file_path);
unlink($file_path);
}
}

View file

@ -69,7 +69,7 @@ function update_forum_feed ($forum_id, $forum_data)
}
if (!count($topics))
{
@unlink($file_path);
unlink($file_path);
return false;
}
if (create_atom($file_path, 'f', $forum_id, htmlCHR($forum_data['forum_name']), $topics)) return true;
@ -112,7 +112,7 @@ function update_user_feed ($user_id, $username)
}
if (!count($topics))
{
@unlink($file_path);
unlink($file_path);
return false;
}
if (create_atom($file_path, 'u', $user_id, wbr($username), $topics)) return true;
@ -178,7 +178,7 @@ function create_atom ($file_path, $mode, $id, $title, $topics)
$atom .= "</entry>\n";
}
$atom .= "</feed>";
@unlink($file_path);
unlink($file_path);
$fp = fopen($file_path, "w");
fwrite($fp, $atom);
fclose ($fp);

View file

@ -48,7 +48,7 @@ function get_sql_log_html ($db_obj, $log_name)
$id = "sql_{$i}_". mt_rand();
$sql = short_query($dbg['sql'], true);
$time = sprintf('%.4f', $dbg['time']);
$perc = @sprintf('[%2d]', $dbg['time']*100/$db_obj->sql_timetotal);
$perc = sprintf('[%2d]', $dbg['time']*100/$db_obj->sql_timetotal);
$info = !empty($dbg['info']) ? $dbg['info'] .' ['. $dbg['src'] .']' : $dbg['src'];
$log .= ''

View file

@ -35,7 +35,7 @@ function tz_select ($default, $select_name = 'timezone')
}
$tz_select = '<select name="' . $select_name . '">';
while( list($offset, $zone) = @each($lang['TZ']) )
while( list($offset, $zone) = each($lang['TZ']) )
{
$selected = ( $offset == $default ) ? ' selected="selected"' : '';
$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';

View file

@ -171,7 +171,7 @@ function tracker_register ($topic_id, $mode = '', $tor_status = TOR_NOT_APPROVED
fclose($fp);
}
$info = (@$tor_decoded['info']) ? $tor_decoded['info'] : array();
$info = ($tor_decoded['info']) ? $tor_decoded['info'] : array();
if (!isset($info['name']) || !isset($info['piece length']) || !isset($info['pieces']) || strlen($info['pieces']) % 20 != 0)
{

View file

@ -147,16 +147,16 @@ class upload_common
return false;
}
}
if (!@rename($this->file['tmp_name'], $file_path))
if (!rename($this->file['tmp_name'], $file_path))
{
if (!@copy($this->file['tmp_name'], $file_path))
if (!copy($this->file['tmp_name'], $file_path))
{
$this->errors[] = 'Cannot copy tmp file';
return false;
}
@unlink($this->file['tmp_name']);
unlink($this->file['tmp_name']);
}
@chmod($file_path, 0664);
chmod($file_path, 0664);
return file_exists($file_path);
}

View file

@ -485,7 +485,7 @@ function cron_release_deadlock ()
function cron_release_file_lock ()
{
$lock_released = @rename(CRON_RUNNING, CRON_ALLOWED);
$lock_released = rename(CRON_RUNNING, CRON_ALLOWED);
cron_touch_lock_file(CRON_ALLOWED);
}
@ -496,10 +496,10 @@ function cron_touch_lock_file ($lock_file)
function cron_enable_board ()
{
@rename(BB_DISABLED, BB_ENABLED);
rename(BB_DISABLED, BB_ENABLED);
}
function cron_disable_board ()
{
@rename(BB_ENABLED, BB_DISABLED);
rename(BB_ENABLED, BB_DISABLED);
}

View file

@ -263,7 +263,7 @@ class user_common
));
$sql = "INSERT INTO ". BB_SESSIONS . $args;
if (@DB()->query($sql))
if (DB()->query($sql))
{
break;
}
@ -455,7 +455,7 @@ class user_common
*/
function get_sessiondata ()
{
$sd_resv = !empty($_COOKIE[COOKIE_DATA]) ? @unserialize($_COOKIE[COOKIE_DATA]) : array();
$sd_resv = !empty($_COOKIE[COOKIE_DATA]) ? unserialize($_COOKIE[COOKIE_DATA]) : array();
// autologin_id
if (!empty($sd_resv['uk']) && verify_id($sd_resv['uk'], LOGIN_KEY_LENGTH))

View file

@ -51,7 +51,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
// but we have to grab bcc and cc headers and treat them differently
// Something we really didn't take into consideration originally
$header_array = explode("\r\n", $headers);
@reset($header_array);
reset($header_array);
$headers = $cc = $bcc = '';
while(list(, $header) = each($header_array))
@ -85,7 +85,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
// Ok we have error checked as much as we can to this point let's get on it already
$ssl = ($bb_cfg['smtp_ssl']) ? 'ssl://' : '';
if( !$socket = @fsockopen($ssl . $bb_cfg['smtp_host'], $bb_cfg['smtp_port'], $errno, $errstr, 20) )
if( !$socket = fsockopen($ssl . $bb_cfg['smtp_host'], $bb_cfg['smtp_port'], $errno, $errstr, 20) )
{
bb_die('Could not connect to smtp host : '. $errno .' : '. $errstr);
}
@ -129,7 +129,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
}
// Ok now do the CC and BCC fields...
@reset($bcc);
reset($bcc);
while(list(, $bcc_address) = each($bcc))
{
// Add an additional bit of error checking to bcc header...
@ -141,7 +141,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
}
}
@reset($cc);
reset($cc);
while(list(, $cc_address) = each($cc))
{
// Add an additional bit of error checking to cc header

View file

@ -194,12 +194,12 @@ class Template
// Creating cache filename
if ($can_cache) {
$this->files_cache2[$handle] = $this->make_filename_cache($this->files[$handle]);
if (@file_exists($this->files_cache2[$handle])) {
if (file_exists($this->files_cache2[$handle])) {
$this->files_cache[$handle] = $this->files_cache2[$handle];
}
}
// Checking if tpl and/or php file exists
if (empty($this->files_cache[$handle]) && !@file_exists($this->files[$handle])) {
if (empty($this->files_cache[$handle]) && !file_exists($this->files[$handle])) {
if ($quiet) {
return false;
}
@ -207,8 +207,8 @@ class Template
}
// Checking if we should recompile cache
if (!empty($this->files_cache[$handle])) {
$cache_time = @filemtime($this->files_cache[$handle]);
if (@filemtime($this->files[$handle]) > $cache_time) {
$cache_time = filemtime($this->files_cache[$handle]);
if (filemtime($this->files[$handle]) > $cache_time) {
// File was changed, don't use cache file (will be recompled if configuration allowes it)
$this->files_cache[$handle] = '';
}
@ -466,7 +466,7 @@ class Template
$filename = $this->files[$handle];
if (($str = @file_get_contents($filename)) === false) {
if (($str = file_get_contents($filename)) === false) {
die("Template->loadfile(): file $filename for handle $handle is empty");
}
@ -967,7 +967,7 @@ class Template
switch ($expr_type) {
case 'even':
if (@$tokens[$expr_end] == 'by') {
if ($tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "!(($is_arg / $expr_arg) % $expr_arg)";
@ -977,7 +977,7 @@ class Template
break;
case 'odd':
if (@$tokens[$expr_end] == 'by') {
if ($tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "(($is_arg / $expr_arg) % $expr_arg)";
@ -987,7 +987,7 @@ class Template
break;
case 'div':
if (@$tokens[$expr_end] == 'by') {
if ($tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "!($is_arg % $expr_arg)";

View file

@ -12,10 +12,10 @@ $dl_users_div_style_overflow = "padding: 6px; height: $dl_users_overflow_div_he
$template->assign_vars(array('DL_BUTTONS' => false));
$count_mode = ($bb_cfg['bt_dl_list_only_count'] && !(@$_GET['dl'] === 'names'));
$count_mode = ($bb_cfg['bt_dl_list_only_count'] && !($_GET['dl'] === 'names'));
$dl_topic = ($t_data['tracker_status'] && !($bb_cfg['bt_dl_list_only_1st_page'] && $start));
$show_dl_list = ($dl_topic && ($bb_cfg['bt_show_dl_list'] || ($bb_cfg['allow_dl_list_names_mode'] && @$_GET['dl'] === 'names')));
$show_dl_list = ($dl_topic && ($bb_cfg['bt_show_dl_list'] || ($bb_cfg['allow_dl_list_names_mode'] && $_GET['dl'] === 'names')));
$show_dl_buttons = ($dl_topic && $bb_cfg['bt_show_dl_list_buttons']);
// link to clear DL-List

View file

@ -207,9 +207,9 @@ foreach ($profile_fields as $field => $can_edit)
case 'user_password':
if ($submit)
{
$cur_pass = (string) @$_POST['cur_pass'];
$new_pass = (string) @$_POST['new_pass'];
$cfm_pass = (string) @$_POST['cfm_pass'];
$cur_pass = (string) $_POST['cur_pass'];
$new_pass = (string) $_POST['new_pass'];
$cfm_pass = (string) $_POST['cfm_pass'];
// пароль для гостя и при смене пароля юзером
if (!empty($new_pass))

View file

@ -318,10 +318,10 @@ if ($tor_reged)
$tmp = array();
$tmp[0]['seeder'] = $tmp[0]['username'] = $tmp[1]['username'] = 0;
$tmp[1]['seeder'] = 1;
$tmp[0]['username'] = (int) @$peers[0]['leechers'];
$tmp[1]['username'] = (int) @$peers[0]['seeders'];
$tor_speed_up = (int) @$peers[0]['speed_up'];
$tor_speed_down = (int) @$peers[0]['speed_down'];
$tmp[0]['username'] = (int) $peers[0]['leechers'];
$tmp[1]['username'] = (int) $peers[0]['seeders'];
$tor_speed_up = (int) $peers[0]['speed_up'];
$tor_speed_down = (int) $peers[0]['speed_down'];
$peers = $tmp;
$template->assign_vars(array(
@ -445,7 +445,7 @@ if ($tor_reged)
}
else
{
$compl_size = (@$peer['remain'] && $tor_size && $tor_size > $peer['remain']) ? ($tor_size - $peer['remain']) : 0;
$compl_size = ($peer['remain'] && $tor_size && $tor_size > $peer['remain']) ? ($tor_size - $peer['remain']) : 0;
$compl_perc = ($compl_size) ? floor($compl_size * 100 / $tor_size) : 0;
$leechers .= '<nobr><a href="'. $u_prof_href .'" class="leechmed">'. $peer['username'] .'</a>';

View file

@ -2333,8 +2333,8 @@ $lang['BOARD_DISABLE_EXPL'] = 'disable board when this job is run';
$lang['RUN_COUNTER'] = 'Run counter';
$lang['JOB_REMOVED'] = 'The problem has been removed successfully';
$lang['SCRIPT_DUPLICATE'] = 'Script <b>'. @$_POST['cron_script'] .'</b> already exists!';
$lang['TITLE_DUPLICATE'] = 'Task Name <b>'. @$_POST['cron_title'] .'</b> already exists!';
$lang['SCRIPT_DUPLICATE'] = 'Script <b>'. $_POST['cron_script'] .'</b> already exists!';
$lang['TITLE_DUPLICATE'] = 'Task Name <b>'. $_POST['cron_title'] .'</b> already exists!';
$lang['CLICK_RETURN_JOBS_ADDED'] = '%sReturn to the addition problem%s';
$lang['CLICK_RETURN_JOBS'] = '%sBack to the Task Scheduler%s';

View file

@ -2333,8 +2333,8 @@ $lang['BOARD_DISABLE_EXPL'] = 'отключать форум, когда зад
$lang['RUN_COUNTER'] = 'Кол-во запусков';
$lang['JOB_REMOVED'] = 'Задача была успешно удалена';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт <b>'. @$_POST['cron_script'] .'</b> уже существует!';
$lang['TITLE_DUPLICATE'] = 'Название задачи <b>'. @$_POST['cron_title'] .'</b> уже существует!';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт <b>'. $_POST['cron_script'] .'</b> уже существует!';
$lang['TITLE_DUPLICATE'] = 'Название задачи <b>'. $_POST['cron_title'] .'</b> уже существует!';
$lang['CLICK_RETURN_JOBS_ADDED'] = '%sВернуться к добавлению задачи%s';
$lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s';

View file

@ -2333,8 +2333,8 @@ $lang['BOARD_DISABLE_EXPL'] = 'відключати форум, коли зав
$lang['RUN_COUNTER'] = 'Кількість запусків';
$lang['JOB_REMOVED'] = 'Завдання було успішно видалено';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт <b>'. @$_POST['cron_script'] .'</b> вже існує!';
$lang['TITLE_DUPLICATE'] = 'Назва завдання <b>'. @$_POST['cron_title'] .'</b> вже існує!';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт <b>'. $_POST['cron_script'] .'</b> вже існує!';
$lang['TITLE_DUPLICATE'] = 'Назва завдання <b>'. $_POST['cron_title'] .'</b> вже існує!';
$lang['CLICK_RETURN_JOBS_ADDED'] = '%sПовернутися до додавання задачі%s';
$lang['CLICK_RETURN_JOBS'] = '%sПовернутися до планувальника завдань%s';

View file

@ -36,7 +36,7 @@ elseif (!empty($_POST['redirect']))
{
$redirect_url = str_replace('&amp;', '&', htmlspecialchars($_POST['redirect']));
}
elseif (!empty($_SERVER['HTTP_REFERER']) && ($parts = @parse_url($_SERVER['HTTP_REFERER'])))
elseif (!empty($_SERVER['HTTP_REFERER']) && ($parts = parse_url($_SERVER['HTTP_REFERER'])))
{
$redirect_url = (isset($parts['path']) ? $parts['path'] : "index.php") . (isset($parts['query']) ? '?'. $parts['query'] : '');
}

View file

@ -5,10 +5,10 @@ require('./common.php');
$user->session_start(array('req_login' => true));
$mode = (string) @$_POST['mode'];
$topic_id = (int) @$_POST['topic_id'];
$forum_id = (int) @$_POST['forum_id'];
$vote_id = (int) @$_POST['vote_id'];
$mode = (string) $_POST['mode'];
$topic_id = (int) $_POST['topic_id'];
$forum_id = (int) $_POST['forum_id'];
$vote_id = (int) $_POST['vote_id'];
$return_topic_url = TOPIC_URL . $topic_id;
$return_topic_url .= !empty($_POST['start']) ? "&amp;start=". intval($_POST['start']) : '';
@ -173,8 +173,8 @@ class bb_poll
function build_poll_data ($posted_data)
{
$poll_caption = (string) @$posted_data['poll_caption'];
$poll_votes = (string) @$posted_data['poll_votes'];
$poll_caption = (string) $posted_data['poll_caption'];
$poll_votes = (string) $posted_data['poll_votes'];
$this->poll_votes = array();
if (!$poll_caption = str_compact($poll_caption))

View file

@ -11,22 +11,22 @@ $user->session_start();
$page_cfg['load_tpl_vars'] = ['post_icons'];
$submit = (bool) @$_REQUEST['post'];
$preview = (bool) @$_REQUEST['preview'];
$delete = (bool) @$_REQUEST['delete'];
$submit = (bool) $_REQUEST['post'];
$preview = (bool) $_REQUEST['preview'];
$delete = (bool) $_REQUEST['delete'];
$forum_id = (int) @$_REQUEST[POST_FORUM_URL];
$topic_id = (int) @$_REQUEST[POST_TOPIC_URL];
$post_id = (int) @$_REQUEST[POST_POST_URL];
$forum_id = (int) $_REQUEST[POST_FORUM_URL];
$topic_id = (int) $_REQUEST[POST_TOPIC_URL];
$post_id = (int) $_REQUEST[POST_POST_URL];
$mode = (string) @$_REQUEST['mode'];
$mode = (string) $_REQUEST['mode'];
$confirm = isset($_POST['confirm']);
$orig_word = $replacement_word = [];
// Set topic type
$topic_type = (@$_POST['topictype']) ? (int) $_POST['topictype'] : POST_NORMAL;
$topic_type = ($_POST['topictype']) ? (int) $_POST['topictype'] : POST_NORMAL;
$topic_type = in_array($topic_type, [POST_NORMAL, POST_STICKY, POST_ANNOUNCE]) ? $topic_type : POST_NORMAL;
$selected_rg = $switch_rg_sig = $switch_poster_rg_sig = 0;
@ -278,7 +278,7 @@ $topic_has_new_posts = false;
if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote' || $mode == 'reply') && isset($_COOKIE[COOKIE_TOPIC]))
{
if ($topic_last_read = max(intval(@$tracking_topics[$topic_id]), intval(@$tracking_forums[$forum_id])))
if ($topic_last_read = max(intval($tracking_topics[$topic_id]), intval($tracking_forums[$forum_id])))
{
$sql = "SELECT p.*, pt.post_text, u.username, u.user_rank
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt, ". BB_USERS ." u

View file

@ -439,10 +439,10 @@ if ($mode == 'read')
'QR_SUBJECT' => (!preg_match('/^Re:/', $post_subject) ? 'Re: ' : '') . $post_subject,
'MESSAGE_TO' => $username_to,
'MESSAGE_FROM' => $username_from,
'RANK_IMAGE' => (@$rank_image) ? $rank_image : '',
'POSTER_JOINED' => (@$poster_joined) ? $poster_joined : '',
'POSTER_POSTS' => (@$poster_posts) ? $poster_posts : '',
'POSTER_FROM' => (@$poster_from) ? $poster_from : '',
'RANK_IMAGE' => ($rank_image) ? $rank_image : '',
'POSTER_JOINED' => ($poster_joined) ? $poster_joined : '',
'POSTER_POSTS' => ($poster_posts) ? $poster_posts : '',
'POSTER_FROM' => ($poster_from) ? $poster_from : '',
'POST_SUBJECT' => $post_subject,
'POST_DATE' => $post_date,
'PM_MESSAGE' => $private_message,
@ -571,11 +571,11 @@ else if ( ( $delete && $mark_list ) || $delete_all )
switch ($row['privmsgs_type'])
{
case PRIVMSGS_NEW_MAIL:
@$update_users['new'][$row['privmsgs_to_userid']]++;
$update_users['new'][$row['privmsgs_to_userid']]++;
break;
case PRIVMSGS_UNREAD_MAIL:
@$update_users['unread'][$row['privmsgs_to_userid']]++;
$update_users['unread'][$row['privmsgs_to_userid']]++;
break;
}
}
@ -763,11 +763,11 @@ else if ( $save && $mark_list && $folder != 'savebox' && $folder != 'outbox' )
switch ($row['privmsgs_type'])
{
case PRIVMSGS_NEW_MAIL:
@$update_users['new'][$row['privmsgs_to_userid']]++;
$update_users['new'][$row['privmsgs_to_userid']]++;
break;
case PRIVMSGS_UNREAD_MAIL:
@$update_users['unread'][$row['privmsgs_to_userid']]++;
$update_users['unread'][$row['privmsgs_to_userid']]++;
break;
}
}
@ -1639,7 +1639,7 @@ else
}
}
$template->assign_vars(array('PAGE_TITLE' => @$page_title));
$template->assign_vars(array('PAGE_TITLE' => $page_title));
require(PAGE_HEADER);

View file

@ -41,7 +41,7 @@ if (!$forums = $datastore->get('cat_forums'))
$datastore->update('cat_forums');
$forums = $datastore->get('cat_forums');
}
if (!$forum_id OR !$forum_data = @$forums['forum'][$forum_id])
if (!$forum_id OR !$forum_data = $forums['forum'][$forum_id])
{
bb_die($lang['FORUM_NOT_EXIST']);
}
@ -83,7 +83,7 @@ $tor_status = -1; // all by default
if ($is_auth['auth_mod'])
{
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : @$_SERVER['REQUEST_URI'];
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : $_SERVER['REQUEST_URI'];
$redirect = url_arg($redirect, 'mod', 1, '&');
$mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1";
@ -231,7 +231,7 @@ $select_tpp = '';
if ($is_auth['auth_mod'])
{
if ($req_tpp = abs(intval(@$_REQUEST['tpp'])) AND in_array($req_tpp, $bb_cfg['allowed_topics_per_page']))
if ($req_tpp = abs(intval($_REQUEST['tpp'])) AND in_array($req_tpp, $bb_cfg['allowed_topics_per_page']))
{
$topics_per_page = $req_tpp;
}

View file

@ -29,7 +29,7 @@ $select_ppp = '';
if ($userdata['session_admin'])
{
if ($req_ppp = abs(intval(@$_REQUEST['ppp'])) AND in_array($req_ppp, $bb_cfg['allowed_posts_per_page']))
if ($req_ppp = abs(intval($_REQUEST['ppp'])) AND in_array($req_ppp, $bb_cfg['allowed_posts_per_page']))
{
$posts_per_page = $req_ppp;
}
@ -165,7 +165,7 @@ $mod_redirect_url = '';
if ($is_auth['auth_mod'])
{
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : @$_SERVER['REQUEST_URI'];
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : $_SERVER['REQUEST_URI'];
$redirect = url_arg($redirect, 'mod', 1, '&');
$mod_redirect_url = LOGIN_URL . "?redirect=$redirect&admin=1";
@ -637,8 +637,8 @@ for($i = 0; $i < $total_posts; $i++)
// Replace naughty words
if (count($orig_word))
{
if ($user_sig) $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
if ($user_sig) $user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
}
// Replace newlines (we use this rather than nl2br because till recently it wasn't XHTML compliant)