function modifier($id, $lang, $dossier, $ligne, $titre, $chapo, $description, $postscriptum, $urlsuiv, $urlreecrite)
{
    if (!isset($id)) {
        $id = "";
    }
    if (!$lang) {
        $lang = 1;
    }
    $contenu = new Contenu();
    $contenudesc = new Contenudesc();
    $contenu->charger($id);
    $res = $contenudesc->charger($contenu->id, $lang);
    if (!$res) {
        CacheBase::getCache()->reset_cache();
        $temp = new Contenudesc();
        $temp->contenu = $contenu->id;
        $temp->lang = $lang;
        $lastid = $temp->add();
        $contenudesc = new Contenudesc();
        $contenudesc->charger_id($lastid);
    }
    $contenu->datemodif = date("Y-m-d H:i:s");
    if ($contenu->dossier != $dossier) {
        $param_old = Contenudesc::calculer_clef_url_reecrite($contenu->id, $contenu->dossier);
        $param_new = Contenudesc::calculer_clef_url_reecrite($contenu->id, $dossier);
        $reecriture = new Reecriture();
        $query_reec = "select * from {$reecriture->table} where param='&{$param_old}' and lang={$lang} and actif=1";
        $resul_reec = $reecriture->query($query_reec);
        while ($row_reec = $reecriture->fetch_object($resul_reec)) {
            $tmpreec = new Reecriture();
            $tmpreec->charger_id($row_reec->id);
            $tmpreec->param = "&{$param_new}";
            $tmpreec->maj();
        }
        $contenu->dossier = $dossier;
        $contenu->classement = $contenu->prochain_classement();
    }
    if ($ligne == "on") {
        $contenu->ligne = 1;
    } else {
        $contenu->ligne = 0;
    }
    $contenudesc->chapo = $chapo;
    $contenudesc->description = $description;
    $contenudesc->postscriptum = $postscriptum;
    $contenudesc->titre = $titre;
    $contenudesc->chapo = str_replace("\n", "<br/>", $contenudesc->chapo);
    $contenu->maj();
    $contenudesc->maj();
    $contenudesc->reecrire($urlreecrite);
    ActionsModules::instance()->appel_module("modcont", $contenu);
    if ($urlsuiv) {
        redirige("listdos.php?parent=" . $contenu->dossier);
    } else {
        redirige("" . $_SERVER['PHP_SELF'] . "?id=" . $contenu->id . "&dossier=" . $contenu->dossier . "&lang=" . $lang);
    }
    exit;
}