diff --git a/ecrire/inc_base.php3 b/ecrire/inc_base.php3 index 158b498f0299e438d22163a221750245d0a8772a..b616250a66c16609f97d18786c7de220f81ab5f8 100644 --- a/ecrire/inc_base.php3 +++ b/ecrire/inc_base.php3 @@ -69,17 +69,17 @@ function creer_base() { spip_create_table($k, $v['field'], $v['key'], false); foreach($tables_images as $k => $v) - spip_query_db("INSERT IGNORE spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . + spip_query_db("INSERT IGNORE INTO spip_types_documents (extension, inclus, titre, id_type) VALUES ('$k', 'image', '" . (is_numeric($v) ? (strtoupper($k) . "', $v") : "$v', 0") . ")"); foreach($tables_sequences as $k => $v) - spip_query_db("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); + spip_query_db("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); foreach($tables_documents as $k => $v) - spip_query_db("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); + spip_query_db("INSERT IGNORE INTO spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); foreach ($tables_mime as $extension => $type_mime) spip_query_db("UPDATE spip_types_documents diff --git a/ecrire/inc_index.php3 b/ecrire/inc_index.php3 index 23cb6ce0d62c01a478fbde3d871da5d9b368c196..db027a4994bb787c738ccb395b4a69f924112edf 100644 --- a/ecrire/inc_index.php3 +++ b/ecrire/inc_index.php3 @@ -390,9 +390,9 @@ function indexer_objet($type, $id_objet, $forcer_reset = true) { spip_query($mots); } reset($index); - unset($q); - while (list($hash, $points) = each($index)) $q[] = "(0x$hash,".ceil($points).",$id_objet)"; - spip_query("INSERT INTO $table_index (hash, points, $col_id) VALUES ".join(',',$q)); + while (list($hash, $points) = each($index)) { + spip_query("INSERT INTO $table_index (hash, points, $col_id) VALUES (0x$hash,".ceil($points).",$id_objet)"); + } } // marquer "indexe" diff --git a/ecrire/install.php3 b/ecrire/install.php3 index 18ba70fda2eeafa025998c049df1df76aa7746de..0a4a339b883e4bd90c340fe9ebe5041f83ed46e7 100644 --- a/ecrire/install.php3 +++ b/ecrire/install.php3 @@ -273,7 +273,7 @@ else if ($etape == 4) { // Tester $mysql_rappel_nom_base $GLOBALS['mysql_rappel_nom_base'] = true; $GLOBALS['spip_mysql_db'] = $sel_db; - $ok_rappel_nom = spip_query("INSERT spip_meta (nom,valeur) + $ok_rappel_nom = spip_query("INSERT INTO spip_meta (nom,valeur) VALUES ('mysql_rappel_nom_base', 'test')"); if ($ok_rappel_nom) { echo " (ok rappel nom base `$sel_db`.spip_meta) "; @@ -287,7 +287,7 @@ else if ($etape == 4) { } if ($nouvelle) { - spip_query("INSERT spip_meta (nom, valeur) VALUES ('nouvelle_install', 'oui')"); + spip_query("INSERT INTO spip_meta (nom, valeur) VALUES ('nouvelle_install', 'oui')"); $result_ok = !spip_sql_errno(); } else { $result = spip_query("SELECT COUNT(*) FROM spip_articles");