File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Sources/PostPrefix/Integration Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -233,13 +233,14 @@ public static function post_end() : void
233
233
// Add the list of prefixes to the options
234
234
if (!empty ($ context ['user_prefixes ' ]['post ' ]))
235
235
{
236
+ $ selected_prefix = (int ) isset ($ _REQUEST ['prefix ' ]) ? $ _REQUEST ['prefix ' ] : 0 ;
236
237
foreach ($ context ['user_prefixes ' ]['post ' ] as $ prefix_id => $ prefix )
237
238
{
238
239
$ context ['posting_fields ' ]['topic_prefix ' ]['input ' ]['options ' ]['PostPrefix_select_prefix ' ]['options ' ][$ prefix_id ] = [
239
240
'label ' => !empty ($ modSettings ['PostPrefix_post_selecttype ' ]) ? PostPrefix::format ($ prefix ) : $ prefix ['name ' ],
240
241
'value ' => $ prefix_id ,
241
242
'id ' => 'prefix_ ' . $ prefix_id ,
242
- 'selected ' => $ prefix_id == $ context ['post_prefix_id ' ] ? true : false ,
243
+ 'selected ' => $ prefix_id == $ context ['post_prefix_id ' ] ? true : ( $ prefix_id == $ selected_prefix ? true : false ) ,
243
244
'data-boards ' => '' . implode (', ' , $ prefix ['boards ' ]) . '' ,
244
245
];
245
246
}
You can’t perform that action at this time.
0 commit comments