mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fix
This commit is contained in:
parent
bd17efa3dd
commit
4760e0b20c
@ -763,6 +763,7 @@ if ($config['menu_type'] == 'classic') {
|
|||||||
page: 'include/ajax/order_interpreter',
|
page: 'include/ajax/order_interpreter',
|
||||||
method: 'getResult',
|
method: 'getResult',
|
||||||
text: $('#keywords').val(),
|
text: $('#keywords').val(),
|
||||||
|
enterprise: <?php echo (int) enterprise_installed(); ?>,
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$('#result_order').html(data);
|
$('#result_order').html(data);
|
||||||
|
@ -380,7 +380,7 @@ class OrderInterpreter extends Wizard
|
|||||||
|
|
||||||
// Take value from input search.
|
// Take value from input search.
|
||||||
$text = get_parameter('text', '');
|
$text = get_parameter('text', '');
|
||||||
$array_found = [];
|
$enterprise = (bool) get_parameter('enterprise', false);
|
||||||
$iterator = 0;
|
$iterator = 0;
|
||||||
$more_results = 0;
|
$more_results = 0;
|
||||||
|
|
||||||
@ -394,7 +394,7 @@ class OrderInterpreter extends Wizard
|
|||||||
__('GO TO '.$value['name'])
|
__('GO TO '.$value['name'])
|
||||||
) && $value['acl']
|
) && $value['acl']
|
||||||
) {
|
) {
|
||||||
if ($iterator <= 9) {
|
if ($iterator <= 9 && $this->canShowItem($enterprise, $this->pages_menu[$key]['url'])) {
|
||||||
echo '<li class="list_found" name="'.$iterator.'" id="'.$iterator.'">';
|
echo '<li class="list_found" name="'.$iterator.'" id="'.$iterator.'">';
|
||||||
echo '
|
echo '
|
||||||
Go to
|
Go to
|
||||||
@ -432,6 +432,28 @@ class OrderInterpreter extends Wizard
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the element must be shown or not.
|
||||||
|
*
|
||||||
|
* @param boolean $isEnterprise Define if the console is Enterprise.
|
||||||
|
* @param string $url Url of the element for select.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
private function canShowItem(bool $isEnterprise, string $url)
|
||||||
|
{
|
||||||
|
$canShow = false;
|
||||||
|
|
||||||
|
$hasEnterpriseLocation = strpos($url, '&sec2=enterprise') !== false;
|
||||||
|
|
||||||
|
if (($isEnterprise === false && $hasEnterpriseLocation === false) || $isEnterprise === true) {
|
||||||
|
$canShow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $canShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load JS content.
|
* Load JS content.
|
||||||
* function to create JS actions.
|
* function to create JS actions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user