diff options
-rw-r--r-- | phpBB/adm/style/admin.css | 13 | ||||
-rw-r--r-- | phpBB/assets/javascript/installer.js | 22 | ||||
-rw-r--r-- | phpBB/docs/events.md | 14 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 8 | ||||
-rw-r--r-- | phpBB/phpbb/cache/driver/base.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/di/container_builder.php | 31 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/navbar_header.html | 2 | ||||
-rw-r--r-- | tests/mock/phpbb_di_container_builder.php | 10 | ||||
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 2 |
9 files changed, 91 insertions, 12 deletions
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index e38e1cc3d7..4bb9922d56 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -2554,6 +2554,7 @@ fieldset.permissions .padding { #progress-bar { position: relative; width: 90%; + text-align: center; height: 25px; margin: 20px auto; border: 1px solid #cecece; @@ -2563,10 +2564,7 @@ fieldset.permissions .padding { position: absolute; top: 0; width: 100%; - text-align: center; - line-height: 25px; - font-weight: bold; - color: #fff; + color: #000; } #progress-bar #progress-bar-filler { @@ -2577,4 +2575,11 @@ fieldset.permissions .padding { background-color: #3c84ad; width: 0; height: 25px; + overflow: hidden; + color: #fff; +} + +#progress-bar p { + line-height: 25px; + font-weight: bold; } diff --git a/phpBB/assets/javascript/installer.js b/phpBB/assets/javascript/installer.js index c5909556c6..5f2c65c776 100644 --- a/phpBB/assets/javascript/installer.js +++ b/phpBB/assets/javascript/installer.js @@ -177,7 +177,7 @@ * @param progressObject */ function setProgress(progressObject) { - var $statusText, $progressBar, $progressText, $progressFiller; + var $statusText, $progressBar, $progressText, $progressFiller, $progressFillerText; if (progressObject.task_name.length) { if (!progressBarTriggered) { @@ -189,18 +189,23 @@ $progressBar.attr('id', 'progress-bar'); $progressText = $('<p />'); $progressText.attr('id', 'progress-bar-text'); - $progressFiller = $('<span />'); + $progressFiller = $('<div />'); $progressFiller.attr('id', 'progress-bar-filler'); - $progressFiller.html($progressText); + $progressFillerText = $('<p />'); + $progressFillerText.attr('id', 'progress-bar-filler-text'); $statusText = $('<p />'); $statusText.attr('id', 'progress-status-text'); + $progressFiller.append($progressFillerText); + $progressBar.append($progressText); $progressBar.append($progressFiller); $progressBarWrapper.append($statusText); $progressBarWrapper.append($progressBar); + $progressFillerText.css('width', $progressBar.width()); + progressBarTriggered = true; } else if (progressObject.hasOwnProperty('restart')) { clearInterval(progressTimer); @@ -210,6 +215,7 @@ $statusText = $('#progress-status-text'); $progressText.text('0%'); + $progressFillerText.text('0%'); $progressFiller.css('width', '0%'); currentProgress = 0; @@ -342,15 +348,20 @@ * * @param $progressText * @param $progressFiller + * @param $progressFillerText * @param progressLimit */ - function incrementFiller($progressText, $progressFiller, progressLimit) { + function incrementFiller($progressText, $progressFiller, $progressFillerText, progressLimit) { if (currentProgress >= progressLimit || currentProgress >= 100) { clearInterval(progressTimer); return; } + var $progressBar = $('#progress-bar'); + currentProgress++; + $progressFillerText.css('width', $progressBar.width()); + $progressFillerText.text(currentProgress + '%'); $progressText.text(currentProgress + '%'); $progressFiller.css('width', currentProgress + '%'); } @@ -362,13 +373,14 @@ */ function incrementProgressBar(progressLimit) { var $progressFiller = $('#progress-bar-filler'); + var $progressFillerText = $('#progress-bar-filler-text'); var $progressText = $('#progress-bar-text'); var progressStart = $progressFiller.width() / $progressFiller.offsetParent().width() * 100; currentProgress = Math.floor(progressStart); clearInterval(progressTimer); progressTimer = setInterval(function() { - incrementFiller($progressText, $progressFiller, progressLimit); + incrementFiller($progressText, $progressFiller, $progressFillerText, progressLimit); }, 10); } diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index f1dee8cee8..bb1289b74f 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1028,6 +1028,20 @@ navbar_header_quick_links_before * Since: 3.1.0-RC2 * Purpose: Add links to the top of the quick-links drop-down menu in the header +navbar_header_user_profile_append +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.8-RC1 +* Purpose: Add links to the right of the user drop down area + +navbar_header_user_profile_prepend +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.8-RC1 +* Purpose: Add links to the left of the notification area + navbar_header_username_append === * Locations: diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 2bec4385c3..0ee6452ada 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1929,8 +1929,12 @@ class acp_users } } - // Replace "error" strings with their real, localised form - $error = $phpbb_avatar_manager->localize_errors($user, $error); + // Avatar manager is not initialized if avatars are disabled + if (isset($phpbb_avatar_manager)) + { + // Replace "error" strings with their real, localised form + $error = $phpbb_avatar_manager->localize_errors($user, $error); + } $avatar = phpbb_get_user_avatar($user_row, 'USER_AVATAR', true); diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php index 55cd4668de..85762c4d95 100644 --- a/phpBB/phpbb/cache/driver/base.php +++ b/phpBB/phpbb/cache/driver/base.php @@ -49,6 +49,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface $this->remove_dir($fileInfo->getPathname()); } else if (strpos($filename, 'container_') === 0 || + strpos($filename, 'autoload_') === 0 || strpos($filename, 'url_matcher') === 0 || strpos($filename, 'url_generator') === 0 || strpos($filename, 'sql_') === 0 || diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index 433847b285..9583da14f5 100644 --- a/phpBB/phpbb/di/container_builder.php +++ b/phpBB/phpbb/di/container_builder.php @@ -135,6 +135,11 @@ class container_builder $config_cache = new ConfigCache($container_filename, defined('DEBUG')); if ($this->use_cache && $config_cache->isFresh()) { + if ($this->use_extensions) + { + require($this->get_autoload_filename()); + } + require($config_cache->getPath()); $this->container = new \phpbb_cache_container(); } @@ -405,6 +410,15 @@ class container_builder $extensions = $ext_container->get('ext.manager')->all_enabled(); // Load each extension found + $autoloaders = '<?php +/** + * Loads all extensions custom auto-loaders. + * + * This file has been auto-generated + * by phpBB while loading the extensions. + */ + +'; foreach ($extensions as $ext_name => $path) { $extension_class = '\\' . str_replace('/', '\\', $ext_name) . '\\di\\extension'; @@ -420,9 +434,14 @@ class container_builder $filename = $path . 'vendor/autoload.php'; if (file_exists($filename)) { - require $filename; + $autoloaders .= "require('{$filename}');\n"; } } + + $configCache = new ConfigCache($this->get_autoload_filename(), false); + $configCache->write($autoloaders); + + require($this->get_autoload_filename()); } else { @@ -540,6 +559,16 @@ class container_builder } /** + * Get the filename under which the dumped extensions autoloader will be stored. + * + * @return string Path for dumped extensions autoloader + */ + protected function get_autoload_filename() + { + return $this->get_cache_dir() . 'autoload_' . md5($this->phpbb_root_path) . '.' . $this->php_ext; + } + + /** * Return the name of the current environment. * * @return string diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index a02ec45830..62f32344fb 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -100,6 +100,7 @@ <!-- ENDIF --> <!-- IF S_REGISTERED_USER --> + <!-- EVENT navbar_header_user_profile_prepend --> <li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true"> <!-- EVENT navbar_header_username_prepend --> <div class="header-profile dropdown-container"> @@ -156,6 +157,7 @@ <!-- INCLUDE notification_dropdown.html --> </li> <!-- ENDIF --> + <!-- EVENT navbar_header_user_profile_append --> <!-- ELSE --> <li class="rightside" data-skip-responsive="true"> <a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem"> diff --git a/tests/mock/phpbb_di_container_builder.php b/tests/mock/phpbb_di_container_builder.php index 59cdf0bb2b..23dc3d1e8b 100644 --- a/tests/mock/phpbb_di_container_builder.php +++ b/tests/mock/phpbb_di_container_builder.php @@ -17,4 +17,14 @@ class phpbb_mock_phpbb_di_container_builder extends \phpbb\di\container_builder { return $this->phpbb_root_path . '../../tmp/container.' . $this->php_ext; } + + /** + * Get the filename under which the dumped extensions autoloader will be stored. + * + * @return string Path for dumped extensions autoloader + */ + protected function get_autoload_filename() + { + return $this->phpbb_root_path . '../../tmp/autoload.' . $this->php_ext; + } } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index b91894f9c0..a3864d3041 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -94,6 +94,8 @@ class phpbb_functional_test_case extends phpbb_test_case foreach (static::setup_extensions() as $extension) { + $this->purge_cache(); + $sql = 'SELECT ext_active FROM ' . EXT_TABLE . " WHERE ext_name = '" . $db->sql_escape($extension). "'"; |