aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_extensions.php8
-rw-r--r--phpBB/viewforum.php12
-rw-r--r--phpBB/viewtopic.php14
3 files changed, 32 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 6f65dc9fa0..a1cb2108e7 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -35,11 +35,13 @@ class acp_extensions
private $request;
private $phpbb_dispatcher;
private $ext_manager;
+ private $phpbb_container;
+ private $php_ini;
function main()
{
// Start the page
- global $config, $user, $template, $request, $phpbb_extension_manager, $phpbb_root_path, $phpbb_log, $phpbb_dispatcher;
+ global $config, $user, $template, $request, $phpbb_extension_manager, $phpbb_root_path, $phpbb_log, $phpbb_dispatcher, $phpbb_container;
$this->config = $config;
$this->template = $template;
@@ -48,6 +50,8 @@ class acp_extensions
$this->log = $phpbb_log;
$this->phpbb_dispatcher = $phpbb_dispatcher;
$this->ext_manager = $phpbb_extension_manager;
+ $this->phpbb_container = $phpbb_container;
+ $this->php_ini = $this->phpbb_container->get('php_ini');
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
@@ -57,7 +61,7 @@ class acp_extensions
$ext_name = $this->request->variable('ext_name', '');
// What is a safe limit of execution time? Half the max execution time should be safe.
- $safe_time_limit = (ini_get('max_execution_time') / 2);
+ $safe_time_limit = ($this->php_ini->getNumeric('max_execution_time') / 2);
$start_time = time();
// Cancel action
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 416ffe3d90..0d56a5a9c5 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -598,6 +598,18 @@ else
$sql_start = $start;
}
+/**
+ * Modify the topics sort ordering if needed
+ *
+ * @event core.viewforum_modify_sort_direction
+ * @var string direction Topics sort order
+ * @since 3.2.5-RC1
+ */
+$vars = array(
+ 'direction',
+);
+extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_direction', compact($vars)));
+
if (is_array($sort_by_sql[$sort_key]))
{
$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 0cbb5284c7..eb2d52cf61 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -263,6 +263,20 @@ if (!$topic_data)
$forum_id = (int) $topic_data['forum_id'];
+/**
+ * Modify the forum ID to handle the correct display of viewtopic if needed
+ *
+ * @event core.viewtopic_modify_forum_id
+ * @var string forum_id forum ID
+ * @var array topic_data array of topic's data
+ * @since 3.2.5-RC1
+ */
+$vars = array(
+ 'forum_id',
+ 'topic_data',
+);
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_forum_id', compact($vars)));
+
// If the request is missing the f parameter, the forum id in the user session data is 0 at the moment.
// Let's fix that now so that the user can't hide from the forum's Who Is Online list.
$user->page['forum'] = $forum_id;