source: spip-zone/_squelettes_/eva-web/4_0/eva_habillage/base/eva_habillage_base_patch.php @ 37095

Last change on this file since 37095 was 37095, checked in by olivier.gautier@…, 10 years ago

Encore une erreur de compilation sous SPIP 2.1 à éviter

File size: 915 bytes
Line 
1<?php
2function eva_habillage_patch_table() {
3$Table1 = 'spip_eva_habillage';
4$Table2 = 'spip_eva_habillage_themes';
5$Table3 = 'spip_eva_habillage_images';
6$test=sql_showtable('eva_habillage',true);
7if ($test['field']) {
8$eva_verif_ancien = sql_select('id_habillage','eva_habillage',"sauvegarde = 'Defaut'");
9$eva_ver_tab_ancien = sql_fetch($eva_verif_ancien);
10$id_habillage_ancien = $eva_ver_tab_ancien['id_habillage'];
11if (isset($id_habillage_ancien)) {
12        $eva_verif_nouveau = sql_select('id_habillage','spip_eva_habillage',"sauvegarde = 'Defaut'");
13        $eva_ver_tab_nouveau = sql_fetch($eva_verif_nouveau);
14        $id_habillage_nouveau = $eva_ver_tab_nouveau['id_habillage'];
15        if (!isset($id_habillage_nouveau)) {
16        sql_query('RENAME TABLE eva_habillage TO '.$Table1);
17        sql_query('RENAME TABLE eva_habillage_themes TO '.$Table2);
18        sql_query('RENAME TABLE eva_habillage_images TO '.$Table3);
19        }
20}
21}
22}
23?>
Note: See TracBrowser for help on using the repository browser.