<?php

if (core::ifPost("from")) {

    tags::maj(core::getPost("id"), core::getPost("value"));
    json::create("documents");
    json::create("documents-limited");

    historique::recRef("/tags.html");
    historique::add(array(
        "idType" => historique::getIdRef("ACTION"),
        "idUser" => session::getId(),
        "idPage" => historique::getIdRef("/tags.html"),
        "log" => "Modification du tag : " . core::getPost("value")
    ));
} else {
    header('HTTP/1.0 401 Unauthorized');
    exit();
}
