Last change
on this file since 128 was
76,
checked in by sebas, 16 years ago
|
plugin de abonomailman para enviar boletin electronico
basado sobre los cambios de sebas para arreglar los envios.
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[76] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Abomailmans |
---|
| 4 | * MaZiaR - NetAktiv |
---|
| 5 | * tech@netaktiv.com |
---|
| 6 | * Printemps 2007 |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | $GLOBALS['abomailmans_base_version'] = 0.10; |
---|
| 10 | function abomailmans_upgrade(){ |
---|
| 11 | $version_base = $GLOBALS['abomailmans_base_version']; |
---|
| 12 | $current_version = 0.0; |
---|
| 13 | if ( (isset($GLOBALS['meta']['abomailmans_base_version']) ) |
---|
| 14 | && (($current_version = $GLOBALS['meta']['abomailmans_base_version'])==$version_base)) |
---|
| 15 | return; |
---|
| 16 | |
---|
| 17 | include_spip('base/abomailmans'); |
---|
| 18 | if ($current_version==0.0){ |
---|
| 19 | include_spip('base/create'); |
---|
| 20 | include_spip('base/abstract_sql'); |
---|
| 21 | creer_base(); |
---|
| 22 | ecrire_meta('abomailmans_base_version',$current_version=$version_base); |
---|
| 23 | } |
---|
| 24 | ecrire_metas(); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | function abomailmans_vider_tables() { |
---|
| 28 | spip_query("DROP TABLE spip_abomailmans"); |
---|
| 29 | |
---|
| 30 | effacer_meta('abomailmans_base_version'); |
---|
| 31 | ecrire_metas(); |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | function abomailmans_install($action){ |
---|
| 35 | global $forms_base_version; |
---|
| 36 | switch ($action){ |
---|
| 37 | case 'test': |
---|
| 38 | return (isset($GLOBALS['meta']['abomailmans_base_version']) AND ($GLOBALS['meta']['abomailmans_base_version']==$GLOBALS['abomailmans_base_version'])); |
---|
| 39 | break; |
---|
| 40 | case 'install': |
---|
| 41 | |
---|
| 42 | abomailmans_upgrade(); |
---|
| 43 | break; |
---|
| 44 | case 'uninstall': |
---|
| 45 | abomailmans_vider_tables(); |
---|
| 46 | break; |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.