aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2018-08-01 15:05:10 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-05-09 19:02:14 +0200
commit4f402465bf41c88876a499cacfc6bdc1762dfe44 (patch)
tree435752e7e8eb25e6afef14d7c88ea098556c1c27 /phpBB/install
parent917880e2bf3a43c6b20bda0f9295f4fb4e6ed127 (diff)
downloadforums-4f402465bf41c88876a499cacfc6bdc1762dfe44.tar
forums-4f402465bf41c88876a499cacfc6bdc1762dfe44.tar.gz
forums-4f402465bf41c88876a499cacfc6bdc1762dfe44.tar.bz2
forums-4f402465bf41c88876a499cacfc6bdc1762dfe44.tar.xz
forums-4f402465bf41c88876a499cacfc6bdc1762dfe44.zip
[ticket/12628] Introduce debug.memory
Also fix one debug.sql_explain missing from the previous PR PHPBB3-12628
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/convert/convertor.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php
index 5118651b71..e79ad64012 100644
--- a/phpBB/install/convert/convertor.php
+++ b/phpBB/install/convert/convertor.php
@@ -63,7 +63,7 @@ class convertor
{
global $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache, $auth;
global $convert, $convert_row, $message_parser, $skip_rows, $language;
- global $request, $phpbb_dispatcher;
+ global $request, $phpbb_dispatcher, $phpbb_container;
$phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
extract($phpbb_config_php_file->get_all());
@@ -687,7 +687,7 @@ class convertor
$this->template->assign_block_vars('checks', array(
'TITLE' => "skip_rows = $skip_rows",
- 'RESULT' => $rows . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
+ 'RESULT' => $rows . (($phpbb_container->getParameter('debug.memory') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
));
$mtime = explode(' ', microtime());
@@ -920,6 +920,7 @@ class convertor
{
global $user, $db, $phpbb_root_path, $phpEx, $config, $cache;
global $convert;
+ global $phpbb_container;
include_once ($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
@@ -959,7 +960,7 @@ class convertor
sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
$this->template->assign_block_vars('checks', array(
- 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
+ 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . (($phpbb_container->getParameter('debug.memory') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
'RESULT' => $user->lang['DONE'],
));