Ejemplo n.º 1
0
                    if ($right->can($key, 'w')) {
                        $right->delete(array('id' => $key));
                    }
                }
            }
            if (isset($_POST["entities_id"])) {
                // From entity tab
                Event::log($_POST["entities_id"], "entity", 4, "setup", $_SESSION["glpiname"] . " " . $LANG['log'][62]);
            } else {
                if (isset($_POST["users_id"])) {
                    Event::log($_POST["users_id"], "users", 4, "setup", $_SESSION["glpiname"] . " " . $LANG['log'][62]);
                }
            }
        }
        glpi_header($_SERVER['HTTP_REFERER']);
    } else {
        if (isset($_POST["moveentity"])) {
            if (isset($_POST['entities_id']) && $_POST['entities_id'] >= 0) {
                foreach ($_POST["item"] as $key => $val) {
                    if ($val == 1) {
                        if ($right->can($key, 'w')) {
                            $right->update(array('id' => $key, 'entities_id' => $_POST['entities_id']));
                        }
                    }
                }
            }
            glpi_header($_SERVER['HTTP_REFERER']);
        }
    }
}
displayErrorAndDie("lost");