[ticket/11103] Normalization of $phpbb_notifications variable name

Use $phpbb_notifications instead of $notifications everywhere for
consistency and conflict prevention.

PHPBB3-11103
This commit is contained in:
Nathan Guse 2012-09-14 17:01:08 -05:00
parent ed1ec8e720
commit 8e977544fb
5 changed files with 21 additions and 21 deletions

View file

@ -1294,8 +1294,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
// Mark all forums read (index page)
// Mark all topic notifications read for this user
$notifications = $phpbb_container->get('notifications');
$notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time);
if ($config['load_db_lastread'] && $user->data['is_registered'])
{
@ -1336,8 +1336,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
// Mark topic notifications read for this user in this forum
$notifications = $phpbb_container->get('notifications');
$notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time);
// Mark all post/quote notifications read for this user in this forum
$topic_ids = array();
@ -1351,7 +1351,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
$db->sql_freeresult($result);
$notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time);
$phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time);
// Add 0 to forums array to mark global announcements correctly
// $forum_id[] = 0;
@ -1448,8 +1448,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
// Mark post notifications read for this user in this topic
$notifications = $phpbb_container->get('notifications');
$notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time);
if ($config['load_db_lastread'] && $user->data['is_registered'])
{

View file

@ -717,8 +717,8 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
}
// Delete notifications
$notifications = $phpbb_container->get('notifications');
$notifications->delete_notifications('topic', $topic_ids);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->delete_notifications('topic', $topic_ids);
return $return;
}
@ -899,8 +899,8 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
}
// Delete notifications
$notifications = $phpbb_container->get('notifications');
$notifications->delete_notifications('post', $post_ids);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->delete_notifications('post', $post_ids);
return sizeof($post_ids);
}

View file

@ -2222,19 +2222,19 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// Send Notifications
if ($post_approval)
{
$notifications = $phpbb_container->get('notifications');
$phpbb_notifications = $phpbb_container->get('notifications');
switch ($mode)
{
case 'post' :
$notifications->add_notifications(array('topic', 'quote'), array_merge($data, array(
$phpbb_notifications->add_notifications(array('topic', 'quote'), array_merge($data, array(
'post_username' => $username,
)));
break;
case 'reply' :
case 'quote' :
$notifications->add_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
$phpbb_notifications->add_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
'post_username' => $username,
)));
break;
@ -2243,12 +2243,12 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_first_post' :
case 'edit' :
case 'edit_last_post' :
$notifications->update_notifications('topic', array_merge($data, array(
$phpbb_notifications->update_notifications('topic', array_merge($data, array(
'post_username' => $username,
'topic_title' => $subject,
)));
$notifications->update_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
$phpbb_notifications->update_notifications(array('quote', 'bookmark', 'post'), array_merge($data, array(
'post_username' => $username,
)));
break;

View file

@ -879,8 +879,8 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
global $db, $user, $phpbb_container;
// Mark the PM as read
$notifications = $phpbb_container->get('notifications');
$notifications->mark_notifications_read('pm', $msg_id, $user_id);
$phpbb_notifications = $phpbb_container->get('notifications');
$phpbb_notifications->mark_notifications_read('pm', $msg_id, $user_id);
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
SET pm_unread = 0

View file

@ -634,19 +634,19 @@ function approve_post($post_id_list, $id, $mode)
// Send out normal user notifications
$email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
$notifications = $phpbb_container->get('notifications');
$phpbb_notifications = $phpbb_container->get('notifications');
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'])
{
// Forum Notifications
$notifications->add_notifications('topic', $post_data);
$phpbb_notifications->add_notifications('topic', $post_data);
}
else
{
// Topic Notifications
$notifications->add_notifications(array('quote', 'bookmark', 'post'), $post_data);
$phpbb_notifications->add_notifications(array('quote', 'bookmark', 'post'), $post_data);
}
}