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

"Change topic type"-option "Normal" always selected.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.7-PL1
    • 3.0.8-RC1
    • Viewing posts
    • None
    • PHP Environment: 4.4.6
      Database: MySQL 4.1.22-standard

    Description

      When a post is opened in Edit mode (with Moderator permissions), the input #'topic_type-0' is always 'checked'. If the post has stored another value, that input will ALSO be 'checked'; i.e., two of the inputs will be checked. for example:

      <label for="topic_type-0">
      	<input type="radio" name="topic_type" id="topic_type-0" value="0" checked="checked" />
      	Normal</label>
      <label for="topic_type-1">
      	<input type="radio" name="topic_type" id="topic_type-1" value="1" />
      	Sticky</label>
      <label for="topic_type-2">
      	<input type="radio" name="topic_type" id="topic_type-2" value="2" checked="checked" />
      	Announce</label>
      <label for="topic_type-3">
      	<input type="radio" name="topic_type" id="topic_type-3" value="3" />
      	Global</label>

      is there a problem with the following code from /includes/functions_posting.php?

      'S_CHECKED'		=> ($cur_topic_type == $topic_value['const'] || ($forum_id == 0 && $topic_value['const'] == POST_GLOBAL)) ? ' checked="checked"' : '',

      I verified the test post in the topics table. topic_type was set to 2 as it should have been.

      I came across this problem because I'm using document.querySelector() to return the checked topic_type input in a script I'm developing to replicate a phpBB site from forumer.com.

      sincerely,
      Gregory

      Attachments

        Issue Links

          Activity

            People

              nickvergessen Joas Schilling
              GregoryC GregoryC [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: