aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/installer_header.html1
-rw-r--r--phpBB/adm/style/overall_header.html1
-rw-r--r--phpBB/adm/style/simple_header.html1
-rw-r--r--phpBB/config/default/container/services_cron.yml1
-rw-r--r--phpBB/config/default/container/services_routing.yml3
-rw-r--r--phpBB/config/default/container/services_text_formatter.yml2
-rw-r--r--phpBB/config/default/container/services_twig.yml2
-rw-r--r--phpBB/config/installer/container/services.yml2
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/docs/FAQ.html1
-rw-r--r--phpBB/docs/INSTALL.html1
-rw-r--r--phpBB/docs/README.html1
-rw-r--r--phpBB/docs/auth_api.html1
-rw-r--r--phpBB/docs/coding-guidelines.html1
-rw-r--r--phpBB/includes/bbcode.php4
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_download.php1
-rw-r--r--phpBB/includes/functions_messenger.php4
-rw-r--r--phpBB/install/convert/convertor.php2
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php14
-rw-r--r--phpBB/phpbb/cache/driver/file.php4
-rw-r--r--phpBB/phpbb/cache/driver/memory.php4
-rw-r--r--phpBB/phpbb/cron/task/core/queue.php19
-rw-r--r--phpBB/phpbb/db/driver/driver.php1
-rw-r--r--phpBB/phpbb/db/migration/data/v320/notifications_board.php2
-rw-r--r--phpBB/phpbb/di/container_builder.php1
-rw-r--r--phpBB/phpbb/routing/router.php31
-rw-r--r--phpBB/phpbb/user.php2
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html1
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html1
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html1
-rw-r--r--phpBB/viewforum.php44
-rw-r--r--tests/controller/common_helper_route.php2
-rw-r--r--tests/controller/controller_test.php2
-rw-r--r--tests/pagination/pagination_test.php2
-rw-r--r--tests/session/testable_factory.php3
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php3
38 files changed, 112 insertions, 58 deletions
diff --git a/phpBB/adm/style/installer_header.html b/phpBB/adm/style/installer_header.html
index 775caa7c67..704db9e174 100644
--- a/phpBB/adm/style/installer_header.html
+++ b/phpBB/adm/style/installer_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 9266372ab8..f227f729fd 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index f62a7a900e..9f47b2052b 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
diff --git a/phpBB/config/default/container/services_cron.yml b/phpBB/config/default/container/services_cron.yml
index dd3982a659..0b95a96190 100644
--- a/phpBB/config/default/container/services_cron.yml
+++ b/phpBB/config/default/container/services_cron.yml
@@ -75,6 +75,7 @@ services:
- '%core.root_path%'
- '%core.php_ext%'
- '@config'
+ - '%core.cache_dir%'
calls:
- [set_name, [cron.task.core.queue]]
tags:
diff --git a/phpBB/config/default/container/services_routing.yml b/phpBB/config/default/container/services_routing.yml
index 3cb74ca2b1..3048145a2f 100644
--- a/phpBB/config/default/container/services_routing.yml
+++ b/phpBB/config/default/container/services_routing.yml
@@ -5,9 +5,8 @@ services:
- '@service_container'
- '@routing.chained_resources_locator'
- '@routing.delegated_loader'
- - '%core.root_path%'
- '%core.php_ext%'
- - '%core.environment%'
+ - '%core.cache_dir%'
router.listener:
class: Symfony\Component\HttpKernel\EventListener\RouterListener
diff --git a/phpBB/config/default/container/services_text_formatter.yml b/phpBB/config/default/container/services_text_formatter.yml
index 943a79cd65..a9f2efdb16 100644
--- a/phpBB/config/default/container/services_text_formatter.yml
+++ b/phpBB/config/default/container/services_text_formatter.yml
@@ -1,5 +1,5 @@
parameters:
- text_formatter.cache.dir: '%core.root_path%cache/%core.environment%/'
+ text_formatter.cache.dir: '%core.cache_dir%'
text_formatter.cache.parser.key: _text_formatter_parser
text_formatter.cache.renderer.key: _text_formatter_renderer
diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml
index 2dbf444e0c..dc08d65e1a 100644
--- a/phpBB/config/default/container/services_twig.yml
+++ b/phpBB/config/default/container/services_twig.yml
@@ -1,5 +1,5 @@
parameters:
- core.template.cache_path: '%core.root_path%cache/%core.environment%/twig/'
+ core.template.cache_path: '%core.cache_dir%twig/'
services:
template.twig.environment:
diff --git a/phpBB/config/installer/container/services.yml b/phpBB/config/installer/container/services.yml
index 20d790e9a6..97fc1256fd 100644
--- a/phpBB/config/installer/container/services.yml
+++ b/phpBB/config/installer/container/services.yml
@@ -12,7 +12,7 @@ services:
cache.driver:
class: '%cache.driver.class%'
arguments:
- - '%core.root_path%/cache/installer/'
+ - '%core.cache_dir%'
config:
class: phpbb\config\config
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index f6e63196ee..10dc48b801 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Changelog" />
<title>phpBB &bull; Changelog</title>
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 4786d8d796..5f3a425cda 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB &bull; FAQ</title>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 86b320d197..c0e0dce2a7 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB &bull; Install</title>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index 10f4cb218f..20afc310db 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="phpBB 3.3.x Readme" />
<title>phpBB &bull; Readme</title>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index 27d090c296..960fa76417 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
<title>phpBB3 &bull; Auth API</title>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 26189235ef..eb0fb60de2 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -2,6 +2,7 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index eb6133d013..5fb8304b9a 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -155,13 +155,13 @@ class bbcode
$phpbb_container->get('filesystem'),
$phpbb_container->get('path_helper'),
$phpbb_container,
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('ext.manager'),
new \phpbb\template\twig\loader(
$phpbb_filesystem
)
),
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('user'),
$phpbb_container->get('template.twig.extensions.collection'),
$phpbb_extension_manager
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c9f2601e31..c4f285c905 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1813,6 +1813,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&amp;', $url) . '" />';
echo '<title>' . $user->lang['REDIRECT'] . '</title>';
echo '</head>';
@@ -3322,6 +3323,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
echo '<html dir="ltr">';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $msg_title . '</title>';
echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n";
echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } ';
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 916655e77c..9adbfc9baf 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -108,6 +108,7 @@ function wrap_img_in_html($src, $title)
echo '<html>';
echo '<head>';
echo '<meta charset="utf-8">';
+ echo '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index e8d4e0d7f1..f55b5e7ec3 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -640,13 +640,13 @@ class messenger
$phpbb_container->get('filesystem'),
$phpbb_container->get('path_helper'),
$phpbb_container,
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('ext.manager'),
new \phpbb\template\twig\loader(
$phpbb_filesystem
)
),
- $phpbb_container->getParameter('core.root_path') . 'cache/',
+ $phpbb_container->getParameter('core.cache_dir'),
$phpbb_container->get('user'),
$phpbb_container->get('template.twig.extensions.collection'),
$phpbb_extension_manager
diff --git a/phpBB/install/convert/convertor.php b/phpBB/install/convert/convertor.php
index 2dae356c26..769f8bb637 100644
--- a/phpBB/install/convert/convertor.php
+++ b/phpBB/install/convert/convertor.php
@@ -1044,7 +1044,7 @@ class convertor
OR config_name = 'convert_db_user'");
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
- @unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
+ @unlink($phpbb_container->getParameter('core.cache_dir') . 'data_global.' . $phpEx);
phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index a0c23cb624..2640e1ad1e 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -179,17 +179,29 @@ class upload extends \phpbb\avatar\driver\driver
$destination = '';
}
+ $filedata = array(
+ 'filename' => $file->get('filename'),
+ 'filesize' => $file->get('filesize'),
+ 'mimetype' => $file->get('mimetype'),
+ 'extension' => $file->get('extension'),
+ 'physical_filename' => $file->get('realname'),
+ 'real_filename' => $file->get('uploadname'),
+ );
+
/**
* Before moving new file in place (and eventually overwriting the existing avatar with the newly uploaded avatar)
*
* @event core.avatar_driver_upload_move_file_before
+ * @var array filedata Array containing uploaded file data
* @var string destination Destination directory where the file is going to be moved
* @var string prefix Prefix for the avatar filename
* @var array row Array with avatar row data
* @var array error Array of errors, if filled in by this event file will not be moved
* @since 3.1.6-RC1
+ * @changed 3.1.9-RC1 Added filedata
*/
$vars = array(
+ 'filedata',
'destination',
'prefix',
'row',
@@ -197,6 +209,8 @@ class upload extends \phpbb\avatar\driver\driver
);
extract($this->dispatcher->trigger_event('core.avatar_driver_upload_move_file_before', compact($vars)));
+ unset($filedata);
+
if (!sizeof($error))
{
// Move file and overwrite any existing image
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index d994394249..a210d877f0 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -32,9 +32,9 @@ class file extends \phpbb\cache\driver\base
*/
function __construct($cache_dir = null)
{
- global $phpbb_root_path, $phpbb_container;
+ global $phpbb_container;
- $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/' . $phpbb_container->getParameter('core.environment') . '/';
+ $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_container->getParameter('core.cache_dir');
$this->filesystem = new \phpbb\filesystem\filesystem();
if (!is_dir($this->cache_dir))
diff --git a/phpBB/phpbb/cache/driver/memory.php b/phpBB/phpbb/cache/driver/memory.php
index baae22d809..cc03804705 100644
--- a/phpBB/phpbb/cache/driver/memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -25,9 +25,9 @@ abstract class memory extends \phpbb\cache\driver\base
*/
function __construct()
{
- global $phpbb_root_path, $dbname, $table_prefix;
+ global $phpbb_root_path, $dbname, $table_prefix, $phpbb_container;
- $this->cache_dir = $phpbb_root_path . 'cache/';
+ $this->cache_dir = $phpbb_container->getParameter('core.cache_dir');
$this->key_prefix = substr(md5($dbname . $table_prefix), 0, 8) . '_';
if (!isset($this->extension) || !extension_loaded($this->extension))
diff --git a/phpBB/phpbb/cron/task/core/queue.php b/phpBB/phpbb/cron/task/core/queue.php
index a9345a44df..eca69a5041 100644
--- a/phpBB/phpbb/cron/task/core/queue.php
+++ b/phpBB/phpbb/cron/task/core/queue.php
@@ -20,20 +20,23 @@ class queue extends \phpbb\cron\task\base
{
protected $phpbb_root_path;
protected $php_ext;
+ protected $cache_dir;
protected $config;
/**
- * Constructor.
- *
- * @param string $phpbb_root_path The root path
- * @param string $php_ext PHP file extension
- * @param \phpbb\config\config $config The config
- */
- public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext PHP file extension
+ * @param \phpbb\config\config $config The config
+ * @param string $cache_dir phpBB cache directory
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, $cache_dir)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->config = $config;
+ $this->cache_dir = $cache_dir;
}
/**
@@ -60,7 +63,7 @@ class queue extends \phpbb\cron\task\base
*/
public function is_runnable()
{
- return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->php_ext);
+ return file_exists($this->cache_dir . 'queue.' . $this->php_ext);
}
/**
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 30cb667344..214c5590e7 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -1041,6 +1041,7 @@ abstract class driver implements driver_interface
<html dir="ltr">
<head>
<meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SQL Report</title>
<link href="' . htmlspecialchars($phpbb_path_helper->update_web_root_path($phpbb_root_path) . $phpbb_path_helper->get_adm_relative_path()) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
diff --git a/phpBB/phpbb/db/migration/data/v320/notifications_board.php b/phpBB/phpbb/db/migration/data/v320/notifications_board.php
index 8a76ebab58..ac1b3a0f2c 100644
--- a/phpBB/phpbb/db/migration/data/v320/notifications_board.php
+++ b/phpBB/phpbb/db/migration/data/v320/notifications_board.php
@@ -34,7 +34,7 @@ class notifications_board extends \phpbb\db\migration\migration
public function update_module()
{
$sql = 'UPDATE ' . MODULES_TABLE . "
- SET auth = 'cfg_allow_board_notifications'
+ SET module_auth = 'cfg_allow_board_notifications'
WHERE module_basename = 'ucp_notifications'
AND module_mode = 'notification_list'";
$this->sql_query($sql);
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 2fb248082f..7bfe1bbb87 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -522,6 +522,7 @@ class container_builder
'core.php_ext' => $this->php_ext,
'core.environment' => $this->get_environment(),
'core.debug' => defined('DEBUG') ? DEBUG : false,
+ 'core.cache_dir' => $this->get_cache_dir(),
),
$this->get_env_parameters()
);
diff --git a/phpBB/phpbb/routing/router.php b/phpBB/phpbb/routing/router.php
index 5d237b6433..f19886fb0b 100644
--- a/phpBB/phpbb/routing/router.php
+++ b/phpBB/phpbb/routing/router.php
@@ -49,13 +49,6 @@ class router implements RouterInterface
protected $loader;
/**
- * phpBB root path
- *
- * @var string
- */
- protected $phpbb_root_path;
-
- /**
* PHP file extensions
*
* @var string
@@ -63,13 +56,6 @@ class router implements RouterInterface
protected $php_ext;
/**
- * Name of the current environment
- *
- * @var string
- */
- protected $environment;
-
- /**
* @var \Symfony\Component\Routing\Matcher\UrlMatcherInterface|null
*/
protected $matcher;
@@ -90,24 +76,27 @@ class router implements RouterInterface
protected $route_collection;
/**
+ * @var string
+ */
+ protected $cache_dir;
+
+ /**
* Construct method
*
* @param ContainerInterface $container DI container
* @param resources_locator_interface $resources_locator Resources locator
* @param LoaderInterface $loader Resources loader
- * @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP file extension
- * @param string $environment Name of the current environment
+ * @param string $cache_dir phpBB cache directory
*/
- public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, $phpbb_root_path, $php_ext, $environment)
+ public function __construct(ContainerInterface $container, resources_locator_interface $resources_locator, LoaderInterface $loader, $php_ext, $cache_dir)
{
$this->container = $container;
$this->resources_locator = $resources_locator;
$this->loader = $loader;
- $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
- $this->environment = $environment;
$this->context = new RequestContext();
+ $this->cache_dir = $cache_dir;
}
/**
@@ -211,7 +200,7 @@ class router implements RouterInterface
{
try
{
- $cache = new ConfigCache("{$this->phpbb_root_path}cache/{$this->environment}/url_matcher.{$this->php_ext}", defined('DEBUG'));
+ $cache = new ConfigCache("{$this->cache_dir}url_matcher.{$this->php_ext}", defined('DEBUG'));
if (!$cache->isFresh())
{
$dumper = new PhpMatcherDumper($this->get_routes());
@@ -266,7 +255,7 @@ class router implements RouterInterface
{
try
{
- $cache = new ConfigCache("{$this->phpbb_root_path}cache/{$this->environment}/url_generator.{$this->php_ext}", defined('DEBUG'));
+ $cache = new ConfigCache("{$this->cache_dir}url_generator.{$this->php_ext}", defined('DEBUG'));
if (!$cache->isFresh())
{
$dumper = new PhpGeneratorDumper($this->get_routes());
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index 5262e10e87..305510851c 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -595,7 +595,7 @@ class user extends \phpbb\session
$utc = new \DateTimeZone('UTC');
}
- $time = new $this->datetime($this, "@$gmepoch", $utc);
+ $time = new $this->datetime($this, '@' . (int) $gmepoch, $utc);
$time->setTimezone($this->timezone);
return $time->format($format, $forcedate);
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 823d5e1c12..8a3eb65cd4 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 954eebd011..0e889b476d 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 70beec8256..9377eeb9f5 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 796111dd3c..3c1ed4c3f1 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -2,6 +2,7 @@
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
<meta charset="utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index c9a081cc0e..a2ab4d56f5 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -277,14 +277,42 @@ if ($sort_days)
{
$min_post_time = time() - ($sort_days * 86400);
- $sql = 'SELECT COUNT(topic_id) AS num_topics
- FROM ' . TOPICS_TABLE . "
- WHERE forum_id = $forum_id
- AND (topic_last_post_time >= $min_post_time
- OR topic_type = " . POST_ANNOUNCE . '
- OR topic_type = ' . POST_GLOBAL . ')
- AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id);
- $result = $db->sql_query($sql);
+ $sql_array = array(
+ 'SELECT' => 'COUNT(t.topic_id) AS num_topics',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ ),
+ 'WHERE' => 't.forum_id = ' . $forum_id . '
+ AND (t.topic_last_post_time >= ' . $min_post_time . '
+ OR t.topic_type = ' . POST_ANNOUNCE . '
+ OR t.topic_type = ' . POST_GLOBAL . ')
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'),
+ );
+
+ /**
+ * Modify the sort data SQL query for getting additional fields if needed
+ *
+ * @event core.viewforum_modify_sort_data_sql
+ * @var int forum_id The forum_id whose topics are being listed
+ * @var int start Variable containing start for pagination
+ * @var int sort_days The oldest topic displayable in elapsed days
+ * @var string sort_key The sorting by. It is one of the first character of (in low case):
+ * Author, Post time, Replies, Subject, Views
+ * @var string sort_dir Either "a" for ascending or "d" for descending
+ * @var array sql_array The SQL array to get the data of all topics
+ * @since 3.1.9-RC1
+ */
+ $vars = array(
+ 'forum_id',
+ 'start',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 'sql_array',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_data_sql', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_array));
$topics_count = (int) $db->sql_fetchfield('num_topics');
$db->sql_freeresult($result);
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index 72c5328b0b..808eb684f2 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -126,7 +126,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
new \phpbb\routing\file_locator($this->filesystem, dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager);
- $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
// Set correct current phpBB root path
$this->root_path = $this->get_phpbb_root_path();
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 431b26b2bc..e8af2f7485 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -47,7 +47,7 @@ class phpbb_controller_controller_test extends phpbb_test_case
new \phpbb\routing\file_locator(new \phpbb\filesystem\filesystem(), dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager);
- $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
$routes = $router->get_routes();
// This will need to be updated if any new routes are defined
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 6a3b46cdae..024b6fc02d 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -46,7 +46,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
new \phpbb\routing\file_locator($filesystem, dirname(__FILE__) . '/')
);
$resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $manager);
- $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php');
$request = new phpbb_mock_request();
$request->overwrite('SCRIPT_NAME', '/app.php', \phpbb\request\request_interface::SERVER);
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index 7819063505..6f8b49122b 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -73,7 +73,7 @@ class phpbb_session_testable_factory
public function get_session(\phpbb\db\driver\driver_interface $dbal)
{
// set up all the global variables used by session
- global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container;
+ global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container, $phpbb_root_path;
$request = $this->request = new phpbb_mock_request(
array(),
@@ -95,6 +95,7 @@ class phpbb_session_testable_factory
new phpbb_mock_auth_provider()
);
$phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
+ $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
$provider_collection = new \phpbb\auth\provider_collection($phpbb_container, $config);
$provider_collection->add('auth.provider.db');
$phpbb_container->set(
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 53519617b3..d234642898 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -209,10 +209,11 @@ class phpbb_functional_test_case extends phpbb_test_case
{
if (!$this->cache)
{
- global $phpbb_container;
+ global $phpbb_container, $phpbb_root_path;
$phpbb_container = new phpbb_mock_container_builder();
$phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT);
+ $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/');
$this->cache = new \phpbb\cache\driver\file;
}