From b5544b2f471ce4c93b08d19919ab062725545ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Sat, 3 Jan 2015 11:39:29 +0100 Subject: [ticket/13450] Type-hint return value of $phpbb_container->get() PHPBB3-13450 --- phpBB/includes/ucp/ucp_main.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/ucp/ucp_main.php') diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index a1624e78ec..b49f4d2ea0 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -645,9 +645,10 @@ class ucp_main { global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container; + /* @var $pagination \phpbb\pagination */ + $pagination = $phpbb_container->get('pagination'); $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE; $start = request_var('start', 0); - $pagination = $phpbb_container->get('pagination'); // Grab icons $icons = $cache->obtain_icons(); @@ -769,6 +770,7 @@ class ucp_main } } + /* @var $phpbb_content_visibility \phpbb\content_visibility */ $phpbb_content_visibility = $phpbb_container->get('content.visibility'); foreach ($topic_list as $topic_id) -- cgit v1.2.1 From f6e06da4c68917dafb057bf7fe19f884a3e148c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Sun, 4 Jan 2015 20:41:04 +0100 Subject: [ticket/13455] Update calls to `request_var()` PHPBB3-13455 --- phpBB/includes/ucp/ucp_main.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/ucp/ucp_main.php') diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index b49f4d2ea0..2d76be6d62 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -219,8 +219,8 @@ class ucp_main { if (check_form_key('ucp_front_subscribed')) { - $forums = array_keys(request_var('f', array(0 => 0))); - $topics = array_keys(request_var('t', array(0 => 0))); + $forums = array_keys($request->variable('f', array(0 => 0))); + $topics = array_keys($request->variable('t', array(0 => 0))); $msg = ''; if (sizeof($forums) || sizeof($topics)) @@ -401,7 +401,7 @@ class ucp_main if (isset($_POST['unbookmark'])) { $s_hidden_fields = array('unbookmark' => 1); - $topics = (isset($_POST['t'])) ? array_keys(request_var('t', array(0 => 0))) : array(); + $topics = (isset($_POST['t'])) ? array_keys($request->variable('t', array(0 => 0))) : array(); $url = $this->u_action; if (!sizeof($topics)) @@ -457,7 +457,7 @@ class ucp_main { if (check_form_key('ucp_draft')) { - $drafts = array_keys(request_var('d', array(0 => 0))); + $drafts = array_keys($request->variable('d', array(0 => 0))); if (sizeof($drafts)) { @@ -480,8 +480,8 @@ class ucp_main if ($submit && $edit) { - $draft_subject = utf8_normalize_nfc(request_var('subject', '', true)); - $draft_message = utf8_normalize_nfc(request_var('message', '', true)); + $draft_subject = utf8_normalize_nfc($request->variable('subject', '', true)); + $draft_message = utf8_normalize_nfc($request->variable('message', '', true)); if (check_form_key('ucp_draft')) { if ($draft_message && $draft_subject) @@ -643,12 +643,12 @@ class ucp_main */ function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array()) { - global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container; + global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request; /* @var $pagination \phpbb\pagination */ $pagination = $phpbb_container->get('pagination'); $table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE; - $start = request_var('start', 0); + $start = $request->variable('start', 0); // Grab icons $icons = $cache->obtain_icons(); -- cgit v1.2.1 From abcb2680eec86dc8016c489ebc7362e29be9e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Mon, 2 Feb 2015 21:35:46 +0100 Subject: [ticket/13455] Remove unnecessary calls to `utf8_normalize_nfc()` PHPBB3-13455 --- phpBB/includes/ucp/ucp_main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/ucp/ucp_main.php') diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 2d76be6d62..036025e84e 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -480,8 +480,8 @@ class ucp_main if ($submit && $edit) { - $draft_subject = utf8_normalize_nfc($request->variable('subject', '', true)); - $draft_message = utf8_normalize_nfc($request->variable('message', '', true)); + $draft_subject = $request->variable('subject', '', true); + $draft_message = $request->variable('message', '', true); if (check_form_key('ucp_draft')) { if ($draft_message && $draft_subject) -- cgit v1.2.1 From f50ba9ab4f6e74e4d472c9e2012dfdd29720dfe9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 18:19:02 +0100 Subject: [ticket/13454] Remove unused variables This is part 2 of the pr. PHPBB3-13454 --- phpBB/includes/ucp/ucp_main.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/includes/ucp/ucp_main.php') diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 036025e84e..217d46b767 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -221,7 +221,6 @@ class ucp_main { $forums = array_keys($request->variable('f', array(0 => 0))); $topics = array_keys($request->variable('t', array(0 => 0))); - $msg = ''; if (sizeof($forums) || sizeof($topics)) { -- cgit v1.2.1