From f7cc55b984d3490c67f6269af944546097e0382b Mon Sep 17 00:00:00 2001 From: Yuriy Pikhtarev Date: Wed, 24 May 2017 01:23:28 +0300 Subject: [PATCH] Bugsnag integration and some bugfixes in for cycles. --- admin/admin_attach_cp.php | 4 ++-- admin/admin_extensions.php | 2 +- admin/admin_forumauth.php | 8 ++++---- admin/admin_forumauth_list.php | 16 ++++++++-------- admin/admin_smilies.php | 2 +- admin/admin_user_ban.php | 8 ++++---- ajax.php | 4 ++-- common.php | 12 +++++++++--- composer.json | 1 + library/config.php | 7 +++++++ 10 files changed, 39 insertions(+), 25 deletions(-) diff --git a/admin/admin_attach_cp.php b/admin/admin_attach_cp.php index 6e32a7d17..8be0ef95f 100644 --- a/admin/admin_attach_cp.php +++ b/admin/admin_attach_cp.php @@ -398,7 +398,7 @@ if ($view === 'attachments') { for ($i = 0, $iMax = count($attachments); $i < $iMax; $i++) { $delete_box = ''; - for ($j = 0, $iMax = count($delete_id_list); $j < $iMax; $j++) { + for ($j = 0, $jMax = count($delete_id_list); $j < $jMax; $j++) { if ($delete_id_list[$j] == $attachments[$i]['attach_id']) { $delete_box = ''; break; @@ -409,7 +409,7 @@ if ($view === 'attachments') { // Is the Attachment assigned to more than one post ? // If it's not assigned to any post, it's an private message thingy. ;) - $post_titles = array(); + $post_titles = []; $sql = "SELECT * FROM " . BB_ATTACHMENTS . " diff --git a/admin/admin_extensions.php b/admin/admin_extensions.php index cb5920f87..b9cea0fa1 100644 --- a/admin/admin_extensions.php +++ b/admin/admin_extensions.php @@ -252,7 +252,7 @@ if ($submit && $mode == 'groups') { $allowed_list = array(); for ($i = 0, $iMax = count($group_allowed_list); $i < $iMax; $i++) { - for ($j = 0, $jMax = count($group_change_list); $j < $iMax; $j++) { + for ($j = 0, $jMax = count($group_change_list); $j < $jMax; $j++) { if ($group_allowed_list[$i] == $group_change_list[$j]) { $allowed_list[$j] = 1; } diff --git a/admin/admin_forumauth.php b/admin/admin_forumauth.php index 377b9f3a5..08f8771d7 100644 --- a/admin/admin_forumauth.php +++ b/admin/admin_forumauth.php @@ -163,7 +163,7 @@ if (empty($forum_id)) { reset($simple_auth_ary); foreach ($simple_auth_ary as $key => $auth_levels) { $matched = 1; - for ($k = 0, $kMax = count($auth_levels); $k < $iMax; $k++) { + for ($k = 0, $kMax = count($auth_levels); $k < $kMax; $k++) { $matched_type = $key; if ($forum_rows[0][$forum_auth_fields[$k]] != $auth_levels[$k]) { @@ -189,7 +189,7 @@ if (empty($forum_id)) { if (empty($adv)) { $simple_auth = ''; - for ($k = 0, $kMax = count($forum_auth_levels); $k < $iMax; $k++) { + for ($k = 0, $kMax = count($forum_auth_levels); $k < $kMax; $k++) { $selected = ($forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k]) ? ' selected="selected"' : ''; $custom_auth[$j] .= ''; } diff --git a/admin/admin_forumauth_list.php b/admin/admin_forumauth_list.php index a00048d12..fac87ab28 100644 --- a/admin/admin_forumauth_list.php +++ b/admin/admin_forumauth_list.php @@ -224,7 +224,7 @@ if (empty($forum_id) && empty($cat_id)) { 'CAT_URL' => 'admin_forumauth_list.php' . '?' . POST_CAT_URL . '=' . $category_rows[$i]['cat_id']) ); - for ($j = 0, $jMax = count($forum_rows); $j < $iMax; $j++) { + for ($j = 0, $jMax = count($forum_rows); $j < $jMax; $j++) { if ($cat_id == $forum_rows[$j]['cat_id']) { $template->assign_block_vars('cat_row.forum_row', array( 'ROW_CLASS' => !($j % 2) ? 'row4' : 'row5', @@ -232,9 +232,9 @@ if (empty($forum_id) && empty($cat_id)) { 'IS_SUBFORUM' => $forum_rows[$j]['forum_parent'], )); - for ($k = 0, $kMax = count($forum_auth_fields); $k < $iMax; $k++) { + for ($k = 0, $kMax = count($forum_auth_fields); $k < $kMax; $k++) { $item_auth_value = $forum_rows[$j][$forum_auth_fields[$k]]; - for ($l = 0, $lMax = count($forum_auth_const); $l < $iMax; $l++) { + for ($l = 0, $lMax = count($forum_auth_const); $l < $lMax; $l++) { if ($item_auth_value == $forum_auth_const[$l]) { $item_auth_level = $forum_auth_levels[$l]; break; @@ -283,7 +283,7 @@ if (empty($forum_id) && empty($cat_id)) { 'CAT_URL' => 'admin_forumauth_list.php?' . POST_CAT_URL . '=' . $cat_id) ); - for ($j = 0, $jMax = count($forum_rows); $j < $iMax; $j++) { + for ($j = 0, $jMax = count($forum_rows); $j < $jMax; $j++) { if ($cat_id == $forum_rows[$j]['cat_id']) { $template->assign_block_vars('cat_row.forum_row', array( 'ROW_CLASS' => !($j % 2) ? 'row4' : 'row5', @@ -291,9 +291,9 @@ if (empty($forum_id) && empty($cat_id)) { 'IS_SUBFORUM' => $forum_rows[$j]['forum_parent'], )); - for ($k = 0, $kMax = count($forum_auth_fields); $k < $iMax; $k++) { + for ($k = 0, $kMax = count($forum_auth_fields); $k < $kMax; $k++) { $item_auth_value = $forum_rows[$j][$forum_auth_fields[$k]]; - for ($l = 0, $lMax = count($forum_auth_const); $l < $iMax; $l++) { + for ($l = 0, $lMax = count($forum_auth_const); $l < $lMax; $l++) { if ($item_auth_value == $forum_auth_const[$l]) { $item_auth_level = $forum_auth_levels[$l]; break; @@ -311,10 +311,10 @@ if (empty($forum_id) && empty($cat_id)) { // next generate the information to allow the permissions to be changed // note: we always read from the first forum in the category // - for ($j = 0, $jMax = count($forum_auth_fields); $j < $iMax; $j++) { + for ($j = 0, $jMax = count($forum_auth_fields); $j < $jMax; $j++) { $custom_auth[$j] = '