Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions 3 phpBB/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*
*/

/**
*/

/**
* @ignore
*/
Expand Down
1 change: 1 addition & 0 deletions 1 phpBB/config/default/container/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ imports:
- { resource: services_files.yml }
- { resource: services_filesystem.yml }
- { resource: services_finder.yml }
- { resource: services_forum.yml }
- { resource: services_help.yml }
- { resource: services_http.yml }
- { resource: services_language.yml }
Expand Down
3 changes: 3 additions & 0 deletions 3 phpBB/config/default/container/services_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
- '@config'
- '@config_text'
- '@dbal.conn'
- '@controller.helper'
- '@user'
- '@event_dispatcher'
- '%core.root_path%'
Expand All @@ -43,6 +44,7 @@ services:
- '@auth'
- '@config'
- '@dbal.conn'
- '@controller.helper'
- '@user'
- '%core.root_path%'
- '%core.php_ext%'
Expand All @@ -53,6 +55,7 @@ services:
- '@auth'
- '@config'
- '@dbal.conn'
- '@controller.helper'
- '@user'
- '%core.root_path%'
- '%core.php_ext%'
Expand Down
27 changes: 27 additions & 0 deletions 27 phpBB/config/default/container/services_forum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:

phpbb.birthday.helper:
class: phpbb\forum\birthday_helper
arguments:
- '@auth'
- '@config'
- '@dbal.conn'
- '@dispatcher'
- '@language'
- '@template'
- '@user'

forum.controller.index:
class: phpbb\forum\controller\index
arguments:
- '@auth'
- '@phpbb.birthday.helper'
- '@config'
- '@controller.helper'
- '@dispatcher'
- '@group_helper'
- '@language'
- '@user'
- '@template'
- '%core.root_path%'
- '%core.php_ext%'
1 change: 1 addition & 0 deletions 1 phpBB/config/default/container/services_mention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
arguments:
- '@mention.source_collection'
- '@request'
- '@controller.helper'
- '%core.root_path%'
- '%core.php_ext%'

Expand Down
1 change: 1 addition & 0 deletions 1 phpBB/config/default/container/services_ucp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
arguments:
- '@config'
- '@dispatcher'
- '@controller.helper'
- '@language'
- '@request'
- '@user'
Expand Down
4 changes: 4 additions & 0 deletions 4 phpBB/config/default/routing/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
# instantiate the 'foo_service' service and call the 'method' method.
#

phpbb_index_controller:
path: /
defaults: { _controller: forum.controller.index:handle }

phpbb_cron_routing:
resource: cron.yml
prefix: /cron
Expand Down
2 changes: 1 addition & 1 deletion 2 phpBB/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3851,7 +3851,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
'U_VIEWONLINE' => $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel') ? $controller_helper->route('phpbb_members_online') : '',
'U_LOGIN_LOGOUT' => $u_login_logout,
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
'U_INDEX' => $controller_helper->route('phpbb_index_controller'),
'U_SEARCH' => append_sid("{$phpbb_root_path}search.$phpEx"),
'U_SITE_HOME' => $config['site_home_url'],
'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
Expand Down
7 changes: 5 additions & 2 deletions 7 phpBB/includes/ucp/ucp_activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function main($id, $mode)
global $config, $phpbb_root_path, $phpEx, $request;
global $db, $user, $auth, $phpbb_container, $phpbb_log, $phpbb_dispatcher;

/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');

$user_id = $request->variable('u', 0);
$key = $request->variable('k', '');

Expand All @@ -49,7 +52,7 @@ function main($id, $mode)

if ($user_row['user_type'] <> USER_INACTIVE && !$user_row['user_newpasswd'])
{
meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
meta_refresh(3, $controller_helper->route('phpbb_index_controller'));
trigger_error('ALREADY_ACTIVATED');
}

Expand Down Expand Up @@ -171,7 +174,7 @@ function main($id, $mode)
$vars = array('user_row', 'message');
extract($phpbb_dispatcher->trigger_event('core.ucp_activate_after', compact($vars)));

meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
meta_refresh(3, $controller_helper->route('phpbb_index_controller'));
trigger_error($user->lang[$message]);
}
}
6 changes: 4 additions & 2 deletions 6 phpBB/includes/ucp/ucp_login_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ protected function process_login_result($result)
*/
protected function perform_redirect()
{
global $phpbb_root_path, $phpEx;
$url = append_sid($phpbb_root_path . 'index.' . $phpEx);
global $phpbb_container;
/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');
$url = $controller_helper->route('phpbb_index_controller');
redirect($url);
}
}
26 changes: 15 additions & 11 deletions 26 phpBB/includes/ucp/ucp_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function main($id, $mode)
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher, $language;

/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');

$user->add_lang('posting');

$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
Expand Down Expand Up @@ -233,16 +236,17 @@ function main($id, $mode)
// Now, we can remove the user completely (kill the session) - NOT BEFORE!!!
if (!empty($sql_ary['user_actkey']))
{
meta_refresh(5, append_sid($phpbb_root_path . 'index.' . $phpEx));
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid($phpbb_root_path . 'index.' . $phpEx) . '">', '</a>');
$index_route = $controller_helper->route('phpbb_index_controller');
meta_refresh(5, $index_route);
$message = $language->lang($message) . '<br /><br />' . sprintf($language->lang('RETURN_INDEX'), '<a href="' . $index_route . '">', '</a>');

// Because the user gets deactivated we log him out too, killing his session
$user->session_kill();
}
else
{
meta_refresh(3, $this->u_action);
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $language->lang($message) . '<br /><br />' . sprintf($language->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
}

trigger_error($message);
Expand Down Expand Up @@ -389,7 +393,7 @@ function main($id, $mode)
$cp->update_profile_field_data($user->data['user_id'], $cp_data);

meta_refresh(3, $this->u_action);
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $language->lang('PROFILE_UPDATED') . '<br /><br />' . sprintf($language->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}

Expand Down Expand Up @@ -563,7 +567,7 @@ function main($id, $mode)
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);

$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $language->lang('PROFILE_UPDATED') . '<br /><br />' . sprintf($language->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
}
Expand All @@ -589,9 +593,9 @@ function main($id, $mode)
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',

'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $language->lang('SMILIES_ARE_ON') : $language->lang('SMILIES_ARE_OFF'),
'IMG_STATUS' => ($config['allow_sig_img']) ? $language->lang('IMAGES_ARE_ON') : $language->lang('IMAGES_ARE_OFF'),
'URL_STATUS' => ($config['allow_sig_links']) ? $language->lang('URL_IS_ON') : $language->lang('URL_IS_OFF'),
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],

'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
Expand Down Expand Up @@ -722,7 +726,7 @@ function main($id, $mode)
$phpbb_avatar_manager->handle_avatar_delete($db, $user, $avatar_data, USERS_TABLE, 'user_');

meta_refresh(3, $this->u_action);
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $language->lang('PROFILE_UPDATED') . '<br /><br />' . sprintf($language->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
}
Expand Down Expand Up @@ -812,7 +816,7 @@ function main($id, $mode)
$db->sql_query($sql);

meta_refresh(3, $this->u_action);
$message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $language->lang('AUTOLOGIN_SESSION_KEYS_DELETED') . '<br /><br />' . sprintf($language->lang('RETURN_UCP'), '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
}
Expand Down Expand Up @@ -872,7 +876,7 @@ function main($id, $mode)
$template->assign_vars(array(
'ERROR' => (count($error)) ? implode('<br />', $error) : '',

'L_TITLE' => $user->lang['UCP_PROFILE_' . strtoupper($mode)],
'L_TITLE' => $language->lang('UCP_PROFILE_' . strtoupper($mode)),

'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => $this->u_action)
Expand Down
5 changes: 4 additions & 1 deletion 5 phpBB/includes/ucp/ucp_register.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function main($id, $mode)
global $config, $db, $user, $template, $phpbb_root_path, $phpEx;
global $request, $phpbb_container, $phpbb_dispatcher;

/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');

//
if ($config['require_activation'] == USER_ACTIVATION_DISABLE ||
(in_array($config['require_activation'], array(USER_ACTIVATION_SELF, USER_ACTIVATION_ADMIN)) && !$config['email_enable']))
Expand Down Expand Up @@ -558,7 +561,7 @@ function main($id, $mode)
);
extract($phpbb_dispatcher->trigger_event('core.ucp_register_register_after', compact($vars)));

$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $controller_helper->route('phpbb_index_controller') . '">', '</a>');
trigger_error($message);
}
}
Expand Down
7 changes: 5 additions & 2 deletions 7 phpBB/includes/ucp/ucp_resend.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function main($id, $mode)
global $config, $phpbb_root_path, $phpEx;
global $db, $user, $auth, $template, $request, $phpbb_container;

/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');

$username = $request->variable('username', '', true);
$email = strtolower($request->variable('email', ''));
$submit = (isset($_POST['submit'])) ? true : false;
Expand Down Expand Up @@ -157,10 +160,10 @@ function main($id, $mode)

$this->update_activation_expiration();

meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
meta_refresh(3, $controller_helper->route('phpbb_index_controller'));

$message = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACTIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT'];
$message .= '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
$message .= '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $controller_helper->route('phpbb_index_controller') . '">', '</a>');
trigger_error($message);
}

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.