67 => array ('code' => 'success', 'format' => "Tag rolling done, %u objects involved"),
71 => array ('code' => 'success', 'format' => 'File "%s" was linked successfully'),
72 => array ('code' => 'success', 'format' => 'File was unlinked successfully'),
- 80 => array ('code' => 'success', 'format' => "Added new object '%s'"),
81 => array ('code' => 'success', 'format' => "SNMP: completed '%s' work"),
82 => array ('code' => 'success', 'format' => "Bulk port creation was successful. %u ports created, %u failed"),
87 => array ('code' => 'success', 'format' => '802.1Q recalculate: %d ports changed on %d switches'),
127 => array ('code' => 'error', 'format' => 'Added %u real servers and encountered %u errors'),
131 => array ('code' => 'error', 'format' => 'invalid format requested'),
141 => array ('code' => 'error', 'format' => 'Encountered %u errors, updated %u record(s)'),
- 142 => array ('code' => 'error', 'format' => 'executeAutoPorts() failed'),
143 => array ('code' => 'error', 'format' => 'Tried chaining %u tags, but experienced %u errors.'),
144 => array ('code' => 'error', 'format' => "Error deleting tag: '%s'"),
147 => array ('code' => 'error', 'format' => 'failed adding record "%s"'),
}
$msgcode['generateAutoPorts']['OK'] = 21;
-$msgcode['generateAutoPorts']['ERR'] = 142;
function generateAutoPorts ()
{
- global $pageno;
- $info = spotEntity ('object', $_REQUEST['object_id']);
- // Navigate away in case of success, stay at the place otherwise.
- if (executeAutoPorts ($_REQUEST['object_id'], $info['objtype_id']))
- return buildRedirectURL (__FUNCTION__, 'OK', array(), $pageno, 'ports');
- else
- return buildRedirectURL (__FUNCTION__, 'ERR');
+ $object = spotEntity ('object', getBypassValue());
+ executeAutoPorts ($object['id'], $object['objtype_id']);
+ return buildRedirectURL (__FUNCTION__, 'OK', array(), NULL, 'ports');
}
$msgcode['saveEntityTags']['OK'] = 26;