Last change
on this file since 59208 was
59208,
checked in by kent1@…, 9 years ago
|
Passage en SPIP 3.0 de ce petit plugin
On utilise le même fonctionnement que compositions pour le formulaire
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | * Plugin Article Accueil |
---|
4 | * (c) 2011 Cedric Morin, Joseph |
---|
5 | * Distribue sous licence GPL |
---|
6 | * |
---|
7 | */ |
---|
8 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
9 | |
---|
10 | /** |
---|
11 | * Upgrade des tables |
---|
12 | * |
---|
13 | * @param string $nom_meta_base_version |
---|
14 | * @param string $version_cible |
---|
15 | */ |
---|
16 | function article_accueil_upgrade($nom_meta_base_version,$version_cible){ |
---|
17 | include_spip('inc/meta'); |
---|
18 | $current_version = '0.0'; |
---|
19 | if ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) ) |
---|
20 | || (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){ |
---|
21 | if (version_compare($current_version,'0.1','<')){ |
---|
22 | include_spip('base/create'); |
---|
23 | include_spip('base/abstract_sql'); |
---|
24 | maj_tables('spip_rubriques'); |
---|
25 | ecrire_meta($nom_meta_base_version,$current_version='0.1','non'); |
---|
26 | } |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | |
---|
31 | /** |
---|
32 | * Desinstallation |
---|
33 | * |
---|
34 | * @param string $nom_meta_base_version |
---|
35 | */ |
---|
36 | function article_accueil_vider_tables($nom_meta_base_version) { |
---|
37 | include_spip('inc/meta'); |
---|
38 | include_spip('base/abstract_sql'); |
---|
39 | sql_alter("TABLE spip_rubriques DROP id_article_accueil"); |
---|
40 | effacer_meta($nom_meta_base_version); |
---|
41 | } |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.