Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14361

Unread PM Count Allowed to Go Negative

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Duplicate
    • 3.1.6
    • None
    • Private Messages (PM)
    • None
    • MySQL 10.0.22-MariaDB

    Description

      I don't know how it occurred, but I currently have a negative unread / new Private Message count. It isn't really a big deal, but it won't go away until either I reset the count manually or possibly get a new PM or two.

      It seems like this could be a simple cosmetic fix in includes/functions.php

      Find:

      'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0,
      'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'],
      'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'],
      

      Change to:

      'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg']) && $user->data['user_unread_privmsg'] > 0) ? $user->data['user_unread_privmsg'] : 0,
      'S_USER_NEW_PRIVMSG' => ($user->data['user_new_privmsg'] > 0) ? $user->data['user_new_privmsg'] : 0,
      'S_USER_UNREAD_PRIVMSG' => ($user->data['user_unread_privmsg'] > 0) ? $user->data['user_unread_privmsg'] : 0,
      

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              Ectoman AJ Quick [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: