-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.7-PL1
-
None
-
PHP Environment: 4.4.6
Database: MySQL 4.1.22-standard
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
- is duplicated by
-
PHPBB-9798 Change topic type to normal is preselected when user edits first post but doesn't have permission for current type
- Closed