aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_board.php3
-rw-r--r--phpBB/includes/acp/acp_main.php6
-rw-r--r--phpBB/includes/acp/acp_update.php12
-rw-r--r--phpBB/includes/functions.php24
-rw-r--r--phpBB/includes/functions_messenger.php33
-rw-r--r--phpBB/includes/mcp/mcp_queue.php2
-rw-r--r--phpBB/includes/ucp/ucp_profile.php10
7 files changed, 74 insertions, 16 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index f08f5356c8..7e42cc3d26 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -642,6 +642,9 @@ class acp_board
$messenger->template('test');
$messenger->set_addresses($user->data);
$messenger->anti_abuse_headers($config, $user);
+ $messenger->assign_vars(array(
+ 'USERNAME' => htmlspecialchars_decode($user->data['username']),
+ ));
$messenger->send(NOTIFY_EMAIL);
trigger_error($user->lang('TEST_EMAIL_SENT') . adm_back_link($this->u_action));
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 529c3a1835..f44bbbc88d 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -459,6 +459,12 @@ class acp_main
$template->assign_var('S_VERSION_UP_TO_DATE', true);
}
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $template->assign_var('S_UPDATE_INCOMPLETE', true);
+ }
+
/**
* Notice admin
*
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 52897e1043..e42367d8a1 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -63,5 +63,17 @@ class acp_update
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
));
+
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $database_update_link = append_sid($phpbb_root_path . 'install/database_update.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'S_UPDATE_INCOMPLETE' => true,
+ 'FILES_VERSION' => PHPBB_VERSION,
+ 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link),
+ ));
+ }
}
}
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 497403b1e5..588a717f0e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3669,6 +3669,30 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
}
}
}
+
+ /**
+ * Modify online userlist data
+ *
+ * @event core.obtain_users_online_string_before_modify
+ * @var array online_users Array with online users data
+ * from obtain_users_online()
+ * @var int item_id Restrict online users to item id
+ * @var string item Restrict online users to a certain
+ * session item, e.g. forum for
+ * session_forum_id
+ * @var array rowset Array with online users data
+ * @var array user_online_link Array with online users items (usernames)
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'online_users',
+ 'item_id',
+ 'item',
+ 'rowset',
+ 'user_online_link',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_before_modify', compact($vars)));
+
$online_userlist = implode(', ', $user_online_link);
if (!$online_userlist)
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 3fa96afb29..fa9ed84a34 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -624,31 +624,34 @@ class messenger
*/
protected function setup_template()
{
- global $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
+ global $phpbb_container;
if ($this->template instanceof \phpbb\template\template)
{
return;
}
+ $template_environment = new \phpbb\template\twig\environment(
+ $phpbb_container->get('config'),
+ $phpbb_container->get('filesystem'),
+ $phpbb_container->get('path_helper'),
+ $phpbb_container->getParameter('core.template.cache_path'),
+ $phpbb_container->get('ext.manager'),
+ new \phpbb\template\twig\loader(
+ $phpbb_container->get('filesystem')
+ )
+ );
+ $template_environment->setLexer($phpbb_container->get('template.twig.lexer'));
+
$this->template = new \phpbb\template\twig\twig(
$phpbb_container->get('path_helper'),
$phpbb_container->get('config'),
new \phpbb\template\context(),
- new \phpbb\template\twig\environment(
- $phpbb_container->get('config'),
- $phpbb_container->get('filesystem'),
- $phpbb_container->get('path_helper'),
- $phpbb_container->getParameter('core.cache_dir'),
- $phpbb_container->get('ext.manager'),
- new \phpbb\template\twig\loader(
- $phpbb_filesystem
- )
- ),
- $phpbb_container->getParameter('core.cache_dir'),
+ $template_environment,
+ $phpbb_container->getParameter('core.template.cache_path'),
$phpbb_container->get('user'),
$phpbb_container->get('template.twig.extensions.collection'),
- $phpbb_extension_manager
+ $phpbb_container->get('ext.manager')
);
}
@@ -684,10 +687,10 @@ class queue
*/
function queue()
{
- global $phpEx, $phpbb_root_path, $phpbb_filesystem;
+ global $phpEx, $phpbb_root_path, $phpbb_filesystem, $phpbb_container;
$this->data = array();
- $this->cache_file = "{$phpbb_root_path}cache/queue.$phpEx";
+ $this->cache_file = $phpbb_container->getParameter('core.cache_dir') . "queue.$phpEx";
$this->filesystem = $phpbb_filesystem;
}
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index bf93593c74..1ccced7a2f 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -104,7 +104,7 @@ class mcp_queue
if (!empty($topic_id_list) && $mode == 'deleted_topics')
{
- if (!function_exists('mcp_delete_topics'))
+ if (!function_exists('mcp_delete_topic'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 64c49e17ac..a9f8e10eef 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -558,6 +558,16 @@ class ucp_profile
'user_sig_bbcode_bitfield' => $bbcode_bitfield
);
+ /**
+ * Modify user registration data before submitting it to the database
+ *
+ * @event core.ucp_profile_modify_signature_sql_ary
+ * @var array sql_ary Array with user signature data to submit to the database
+ * @since 3.1.10-RC1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature_sql_ary', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];