X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fmaj%2Fvieille_base%2F1821%2Fcreate.php;fp=www%2Fecrire%2Fmaj%2Fvieille_base%2F1821%2Fcreate.php;h=506ad53b3dcbcee8e21d5ffc007b9b7791584357;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/maj/vieille_base/1821/create.php b/www/ecrire/maj/vieille_base/1821/create.php new file mode 100644 index 0000000..506ad53 --- /dev/null +++ b/www/ecrire/maj/vieille_base/1821/create.php @@ -0,0 +1,52 @@ + $v) + spip_create_vieille_table($k, $v['field'], $v['key'], true); + + foreach($tables_auxiliaires as $k => $v) + spip_create_vieille_table($k, $v['field'], $v['key'], false); + + foreach($tables_images as $k => $v) + spip_query("INSERT IGNORE 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("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'embed')"); + + foreach($tables_documents as $k => $v) + spip_query("INSERT IGNORE spip_types_documents (extension, titre, inclus) VALUES ('$k', '$v', 'non')"); + + foreach ($tables_mime as $extension => $type_mime) + spip_query("UPDATE spip_types_documents + SET mime_type='$type_mime' WHERE extension='$extension'"); +} + + +?>