153 => array ('code' => 'error', 'format' => 'Password change failed.'),
154 => array ('code' => 'error', 'format' => "Verification error: %s"),
155 => array ('code' => 'error', 'format' => 'Save failed.'),
- 157 => array ('code' => 'error', 'format' => 'operation not permitted'),
159 => array ('code' => 'error', 'format' => 'Permission denied moving port %s from VLAN%u to VLAN%u'),
160 => array ('code' => 'error', 'format' => 'Invalid arguments'),
161 => array ('code' => 'error', 'format' => 'Endpoint not found. Please either set FQDN attribute or assign an IP address to the object.'),
". Click <a href='index.php?logout'>here</a> to logout.";
}
-function searchHandler () {
+function searchHandler()
+{
$terms = trim ($_REQUEST['q']);
if (!strlen ($terms))
throw new InvalidRequestArgException('q', $_REQUEST['q'], 'Search string cannot be empty.');
- if (!permitted ('depot', 'default'))
- throw new RTPermissionDenied();
-
- $results = searchEntitiesByText ($terms);
- renderSearchResults ($terms, $results);
+ renderSearchResults ($terms, searchEntitiesByText ($terms));
}
function renderSearchResults ($terms, $summary)
$msgcode['process8021QRecalcRequest']['CHANGED'] = 87;
$msgcode['process8021QRecalcRequest']['NO_CHANGES'] = 300;
-$msgcode['process8021QRecalcRequest']['ERR'] = 157;
function process8021QRecalcRequest ()
{
- global $sic;
- if (! permitted (NULL, NULL, NULL, array (array ('tag' => '$op_recalc8021Q'))))
- return buildRedirectURL (__FUNCTION__, 'ERR');
- $counters = recalc8021QPorts ($sic['object_id']);
+ assertPermission (NULL, NULL, NULL, array (array ('tag' => '$op_recalc8021Q')));
+ $counters = recalc8021QPorts (getBypassValue());
if ($counters['ports'])
return buildRedirectURL (__FUNCTION__, 'CHANGED', array ($counters['ports'], $counters['switches']));
else