From a92669994bb99e9e04eb682295d1c775384ba182 Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:20:45 +0200 Subject: [PATCH 1/5] [ticket/11786] Fix typo and ugly English in the notification system PHPDoc The notification system contained two PHPDoc lines that needed improvement. PHPBB3-11786 --- phpBB/phpbb/notification/type/quote.php | 2 +- phpBB/phpbb/notification/type/report_pm.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 0ed13f36fb..041d9765d5 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -17,7 +17,7 @@ if (!defined('IN_PHPBB')) /** * Post quoting notifications class -* This class handles notifications for quoting users in a post +* This class handles notifications for users being quoted in a post * * @package notifications */ diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 3fa73bab41..89733503b0 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) } /** -* Private message reproted notifications class +* Private message reported notifications class * This class handles notifications for private messages when they are reported * * @package notifications From e2014ab76ee2947691c9136afacc311b01b74e9a Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:23:54 +0200 Subject: [PATCH 2/5] [ticket/11786] Fix PHPDoc documentation of a few events Fixed some PHPDoc errors I noticed while working on the karma extension. Mostly spacing issues or omitted characters, though there was one description that made no sense at all. PHPBB3-11786 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 4 ++-- phpBB/memberlist.php | 2 +- phpBB/viewtopic.php | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index c7b4489daf..cebbadc7c7 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -254,8 +254,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) * @var string mode Active module * @var int folder_id ID of the folder the message is in * @var int msg_id ID of the private message - * var array folder Array with data of user's message folders - * @var array message_row Array with message data + * @var array folder Array with data of user's message folders + * @var array message_row Array with message data * @var array cp_row Array with senders custom profile field data * @var array msg_data Template array with message data * @since 3.1-A1 diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 26f920fe5a..1e22b8640d 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -595,7 +595,7 @@ switch ($mode) * Modify user data before we display the profile * * @event core.memberlist_view_profile - * @var array member Title of the index page + * @var array member Array with user's data * @var bool user_notes_enabled Is the mcp user notes module * enabled? * @var bool warn_user_enabled Is the mcp warnings module diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index bc54a249a9..4d181aa20b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1102,8 +1102,8 @@ while ($row = $db->sql_fetchrow($result)) * * @event core.viewtopic_cache_guest_data * @var array user_cache_data Array with the user's data - * @var int poster_id Poster's user id - * @var array row Array with original user and post data + * @var int poster_id Poster's user id + * @var array row Array with original user and post data * @since 3.1-A1 */ $vars = array('user_cache_data', 'poster_id', 'row'); @@ -1168,8 +1168,8 @@ while ($row = $db->sql_fetchrow($result)) * * @event core.viewtopic_cache_user_data * @var array user_cache_data Array with the user's data - * @var int poster_id Poster's user id - * @var array row Array with original user and post data + * @var int poster_id Poster's user id + * @var array row Array with original user and post data * @since 3.1-A1 */ $vars = array('user_cache_data', 'poster_id', 'row'); @@ -1660,10 +1660,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * Modify the posts template block * * @event core.viewtopic_modify_post_row - * @var array row Array with original post and user data - * @var array cp_row Custom profile field data of the poster + * @var array row Array with original post and user data + * @var array cp_row Custom profile field data of the poster * @var array user_poster_data Poster's data from user cache - * @var array post_row Template block array of the post + * @var array post_row Template block array of the post * @since 3.1-A1 */ $vars = array('row', 'cp_row', 'user_poster_data', 'post_row'); From ef4eda3855ea7df9611de0abcb5308e0129e406f Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 16:56:04 +0200 Subject: [PATCH 3/5] [ticket/11786] s/@return void/@return null in content_visibility.php The file phpbb/content_visibility.php still contained a few instances of '@return void' in its PHPDoc blocks, fixed. Thanks to JoshyPHP for reporting. PHPBB3-11786 --- phpBB/phpbb/content_visibility.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index fb8ece0e8c..3c94b629e9 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -554,7 +554,7 @@ class phpbb_content_visibility * * @param $data array Contains information from the topics table about given topic * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function add_post_to_statistic($data, &$sql_data) { @@ -575,7 +575,7 @@ class phpbb_content_visibility * * @param $data array Contains information from the topics table about given topic * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function remove_post_from_statistic($data, &$sql_data) { @@ -597,7 +597,7 @@ class phpbb_content_visibility * @param $forum_id int Forum where the topic is found * @param $topic_row array Contains information from the topic, may be empty at call time * @param $sql_data array Populated with the SQL changes, may be empty at call time - * @return void + * @return null */ public function remove_topic_from_statistic($topic_id, $forum_id, &$topic_row, &$sql_data) { From 564a7cc89dcd2464024b78fe2e70adef771368f2 Mon Sep 17 00:00:00 2001 From: rechosen Date: Tue, 13 Aug 2013 17:05:55 +0200 Subject: [PATCH 4/5] [ticket/11786] Further improve wording in phpbb/notification/type/quote.php Further improve wording in phpbb/notification/type/quote.php per suggestion of imkingdavid. PHPBB3-11786 --- phpBB/phpbb/notification/type/quote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 041d9765d5..5a626aa211 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -17,7 +17,7 @@ if (!defined('IN_PHPBB')) /** * Post quoting notifications class -* This class handles notifications for users being quoted in a post +* This class handles notifying users when they have been quoted in a post * * @package notifications */ From bf5ce957cf046ab0b8d00fdc36d825bceccbfad6 Mon Sep 17 00:00:00 2001 From: rechosen Date: Mon, 23 Sep 2013 18:10:41 +0200 Subject: [PATCH 5/5] [ticket/11786] Fix indentation in the PHPDoc of core.group_delete_user_before The core.group_delete_user_before event had bad indentation in its PHPDoc. Fixed. PHPBB3-11786 --- phpBB/includes/functions_user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 4fcce67801..c5ced94633 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2752,8 +2752,8 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, * Event before users are removed from a group * * @event core.group_delete_user_before - * @var int group_id ID of the group from which users are deleted - * @var string group_name Name of the group + * @var int group_id ID of the group from which users are deleted + * @var string group_name Name of the group * @var array user_id_ary IDs of the users which are removed * @var array username_ary names of the users which are removed * @since 3.1-A1