Jeremy D commited on 2021-09-04 12:23:59
Showing 2 changed files, with 13 additions and 1 deletions.
Fixes #140 due to select action Fixes pm and mlist due to caching.
... | ... |
@@ -1594,10 +1594,18 @@ function scheduled_simpledesk() |
1594 | 1594 |
*/ |
1595 | 1595 |
function shd_init_current_action(&$current_action) |
1596 | 1596 |
{ |
1597 |
- global $context; |
|
1597 |
+ global $context, $modSettings; |
|
1598 | 1598 |
|
1599 | 1599 |
// Load some extra CSS |
1600 | 1600 |
loadCSSFile('helpdesk_icons.css', array('minimize' => empty($context['shd_developer_mode']), 'seed' => $context['shd_css_version']), 'helpdesk_icons'); |
1601 |
+ |
|
1602 |
+ // In helpdesk only mode, disable PMs if we choose to, this is repeated here due to caching. |
|
1603 |
+ if (!empty($modSettings['shd_helpdesk_only']) && !empty($modSettings['shd_disable_pm'])) |
|
1604 |
+ $context['allow_pm'] = false; |
|
1605 |
+ |
|
1606 |
+ // In helpdesk only mode, disable Memberlist if we choose to, this is repeated here due to caching. |
|
1607 |
+ if (!empty($modSettings['shd_helpdesk_only']) && !empty($modSettings['shd_disable_pm'])) |
|
1608 |
+ $context['allow_memberlist'] = false; |
|
1601 | 1609 |
} |
1602 | 1610 |
|
1603 | 1611 |
/** |
... | ... |
@@ -169,6 +169,10 @@ function shd_profile_areas(&$profile_areas) |
169 | 169 |
|
170 | 170 |
$profile_areas['edit_profile']['areas']['theme']['file'] = 'sd_source/SimpleDesk-Profile.php'; |
171 | 171 |
$profile_areas['edit_profile']['areas']['theme']['function'] = 'shd_profile_theme_wrapper'; |
172 |
+ |
|
173 |
+ // In HD Only mode, we need to change the select to the helpdesk profile. |
|
174 |
+ $profile_areas['info']['areas']['popup']['select'] = 'hd_profile'; |
|
175 |
+ $profile_areas['info']['areas']['alerts_popup']['select'] = 'hd_profile'; |
|
172 | 176 |
} |
173 | 177 |
else |
174 | 178 |
// In non HD only, put it before the editing stuff menu |
175 | 179 |