diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-01-07 11:02:31 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-07 11:02:31 +0100 |
commit | 1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99 (patch) | |
tree | d70037f3f547a71e4a6b87bcddb31aeb19db7328 /phpBB/install | |
parent | Merge remote-tracking branch 'phpbb-security/prep-release-3.1.12' into prep-r... (diff) | |
parent | Merge pull request #4680 from marc1706/ticket/15055 (diff) | |
download | phpbb-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar.gz phpbb-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar.bz2 phpbb-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.zip |
Merge remote-tracking branch 'upstream/3.2.x' into prep-release-3.2.2
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convert/controller/convertor.php | 4 | ||||
-rw-r--r-- | phpBB/install/convert/convertor.php | 24 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/phpBB/install/convert/controller/convertor.php b/phpBB/install/convert/controller/convertor.php index 7b2a00d7b9..3639b10dc5 100644 --- a/phpBB/install/convert/controller/convertor.php +++ b/phpBB/install/convert/controller/convertor.php @@ -537,7 +537,7 @@ class convertor foreach ($prefixes as $prefix => $count) { - if ($count >= sizeof($tables)) + if ($count >= count($tables)) { $possible_prefix = $prefix; break; @@ -730,7 +730,7 @@ class convertor include_once($this->phpbb_root_path . 'install/convertors/' . $entry); if (isset($convertor_data)) { - $sort[strtolower($convertor_data['forum_name'])] = sizeof($convertors); + $sort[strtolower($convertor_data['forum_name'])] = count($convertors); $convertors[] = array( 'tag' => $m[1], diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php index f7f05ebdae..5118651b71 100644 --- a/phpBB/install/convert/convertor.php +++ b/phpBB/install/convert/convertor.php @@ -312,9 +312,9 @@ class convertor } } - if (sizeof($bad_folders)) + if (count($bad_folders)) { - $msg = (sizeof($bad_folders) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE']; + $msg = (count($bad_folders) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE']; sort($bad_folders); $this->error(sprintf($msg, implode('<br />', $bad_folders)), __LINE__, __FILE__, true); @@ -371,7 +371,7 @@ class convertor $val = array($val); } - for ($j = 0, $size = sizeof($val); $j < $size; ++$j) + for ($j = 0, $size = count($val); $j < $size; ++$j) { if (preg_match('/LEFT JOIN ([a-z0-9_]+) AS ([a-z0-9_]+)/i', $val[$j], $m)) { @@ -412,11 +412,11 @@ class convertor // Throw an error if some tables are missing // We used to do some guessing here, but since we have a suggestion of possible values earlier, I don't see it adding anything here to do it again - if (sizeof($missing_tables) == sizeof($tables_list)) + if (count($missing_tables) == count($tables_list)) { $this->error($user->lang['NO_TABLES_FOUND'] . ' ' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); } - else if (sizeof($missing_tables)) + else if (count($missing_tables)) { $this->error(sprintf($user->lang['TABLES_MISSING'], implode($user->lang['COMMA_SEPARATOR'], $missing_tables)) . '<br /><br />' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__); } @@ -514,7 +514,7 @@ class convertor )); // This loop takes one target table and processes it - while ($current_table < sizeof($convert->convertor['schema'])) + while ($current_table < count($convert->convertor['schema'])) { $schema = $convert->convertor['schema'][$current_table]; @@ -753,7 +753,7 @@ class convertor case 'mysqli': $waiting_rows[] = '(' . implode(', ', $insert_values) . ')'; - if (sizeof($waiting_rows) >= $convert->num_wait_rows) + if (count($waiting_rows) >= $convert->num_wait_rows) { $errored = false; @@ -809,7 +809,7 @@ class convertor $src_db->sql_freeresult($___result); // We might still have some rows waiting - if (sizeof($waiting_rows)) + if (count($waiting_rows)) { $errored = false; $db->sql_return_on_error(true); @@ -888,7 +888,7 @@ class convertor $current_table++; // $percentage = ($skip_rows == 0) ? 0 : floor(100 / ($total_rows / $skip_rows)); - $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, sizeof($convert->convertor['schema'])); + $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $current_table, count($convert->convertor['schema'])); $this->template->assign_vars(array( 'BODY' => $msg, @@ -1126,7 +1126,7 @@ class convertor } else { - while ($last_statement < sizeof($convert->convertor['execute_last'])) + while ($last_statement < count($convert->convertor['execute_last'])) { // @codingStandardsIgnoreStart eval($convert->convertor['execute_last'][$last_statement]); @@ -1140,8 +1140,8 @@ class convertor $last_statement++; $url = $this->save_convert_progress($converter, 'jump=1&last=' . $last_statement); - $percentage = ($last_statement == 0) ? 0 : floor(100 / (sizeof($convert->convertor['execute_last']) / $last_statement)); - $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, sizeof($convert->convertor['execute_last']), $percentage); + $percentage = ($last_statement == 0) ? 0 : floor(100 / (count($convert->convertor['execute_last']) / $last_statement)); + $msg = sprintf($user->lang['STEP_PERCENT_COMPLETED'], $last_statement, count($convert->convertor['execute_last']), $percentage); $this->template->assign_vars(array( 'L_SUBMIT' => $user->lang['CONTINUE_LAST'], diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 6f43e1915e..8b80eec4c8 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1071,7 +1071,7 @@ function phpbb_convert_authentication($mode) } } - if (sizeof($forum_ids)) + if (count($forum_ids)) { // Now make sure the user is able to read these forums $hold_ary = $auth->acl_group_raw_data(false, 'f_list', $forum_ids); @@ -1267,7 +1267,7 @@ function phpbb_prepare_message($message) // parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post') $message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies); - if (sizeof($message_parser->warn_msg)) + if (count($message_parser->warn_msg)) { $msg_id = isset($convert->row['post_id']) ? $convert->row['post_id'] : $convert->row['privmsgs_id']; $convert->p_master->error('<span style="color:red">' . $user->lang['POST_ID'] . ': ' . $msg_id . ' ' . $user->lang['CONV_ERROR_MESSAGE_PARSER'] . ': <br /><br />' . implode('<br />', $message_parser->warn_msg), __LINE__, __FILE__, true); @@ -1495,7 +1495,7 @@ function phpbb_attachment_forum_perms($forum_permissions) $forum_ids[] = (int) $forum_id; } - if (sizeof($forum_ids)) + if (count($forum_ids)) { return attachment_forum_perms($forum_ids); } @@ -1860,7 +1860,7 @@ function phpbb_check_username_collisions() $db->sql_freeresult($result); // there was at least one collision, the admin will have to solve it before conversion can continue - if (sizeof($colliding_names)) + if (count($colliding_names)) { $sql = 'SELECT user_id, username_clean FROM ' . USERCONV_TABLE . ' |