aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-10-18 18:32:13 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-10-18 18:32:13 -0500
commitae670cc87df197e44b768667b853e1dae3009b4d (patch)
treeba39c95e90ee469f29694b447f50d560b47142bc /phpBB
parent883a96172065b5eb7b07f7c6e19ff2b1d5079ef9 (diff)
downloadforums-ae670cc87df197e44b768667b853e1dae3009b4d.tar
forums-ae670cc87df197e44b768667b853e1dae3009b4d.tar.gz
forums-ae670cc87df197e44b768667b853e1dae3009b4d.tar.bz2
forums-ae670cc87df197e44b768667b853e1dae3009b4d.tar.xz
forums-ae670cc87df197e44b768667b853e1dae3009b4d.zip
[ticket/11103] Remove unnecessary comments
Comments that are not needed because the actions are completely self-explanatory PHPBB3-11103
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/common.php1
-rw-r--r--phpBB/includes/functions.php1
-rw-r--r--phpBB/includes/functions_admin.php2
-rw-r--r--phpBB/includes/functions_privmsgs.php5
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php1
-rw-r--r--phpBB/includes/mcp/mcp_queue.php11
-rw-r--r--phpBB/includes/mcp/mcp_reports.php1
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php4
-rw-r--r--phpBB/report.php2
9 files changed, 0 insertions, 28 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index c1787f6773..dc059887e3 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -130,7 +130,6 @@ $phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
$template = $phpbb_container->get('template');
$phpbb_style = $phpbb_container->get('style');
-// Notifications manager
$phpbb_notifications = $phpbb_container->get('notification_manager');
$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor'));
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 0af8e824c8..2827dae1a8 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1386,7 +1386,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$forum_id = array($forum_id);
}
- // Mark topic notifications read for this user in this forum
$phpbb_notifications->mark_notifications_read_by_parent(array('topic', 'approve_topic'), $forum_id, $user->data['user_id'], $post_time);
// Mark all post/quote notifications read for this user in this forum
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3deb2e9c59..893c7a247d 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -716,7 +716,6 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
set_config_count('num_topics', $approved_topics * (-1), true);
}
- // Delete notifications
$phpbb_notifications->delete_notifications(array('topic', 'approve_topic', 'topic_in_queue'), $topic_ids);
return $return;
@@ -897,7 +896,6 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
}
- // Delete notifications
$phpbb_notifications->delete_notifications(array('quote', 'bookmark', 'post', 'approve_post', 'post_in_queue'), $post_ids);
return sizeof($post_ids);
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 6c31c6d6c3..4638091601 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -878,7 +878,6 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
global $db, $user, $phpbb_notifications;
- // Mark the PM as read
$phpbb_notifications->mark_notifications_read('pm', $msg_id, $user_id);
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
@@ -1097,7 +1096,6 @@ function delete_pm($user_id, $msg_ids, $folder_id)
$user->data['user_unread_privmsg'] -= $num_unread;
}
- // Delete Notifications
$phpbb_notifications->delete_notifications('pm', array_keys($delete_rows));
// Now we have to check which messages we can delete completely
@@ -1262,7 +1260,6 @@ function phpbb_delete_user_pms($user_id)
AND ' . $db->sql_in_set('msg_id', $delivered_msg);
$db->sql_query($sql);
- // Delete Notifications
$phpbb_notifications->delete_notifications('pm', $delivered_msg);
}
@@ -1276,7 +1273,6 @@ function phpbb_delete_user_pms($user_id)
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
$db->sql_query($sql);
- // Delete Notifications
$phpbb_notifications->delete_notifications('pm', $undelivered_msg);
}
}
@@ -1321,7 +1317,6 @@ function phpbb_delete_user_pms($user_id)
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
$db->sql_query($sql);
- // Delete Notifications
$phpbb_notifications->delete_notifications('pm', $delete_ids);
}
}
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index 227c89bb79..001edfd8db 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -90,7 +90,6 @@ class mcp_pm_reports
trigger_error('NO_REPORT');
}
- // Mark the notification as read
$phpbb_notifications->mark_notifications_read_by_parent('report_pm', $report_id, $user->data['user_id']);
$pm_id = $report['pm_id'];
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index b23e5f4e45..72f1c00c72 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -86,7 +86,6 @@ class mcp_queue
{
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
- // Mark the notification as read
$phpbb_notifications->mark_notifications_read('topic_in_queue', $topic_id, $user->data['user_id']);
}
else
@@ -95,7 +94,6 @@ class mcp_queue
}
}
- // Mark the notification as read
$phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
$post_info = get_post_data(array($post_id), 'm_approve', true);
@@ -612,13 +610,10 @@ function approve_post($post_id_list, $id, $mode)
{
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
{
- // Delete topic in queue notifications
$phpbb_notifications->delete_notifications(array('topic_in_queue'), $post_data['topic_id']);
- // Forum Notifications
$phpbb_notifications->add_notifications('topic', $post_data);
- // Notify poster?
if ($notify_poster)
{
$phpbb_notifications->add_notifications('approve_topic', $post_data);
@@ -626,13 +621,10 @@ function approve_post($post_id_list, $id, $mode)
}
else
{
- // Delete post in queue notification
$phpbb_notifications->delete_notifications(array('post_in_queue'), $post_id);
- // Topic Notifications
$phpbb_notifications->add_notifications(array('quote', 'bookmark', 'post'), $post_data);
- // Notify poster?
if ($notify_poster)
{
$phpbb_notifications->add_notifications('approve_post', $post_data);
@@ -859,7 +851,6 @@ function disapprove_post($post_id_list, $id, $mode)
}
}
- // Handle notifications (topic/post in queue)
foreach ($post_info as $post_id => $post_data)
{
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
@@ -912,7 +903,6 @@ function disapprove_post($post_id_list, $id, $mode)
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
{
- // Notify poster?
if ($notify_poster)
{
$phpbb_notifications->add_notifications('disapprove_topic', $post_data);
@@ -920,7 +910,6 @@ function disapprove_post($post_id_list, $id, $mode)
}
else
{
- // Notify poster?
if ($notify_poster)
{
$phpbb_notifications->add_notifications('disapprove_post', $post_data);
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 7c6352a244..f6121e7e03 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -88,7 +88,6 @@ class mcp_reports
trigger_error('NO_REPORT');
}
- // Mark the notification as read
$phpbb_notifications->mark_notifications_read('report_post', $post_id, $user->data['user_id']);
if (!$report_id && $report['report_closed'])
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 321730a64b..aeace13968 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -50,12 +50,10 @@ class ucp_notifications
{
if ($request->is_set_post($type . '_notification') && !isset($subscriptions[$type]))
{
- // add
$phpbb_notifications->add_subscription($type);
}
else if (!$request->is_set_post($type . '_notification') && isset($subscriptions[$type]))
{
- // remove
$phpbb_notifications->delete_subscription($type);
}
@@ -63,12 +61,10 @@ class ucp_notifications
{
if ($request->is_set_post($type . '_' . $method) && (!isset($subscriptions[$type]) || !in_array($method, $subscriptions[$type])))
{
- // add
$phpbb_notifications->add_subscription($type, 0, $method);
}
else if (!$request->is_set_post($type . '_' . $method) && isset($subscriptions[$type]) && in_array($method, $subscriptions[$type]))
{
- // remove
$phpbb_notifications->delete_subscription($type, 0, $method);
}
}
diff --git a/phpBB/report.php b/phpBB/report.php
index 9f3b09d5ba..07b9711ae1 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -185,7 +185,6 @@ if ($submit && $reason_id)
$lang_return = $user->lang['RETURN_TOPIC'];
$lang_success = $user->lang['POST_REPORTED_SUCCESS'];
- // Notify relevant users
$phpbb_notifications->add_notifications('report_post', array_merge($report_data, $row, $forum_data, array(
'report_text' => $report_text,
)));
@@ -216,7 +215,6 @@ if ($submit && $reason_id)
$lang_return = $user->lang['RETURN_PM'];
$lang_success = $user->lang['PM_REPORTED_SUCCESS'];
- // Notify relevant users
$phpbb_notifications->add_notifications('report_pm', array_merge($report_data, $row, array(
'report_text' => $report_text,
'from_user_id' => $report_data['author_id'],