X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fmaj%2Fsvn10000.php;h=b48580a56206b82a4e850116cd33da047253aa41;hp=acaa39b9a6076f0c1b6394fd7ff4acdfdc31f99d;hb=122c920eb07e3f665789f8734965b576e6c25515;hpb=226942065cd4f604eb464addf45a065c9e5bc916 diff --git a/www/ecrire/maj/svn10000.php b/www/ecrire/maj/svn10000.php index acaa39b9..b48580a5 100644 --- a/www/ecrire/maj/svn10000.php +++ b/www/ecrire/maj/svn10000.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2012 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -306,6 +306,11 @@ function maj_liens($pivot,$l='') { if (isset($champs[$primary])) unset($champs[$primary]); $champs = array_keys($champs); + // ne garder que les champs qui existent sur la table destination + if ($desc_cible = $trouver_table($liens)){ + $champs = array_intersect($champs,array_keys($desc_cible['field'])); + } + $champs[] = "$primary as id_objet"; $champs[] = "'$objet' as objet"; $champs = implode(', ',$champs);