[SPIP] ~maj v3.0.14-->v3.0.17
[ptitvelo/web/www.git] / www / ecrire / maj / svn10000.php
index f9b6427..abe37f2 100644 (file)
@@ -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.     *
@@ -301,6 +301,10 @@ function maj_liens($pivot,$l='') {
                if (!$desc = $trouver_table($ancienne_table))
                        return;
 
+               // securite pour ne pas perdre de donnees
+               if (!$trouver_table($liens))
+                       return;
+
                $champs = $desc['field'];
                if (isset($champs['maj'])) unset($champs['maj']);
                if (isset($champs[$primary])) unset($champs[$primary]);