mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Fix utils::GetClassesForInterface() not working on Windows env. (courtesy from @Steffunky)
This commit is contained in:
@@ -709,16 +709,17 @@ try {
|
||||
$oPage->add_header('Location: '.$sURL);
|
||||
break;
|
||||
case 'apply_keyboard_shortcuts':
|
||||
$aShortcutClasses = utils::GetClassesForInterface('iKeyboardShortcut','', array('/lib/', 'node_modules', 'test'));
|
||||
// Note: Mind the 4 blackslashes, see utils::GetClassesForInterface()
|
||||
$aShortcutClasses = utils::GetClassesForInterface('iKeyboardShortcut', '', array('[\\\\/]lib[\\\\/]', '[\\\\/]node_modules[\\\\/]', '[\\\\/]test[\\\\/]'));
|
||||
$aShortcutPrefs = [];
|
||||
foreach($aShortcutClasses as $cShortcutPlugin) {
|
||||
foreach ($aShortcutClasses as $cShortcutPlugin) {
|
||||
foreach ($cShortcutPlugin::GetShortcutKeys() as $aShortcutKey) {
|
||||
$sKey = utils::ReadParam($aShortcutKey['id'], $aShortcutKey['key'], true,'raw_data');
|
||||
$sKey = utils::ReadParam($aShortcutKey['id'], $aShortcutKey['key'], true, 'raw_data');
|
||||
$aShortcutPrefs[$aShortcutKey['id']] = strtolower($sKey);
|
||||
}
|
||||
}
|
||||
appUserPreferences::SetPref('keyboard_shortcuts', $aShortcutPrefs);
|
||||
|
||||
|
||||
DisplayPreferences($oPage);
|
||||
break;
|
||||
case 'apply_newsroom_preferences':
|
||||
|
||||
Reference in New Issue
Block a user