Last change
on this file since 31874 was
31874,
checked in by kent1@…, 12 years ago
|
import du plugin gfc de goony et philooo
|
File size:
1.2 KB
|
Line | |
---|
1 | <? |
---|
2 | |
---|
3 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
4 | function gfc_declarer_tables_principales($tables_principales){ |
---|
5 | $tables_principales['spip_auteurs']['field']['gfc_uid'] = "varchar(50) NOT NULL"; |
---|
6 | return $tables_principales; |
---|
7 | } |
---|
8 | |
---|
9 | |
---|
10 | /** |
---|
11 | * MAJ/Upgrade de la base |
---|
12 | * |
---|
13 | * @param unknown_type $nom_meta_base_version |
---|
14 | * @param unknown_type $version_cible |
---|
15 | */ |
---|
16 | function gfc_upgrade($nom_meta_base_version,$version_cible){ |
---|
17 | include_spip('inc/meta'); |
---|
18 | include_spip('base/abstract_sql'); |
---|
19 | $current_version = 0.0; |
---|
20 | if ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) ) |
---|
21 | || (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){ |
---|
22 | if (version_compare($current_version,"1.0",'<')){ |
---|
23 | sql_alter('table spip_auteurs ADD gfc_uid varchar(50) NOT NULL'); |
---|
24 | ecrire_meta($nom_meta_base_version,$current_version="1.0"); |
---|
25 | } |
---|
26 | } |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * Suppression des tables lors de la desinstallation |
---|
31 | * |
---|
32 | * @param unknown_type $nom_meta_base_version |
---|
33 | */ |
---|
34 | function gfc_vider_tables($nom_meta_base_version) { |
---|
35 | include_spip('inc/meta'); |
---|
36 | include_spip('base/abstract_sql'); |
---|
37 | sql_alter('table spip_auteurs drop gfc_uid'); |
---|
38 | effacer_meta($nom_meta_base_version); |
---|
39 | } |
---|
40 | |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.