Example #1
0
function item_up()
{
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = $_GET['itemlabel'];
    if (isset($_GET['gid'])) {
        $type = 'group';
        $gid = $params['gid'];
        $ret = xmlrpc_moveItemUpInMenu($gid, $type, $item_uuid);
    } else {
        $type = '';
        $uuid = $params['uuid'];
        $ret = xmlrpc_moveItemUpInMenu($uuid, $type, $item_uuid);
    }
    if ($ret) {
        if (isset($_GET['gid'])) {
            if (xmlrpc_isProfileRegistered($_GET['gid'])) {
                // Get Current Location
                $location = xmlrpc_getProfileLocation($_GET['gid']);
                xmlrpc_synchroLocation($location);
            }
        } else {
            $ret = xmlrpc_synchroComputer($params['uuid']);
        }
    } else {
        $str = sprintf(_T("Failed to move item <strong>%s</strong> in the boot menu", "imaging"), urldecode($label));
        new NotifyWidgetFailure($str);
    }
    if ($type == '') {
        header("Location: " . urlStrRedirect("base/computers/" . $type . "imgtabs", $params));
    } else {
        header("Location: " . urlStrRedirect("imaging/manage/" . $type . "imgtabs", $params));
    }
    exit;
}
Example #2
0
function item_up() {
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = $_GET['itemlabel'];

    if (isset($_GET['gid'])) {
        $type = 'group';
        $gid = $params['gid'];
        $ret = xmlrpc_moveItemUpInMenu($gid, $type, $item_uuid);
    } else {
        $type = '';
        $uuid = $params['uuid'];
        $ret = xmlrpc_moveItemUpInMenu($uuid, $type, $item_uuid);
    }
    if ($ret) {
    /* insert notification code here if needed */
    } else {
        $str = sprintf(_T("Failed to move item <strong>%s</strong> in the boot menu", "imaging"), urldecode($label));
        new NotifyWidgetFailure($str);
    }

    header("Location: " . urlStrRedirect("base/computers/".$type."imgtabs", $params));
    exit;
}