aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_board.php2
-rw-r--r--phpBB/includes/acp/acp_users.php32
-rw-r--r--phpBB/includes/functions.php12
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php2
4 files changed, 34 insertions, 14 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index e044384c9f..77e6133fe6 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -552,7 +552,7 @@ class acp_board
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
{
- enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
+ enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', round(log(FORUM_FLAG_QUICK_REPLY, 2)));
}
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 5a2b1445dc..090cb32ebb 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -813,16 +813,22 @@ class acp_users
break;
default:
+ $u_action = $this->u_action;
+
/**
* Run custom quicktool code
*
* @event core.acp_users_overview_run_quicktool
- * @var array user_row Current user data
* @var string action Quick tool that should be run
+ * @var array user_row Current user data
+ * @var string u_action The u_action link
* @since 3.1.0-a1
+ * @changed 3.2.2-RC1 Added u_action
*/
- $vars = array('action', 'user_row');
+ $vars = array('action', 'user_row', 'u_action');
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
+
+ unset($u_action);
break;
}
@@ -1485,12 +1491,14 @@ class acp_users
* Validate profile data in ACP before submitting to the database
*
* @event core.acp_users_profile_validate
- * @var bool submit Flag indicating if submit button has been pressed
* @var array data Array with user profile data
+ * @var int user_id The user id
+ * @var array user_row Array with the full user data
* @var array error Array with the form errors
* @since 3.1.4-RC1
+ * @changed 3.1.12-RC1 Removed submit, added user_id, user_row
*/
- $vars = array('submit', 'data', 'error');
+ $vars = array('data', 'user_id', 'user_row', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
if (!sizeof($error))
@@ -2576,6 +2584,22 @@ class acp_users
break;
+ default:
+
+ /**
+ * Additional modes provided by extensions
+ *
+ * @event core.acp_users_mode_add
+ * @var string mode New mode
+ * @var int user_id User id of the user to manage
+ * @var array user_row Array with user data
+ * @var array error Array with errors data
+ * @since 3.2.2-RC1
+ */
+ $vars = array('mode', 'user_id', 'user_row', 'error');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_mode_add', compact($vars)));
+
+ break;
}
// Assign general variables
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6a36210dca..2cd62d7bac 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1644,7 +1644,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false,
*/
function generate_board_url($without_script_path = false)
{
- global $config, $user, $request;
+ global $config, $user, $request, $symfony_request;
$server_name = $user->host;
@@ -1661,7 +1661,8 @@ function generate_board_url($without_script_path = false)
}
else
{
- $server_port = $request->server('SERVER_PORT', 0);
+ $server_port = (int) $symfony_request->getPort();
+
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
@@ -4069,11 +4070,6 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
if ($driver)
{
$html = $driver->get_custom_html($user, $row, $alt);
- if (!empty($html))
- {
- return $html;
- }
-
$avatar_data = $driver->get_data($row);
}
else
@@ -4081,7 +4077,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
$avatar_data['src'] = '';
}
- if (!empty($avatar_data['src']))
+ if (empty($html) && !empty($avatar_data['src']))
{
if ($lazy)
{
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 835db44b90..029588bb23 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -205,7 +205,7 @@ class ucp_notifications
}
$template->assign_vars(array(
- strtoupper($block) . '_COLS' => sizeof($notification_methods) + 2,
+ strtoupper($block) . '_COLS' => sizeof($notification_methods) + 1,
));
}