mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Also activate main mode if not already enabled upon submode acitvation
This commit is contained in:
@@ -63,6 +63,10 @@ class Usermodes extends CI_Model {
|
||||
foreach ($raw_modes as $row) {
|
||||
if (($row->id == $clean_id) || ($row->active == 1)) {
|
||||
$modes[]=$row->mode.'~'.($row->submode ?? '');
|
||||
// Also activate main mode if not active to keep mode/submode ordering in dropdown menu
|
||||
if (array_search($row->mode.'~', $modes) === false) {
|
||||
$modes[] = $row->mode.'~';
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->user_options_model->set_option('usermodes', 'enabled_usermodes', array('json_modes' => json_encode($modes)));
|
||||
|
||||
Reference in New Issue
Block a user