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

Posts with empty titles in moderation queue are not easily approved

    Details

      Description

      If a post is awaiting approval which has an empty subject, the link that would normally appear allowing you to visit the post in the moderation queue page is empty (no text) and so cannot be clicked on.

      The workaround is to click on the topic link and manually search through the topic until the post is found, but for large topics this becomes impractical.

      Some more details: On the main moderator control panel page, where the latest 5 posts to be approved are displayed, the empty subject is replaced by the text "No subject specified" which can be properly clicked on. But on the "posts waiting approval" section of the moderation queue tab, this replacement does not occur and the subject remains completely blank.

        Activity

        Hide
        igorw Igor Wiedler [X] (Inactive) added a comment -

        Please use a === check, else it will recognize '0' as empty. Even better if you do: utf8_clean_string($input) === ''.

        While == is still used in a few places, the most important ones have been fixed. We should do it properly when introducing new code.

        Show
        igorw Igor Wiedler [X] (Inactive) added a comment - Please use a === check, else it will recognize '0' as empty. Even better if you do: utf8_clean_string($input) === ''. While == is still used in a few places, the most important ones have been fixed. We should do it properly when introducing new code.
        Hide
        bantu Andreas Fischer added a comment -

        The check is correct as far as I know.

        ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],

        wouldn't work, but

        ($row['post_subject'] != '') ? $row['post_subject'] : $user->lang['NO_SUBJECT'],

        does.

        echo "<?php var_dump('0' == ''); ?>" | php
        bool(false)

        utf8_clean_string() doesn't make sense, because that should be performed before putting the data into the db

        Show
        bantu Andreas Fischer added a comment - The check is correct as far as I know. ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], wouldn't work, but ($row['post_subject'] != '') ? $row['post_subject'] : $user->lang['NO_SUBJECT'], does. echo "<?php var_dump('0' == ''); ?>" | php bool(false) utf8_clean_string() doesn't make sense, because that should be performed before putting the data into the db
        Hide
        igorw Igor Wiedler [X] (Inactive) added a comment -

        You are right. 0 == '' but '0' != ''.

        Show
        igorw Igor Wiedler [X] (Inactive) added a comment - You are right. 0 == '' but '0' != ''.

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            thenickdude thenickdude [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development