diff --git a/core/config.class.inc.php b/core/config.class.inc.php index e8d2f88c2..24df38c92 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -333,6 +333,14 @@ class Config 'source_of_value' => '', 'show_in_conf_sample' => false, ], + 'allow_menu_organization_filter' => [ + 'type' => 'bool', + 'description' => 'Display organization filter in menu', + 'default' => true, + 'value' => true, + 'source_of_value' => '', + 'show_in_conf_sample' => false, + ], 'allow_target_creation' => [ 'type' => 'bool', 'description' => 'Displays the + button on external keys to create target objects', @@ -1861,7 +1869,7 @@ class Config } if (strlen($sNoise) > 0) { - // Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack) + // Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack) throw new ConfigException('Syntax error in configuration file', array('file' => $sConfigFile, 'error' => ''.htmlentities($sNoise, ENT_QUOTES, 'UTF-8').'')); } @@ -2671,7 +2679,7 @@ class ConfigPlaceholdersResolver } $sPattern = '/\%(env|server)\((\w+)\)(?:\?:(\w*))?\%/'; //3 capturing groups, ie `%env(HTTP_PORT)?:8080%` produce: `env` `HTTP_PORT` and `8080`. - + if (! preg_match_all($sPattern, $rawValue, $aMatchesCollection, PREG_SET_ORDER)) { return $rawValue; diff --git a/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenu.php b/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenu.php index 6229d755c..ef061a615 100644 --- a/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenu.php +++ b/sources/application/UI/Base/Layout/NavigationMenu/NavigationMenu.php @@ -196,7 +196,7 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut } return ''; } - + /** * @return array */ @@ -301,6 +301,11 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut $this->bHasSiloSelected = false; $this->sSiloLabel = null; + \IssueLog::Info("test allow_menu_organization_filter", null, ['allow_menu_organization_filter' => MetaModel::GetConfig()->Get('allow_menu_organization_filter')]); + if (! MetaModel::GetConfig()->Get('allow_menu_organization_filter')){ + return; + } + //TODO 3.0 Use components if we have the time to build select/autocomplete components before release // List of visible Organizations $iCount = 0; @@ -343,7 +348,7 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut $this->aSiloSelection['html'] = '