[ticket/14638] Rollback changes from 3.2.x version

Mistakenly brought in the modified 3.2.x version verbatim instead of diffing
against the 3.1.x version of ucp_main.php. Removed any changes I didn't
explicitly make.

PHPBB3-14638
This commit is contained in:
Wesley Fok 2016-08-03 13:27:06 -04:00
parent ba13832085
commit 3038bf5eaf

View file

@ -227,8 +227,9 @@ class ucp_main
{ {
if (check_form_key('ucp_front_subscribed')) if (check_form_key('ucp_front_subscribed'))
{ {
$forums = array_keys($request->variable('f', array(0 => 0))); $forums = array_keys(request_var('f', array(0 => 0)));
$topics = array_keys($request->variable('t', array(0 => 0))); $topics = array_keys(request_var('t', array(0 => 0)));
$msg = '';
if (sizeof($forums) || sizeof($topics)) if (sizeof($forums) || sizeof($topics))
{ {
@ -450,7 +451,7 @@ class ucp_main
if (isset($_POST['unbookmark'])) if (isset($_POST['unbookmark']))
{ {
$s_hidden_fields = array('unbookmark' => 1); $s_hidden_fields = array('unbookmark' => 1);
$topics = (isset($_POST['t'])) ? array_keys($request->variable('t', array(0 => 0))) : array(); $topics = (isset($_POST['t'])) ? array_keys(request_var('t', array(0 => 0))) : array();
$url = $this->u_action; $url = $this->u_action;
if (!sizeof($topics)) if (!sizeof($topics))
@ -506,7 +507,7 @@ class ucp_main
{ {
if (check_form_key('ucp_draft')) if (check_form_key('ucp_draft'))
{ {
$drafts = array_keys($request->variable('d', array(0 => 0))); $drafts = array_keys(request_var('d', array(0 => 0)));
if (sizeof($drafts)) if (sizeof($drafts))
{ {
@ -529,8 +530,8 @@ class ucp_main
if ($submit && $edit) if ($submit && $edit)
{ {
$draft_subject = $request->variable('subject', '', true); $draft_subject = utf8_normalize_nfc(request_var('subject', '', true));
$draft_message = $request->variable('message', '', true); $draft_message = utf8_normalize_nfc(request_var('message', '', true));
if (check_form_key('ucp_draft')) if (check_form_key('ucp_draft'))
{ {
if ($draft_message && $draft_subject) if ($draft_message && $draft_subject)
@ -694,10 +695,9 @@ class ucp_main
{ {
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request, $phpbb_dispatcher; global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request, $phpbb_dispatcher;
/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE; $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = $request->variable('start', 0); $start = request_var('start', 0);
$pagination = $phpbb_container->get('pagination');
// Grab icons // Grab icons
$icons = $cache->obtain_icons(); $icons = $cache->obtain_icons();
@ -852,7 +852,6 @@ class ucp_main
} }
} }
/* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility'); $phpbb_content_visibility = $phpbb_container->get('content.visibility');
foreach ($topic_list as $topic_id) foreach ($topic_list as $topic_id)