Author: cedric.morin@yterium.com
Date: Fri Apr 7 00:56:59 2006
New Revision: 2653
Log:
pour les dump qui viennent de phpmyadmin il faut aussi des echapper les " et les > (a minima, faudra voir si il y en a d'autre en plus)
Modified:
_plugins_/_amelioration_admin_/super_dump/inc/import.php
Modified: _plugins_/_amelioration_admin_/super_dump/inc/import.php
--- _plugins_/_amelioration_admin_/super_dump/inc/import.php (original)
+++ _plugins_/_amelioration_admin_/super_dump/inc/import.php Fri Apr 7 00:56:59 2006
@@ -103,7 +103,7 @@
$tables_trans = array(
);
-function import_objet_1_3($f, $gz=false, $tag_fermant='SPIP', $tables) {
+function import_objet_1_3($f, $gz=false, $tag_fermant='SPIP', $tables, $phpmyadmin=false) {
global $IMPORT_tables_noimport;
global $import_ok, $pos, $abs_pos;
static $time_javascript;
@@ -146,8 +146,10 @@
}
else */
if ($col != 'maj') {
+ if ($phpmyadmin)
+ $value = str_replace(array('"','>'),array('"','>'),$value);
$cols[] = $col;
- $values[] = '"'.addslashes($value).'"';
+ $values[] = "'".addslashes($value)."'";
if ($col == $primary) $id_objet = $value;
}
}
@@ -505,7 +507,7 @@
// Restauration des entrees du fichier
if (preg_match("{^phpmyadmin::}is",$version_archive)){
#spip_log("restauration phpmyadmin : version $version_archive tag $tag_archive");
- while (import_objet_1_3($f, $gz, $tag_archive, $tables));
+ while (import_objet_1_3($f, $gz, $tag_archive, $tables, true));
}
else{
switch ($version_archive) {