From b6fead9f481ef25a6b0d9aa0363370a93e337c43 Mon Sep 17 00:00:00 2001 From: Vasily Komrakov Date: Sun, 13 Mar 2016 01:06:18 +0300 Subject: [PATCH] Remove at --- admin/admin_cron.php | 4 ++-- admin/admin_forumauth.php | 4 ++-- admin/admin_forums.php | 2 +- admin/admin_mass_email.php | 2 +- admin/admin_ranks.php | 2 +- admin/admin_rebuild_search.php | 12 +++++----- admin/admin_smilies.php | 16 ++++++------- admin/admin_ug_auth.php | 16 ++++++------- admin/admin_user_search.php | 6 ++--- admin/index.php | 18 +++++++------- bt/includes/init_tr.php | 14 +++++------ common.php | 22 ++++++++--------- install/upgrade/r583-convert_avatars.php | 2 +- install/upgrade/r588-short_lang.php | 2 +- install/upgrade/r600-stable.php | 2 +- library/ajax/manage_admin.php | 4 ++-- library/ajax/posts.php | 2 +- library/ajax/sitemap.php | 4 ++-- library/ajax/topic_tpl.php | 4 ++-- library/ajax/view_post.php | 4 ++-- library/includes/api/sphinx.php | 6 ++--- library/includes/bbcode.php | 4 ++-- library/includes/cache/memcache.php | 2 +- library/includes/cache/redis.php | 2 +- library/includes/cache/sqlite.php | 4 ++-- library/includes/classes/emailer.php | 14 +++++------ library/includes/classes/sitemap.php | 12 +++++----- library/includes/core/mysql.php | 24 +++++++++---------- library/includes/cron/cron_init.php | 8 +++---- .../cron/jobs/prune_inactive_users.php | 2 +- library/includes/cron/jobs/sitemap.php | 2 +- library/includes/datastore/memcache.php | 2 +- library/includes/datastore/redis.php | 2 +- library/includes/functions.php | 10 ++++---- library/includes/functions_admin.php | 2 +- library/includes/functions_atom.php | 6 ++--- library/includes/functions_dev.php | 2 +- library/includes/functions_selects.php | 2 +- library/includes/functions_torrent.php | 2 +- library/includes/functions_upload.php | 8 +++---- library/includes/init_bb.php | 6 ++--- library/includes/sessions.php | 4 ++-- library/includes/smtp.php | 8 +++---- library/includes/template.php | 16 ++++++------- library/includes/torrent_show_dl_list.php | 4 ++-- library/includes/ucp/register.php | 6 ++--- library/includes/viewtopic_torrent.php | 10 ++++---- library/language/en/main.php | 4 ++-- library/language/ru/main.php | 4 ++-- library/language/uk/main.php | 4 ++-- login.php | 2 +- poll.php | 12 +++++----- posting.php | 18 +++++++------- privmsg.php | 18 +++++++------- viewforum.php | 6 ++--- viewtopic.php | 8 +++---- 56 files changed, 194 insertions(+), 194 deletions(-) diff --git a/admin/admin_cron.php b/admin/admin_cron.php index 75cd7afc0..6c23fa23d 100644 --- a/admin/admin_cron.php +++ b/admin/admin_cron.php @@ -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"); } diff --git a/admin/admin_forumauth.php b/admin/admin_forumauth.php index f4798d3dc..ad2d97294 100644 --- a/admin/admin_forumauth.php +++ b/admin/admin_forumauth.php @@ -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; diff --git a/admin/admin_forums.php b/admin/admin_forums.php index 1a2639c0c..72cb25d71 100644 --- a/admin/admin_forums.php +++ b/admin/admin_forums.php @@ -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(); diff --git a/admin/admin_mass_email.php b/admin/admin_mass_email.php index e97560c56..be9cb7882 100644 --- a/admin/admin_mass_email.php +++ b/admin/admin_mass_email.php @@ -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', ''); diff --git a/admin/admin_ranks.php b/admin/admin_ranks.php index 641ea54e3..18c37366d 100644 --- a/admin/admin_ranks.php +++ b/admin/admin_ranks.php @@ -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']) ? '' : '', diff --git a/admin/admin_rebuild_search.php b/admin/admin_rebuild_search.php index 391c2917f..abc0663a2 100644 --- a/admin/admin_rebuild_search.php +++ b/admin/admin_rebuild_search.php @@ -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']; diff --git a/admin/admin_smilies.php b/admin/admin_smilies.php index 708a3e39a..8c59ff95a 100644 --- a/admin/admin_smilies.php +++ b/admin/admin_smilies.php @@ -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 = ''; - while( list($offset, $zone) = @each($lang['TZ']) ) + while( list($offset, $zone) = each($lang['TZ']) ) { $selected = ( $offset == $default ) ? ' selected="selected"' : ''; $tz_select .= ''; diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index e246649e7..bf13d061c 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -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) { diff --git a/library/includes/functions_upload.php b/library/includes/functions_upload.php index 9faa6eca2..2174ea04e 100644 --- a/library/includes/functions_upload.php +++ b/library/includes/functions_upload.php @@ -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); } diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index b7ed6dc8f..e7c5d2cef 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -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); } \ No newline at end of file diff --git a/library/includes/sessions.php b/library/includes/sessions.php index c3ed91d5e..72947390d 100644 --- a/library/includes/sessions.php +++ b/library/includes/sessions.php @@ -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)) diff --git a/library/includes/smtp.php b/library/includes/smtp.php index 175e6685f..7bf5679be 100644 --- a/library/includes/smtp.php +++ b/library/includes/smtp.php @@ -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 diff --git a/library/includes/template.php b/library/includes/template.php index 6951e9e95..22bca933a 100644 --- a/library/includes/template.php +++ b/library/includes/template.php @@ -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)"; diff --git a/library/includes/torrent_show_dl_list.php b/library/includes/torrent_show_dl_list.php index fff321de8..c17946adf 100644 --- a/library/includes/torrent_show_dl_list.php +++ b/library/includes/torrent_show_dl_list.php @@ -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 diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index f6d1d670a..87a348e9c 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -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)) diff --git a/library/includes/viewtopic_torrent.php b/library/includes/viewtopic_torrent.php index 235bb2927..226e19912 100644 --- a/library/includes/viewtopic_torrent.php +++ b/library/includes/viewtopic_torrent.php @@ -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 .= ''. $peer['username'] .''; diff --git a/library/language/en/main.php b/library/language/en/main.php index 22b1bd1b6..26b16fe69 100644 --- a/library/language/en/main.php +++ b/library/language/en/main.php @@ -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 '. @$_POST['cron_script'] .' already exists!'; -$lang['TITLE_DUPLICATE'] = 'Task Name '. @$_POST['cron_title'] .' already exists!'; +$lang['SCRIPT_DUPLICATE'] = 'Script '. $_POST['cron_script'] .' already exists!'; +$lang['TITLE_DUPLICATE'] = 'Task Name '. $_POST['cron_title'] .' already exists!'; $lang['CLICK_RETURN_JOBS_ADDED'] = '%sReturn to the addition problem%s'; $lang['CLICK_RETURN_JOBS'] = '%sBack to the Task Scheduler%s'; diff --git a/library/language/ru/main.php b/library/language/ru/main.php index f271eaac0..c670fdcfd 100644 --- a/library/language/ru/main.php +++ b/library/language/ru/main.php @@ -2333,8 +2333,8 @@ $lang['BOARD_DISABLE_EXPL'] = 'отключать форум, когда зад $lang['RUN_COUNTER'] = 'Кол-во запусков'; $lang['JOB_REMOVED'] = 'Задача была успешно удалена'; -$lang['SCRIPT_DUPLICATE'] = 'Скрипт '. @$_POST['cron_script'] .' уже существует!'; -$lang['TITLE_DUPLICATE'] = 'Название задачи '. @$_POST['cron_title'] .' уже существует!'; +$lang['SCRIPT_DUPLICATE'] = 'Скрипт '. $_POST['cron_script'] .' уже существует!'; +$lang['TITLE_DUPLICATE'] = 'Название задачи '. $_POST['cron_title'] .' уже существует!'; $lang['CLICK_RETURN_JOBS_ADDED'] = '%sВернуться к добавлению задачи%s'; $lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s'; diff --git a/library/language/uk/main.php b/library/language/uk/main.php index 75c1e619f..77ee1547a 100644 --- a/library/language/uk/main.php +++ b/library/language/uk/main.php @@ -2333,8 +2333,8 @@ $lang['BOARD_DISABLE_EXPL'] = 'відключати форум, коли зав $lang['RUN_COUNTER'] = 'Кількість запусків'; $lang['JOB_REMOVED'] = 'Завдання було успішно видалено'; -$lang['SCRIPT_DUPLICATE'] = 'Скрипт '. @$_POST['cron_script'] .' вже існує!'; -$lang['TITLE_DUPLICATE'] = 'Назва завдання '. @$_POST['cron_title'] .' вже існує!'; +$lang['SCRIPT_DUPLICATE'] = 'Скрипт '. $_POST['cron_script'] .' вже існує!'; +$lang['TITLE_DUPLICATE'] = 'Назва завдання '. $_POST['cron_title'] .' вже існує!'; $lang['CLICK_RETURN_JOBS_ADDED'] = '%sПовернутися до додавання задачі%s'; $lang['CLICK_RETURN_JOBS'] = '%sПовернутися до планувальника завдань%s'; diff --git a/login.php b/login.php index b323be4e5..f78bccda7 100644 --- a/login.php +++ b/login.php @@ -36,7 +36,7 @@ elseif (!empty($_POST['redirect'])) { $redirect_url = str_replace('&', '&', 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'] : ''); } diff --git a/poll.php b/poll.php index e51c6574b..f295d1959 100644 --- a/poll.php +++ b/poll.php @@ -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']) ? "&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)) diff --git a/posting.php b/posting.php index c77e532b3..e947e779d 100644 --- a/posting.php +++ b/posting.php @@ -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 diff --git a/privmsg.php b/privmsg.php index 9da32edb9..0fcc5d966 100644 --- a/privmsg.php +++ b/privmsg.php @@ -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); diff --git a/viewforum.php b/viewforum.php index 1f74fef64..dbbd4775f 100644 --- a/viewforum.php +++ b/viewforum.php @@ -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; } diff --git a/viewtopic.php b/viewtopic.php index c160811b4..de9f76963 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -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)