inc-calcul.php3 inc-forum.php3 spip_image.php3 1.119 1.87 1.108 1.120 1.88 1.109

Update of /home/spip-cvs/spip
In directory alan:/tmp/cvs-serv20203

Modified Files:
  inc-calcul.php3 inc-forum.php3 spip_image.php3
Log Message:
abstraction de insert_id pour compatibilité Postgres

Index: inc-calcul.php3

RCS file: /home/spip-cvs/spip/inc-calcul.php3,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- inc-calcul.php3 22 Oct 2004 18:04:37 -0000 1.119
+++ inc-calcul.php3 23 Oct 2004 14:21:27 -0000 1.120
@@ -86,7 +86,7 @@
   $f = $squelette . '_fonctions.php3';
   if (@file_exists($f)) include($f);

- // A quoi sert ce test ???
+
   if (function_exists($nom)) return $nom;

   $skel_code = calculer_squelette($skel, $nom, $ext, $sourcefile);

Index: spip_image.php3

RCS file: /home/spip-cvs/spip/spip_image.php3,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- spip_image.php3 22 Oct 2004 21:48:04 -0000 1.108
+++ spip_image.php3 23 Oct 2004 14:21:27 -0000 1.109
@@ -259,9 +259,7 @@
   }
   if (!$id_document) {
     $id_type = $row['id_type'];
- $query = "INSERT INTO spip_documents (id_type, titre, date) VALUES ($id_type, '', NOW())";
- spip_query($query);
- $id_document = spip_insert_id();
+ $id_document = spip_insert("spip_documents", "(id_type, titre, date)", "($id_type, '', NOW())");
     $nouveau = true;
     if ($id_article && isset($type)) {
       $query = "INSERT INTO spip_documents_".$type."s (id_document, id_".$type.") VALUES ($id_document, $id_article)";

Index: inc-forum.php3

RCS file: /home/spip-cvs/spip/inc-forum.php3,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- inc-forum.php3 13 Oct 2004 18:21:55 -0000 1.87
+++ inc-forum.php3 23 Oct 2004 14:21:27 -0000 1.88
@@ -101,9 +101,10 @@
       $auteur = $GLOBALS['auteur_session']['nom'];
       $email_auteur = $GLOBALS['auteur_session']['email'];
     }
- spip_query("INSERT INTO spip_forum (date_heure, titre, ip, statut)
- VALUES (NOW(), '".addslashes($titre)."', '$REMOTE_ADDR', 'redac')");
- $id_message = spip_insert_id();
+ $id_message = spip_insert('spip_forum',
+ "(date_heure, titre, ip, statut)",
+ "(NOW(), '".addslashes($titre)."', '$REMOTE_ADDR', 'redac')");
+
   }

   // Generation d'une valeur de securite pour validation