1 | <?php |
---|
2 | /* ----------------------------------------------------------------------------- |
---|
3 | Plugin : GMaps |
---|
4 | Author : Grum |
---|
5 | email : grum@piwigo.org |
---|
6 | website : http://www.grum.fr |
---|
7 | |
---|
8 | << May the Little SpaceFrog be with you ! >> |
---|
9 | ------------------------------------------------------------------------------ |
---|
10 | See main.inc.php for release information |
---|
11 | |
---|
12 | --------------------------------------------------------------------------- */ |
---|
13 | |
---|
14 | if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | global $prefixeTable, $template; |
---|
19 | |
---|
20 | load_language('plugin.lang', ESTAT_PATH); |
---|
21 | |
---|
22 | $main_plugin_object = get_plugin_data($plugin_id); |
---|
23 | |
---|
24 | |
---|
25 | if(CommonPlugin::checkGPCRelease(ESTAT_GPC_NEEDED)) |
---|
26 | { |
---|
27 | $config=Array(); |
---|
28 | GPCCore::loadConfig('estat', $config); |
---|
29 | |
---|
30 | if($config['installed']!=ESTAT_VERSION2) |
---|
31 | { |
---|
32 | /* the plugin was updated without being deactivated |
---|
33 | * deactivate + activate the plugin to process the database upgrade |
---|
34 | */ |
---|
35 | include(ESTAT_PATH."estat_install.class.inc.php"); |
---|
36 | $plugin=new EStat_Install($prefixeTable, dirname(__FILE__)); |
---|
37 | $plugin->deactivate(); |
---|
38 | $plugin->activate(); |
---|
39 | $template->delete_compiled_templates(); |
---|
40 | //$config['newInstall']='n'; |
---|
41 | } |
---|
42 | |
---|
43 | |
---|
44 | /* |
---|
45 | * if the plugin is newly installed, display a special configuration page |
---|
46 | * otherwise, display normal page |
---|
47 | */ |
---|
48 | if($config['plugin.newInstall']=='n') |
---|
49 | { |
---|
50 | include(ESTAT_PATH."estat_aip.class.inc.php"); |
---|
51 | $plugin_aip = new EStat_AIP($prefixeTable, $main_plugin_object->getFileLocation()); |
---|
52 | } |
---|
53 | else |
---|
54 | { |
---|
55 | include(ESTAT_PATH."estat_aip_install.class.inc.php"); |
---|
56 | $plugin_aip = new EStat_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation()); |
---|
57 | } |
---|
58 | } |
---|
59 | else |
---|
60 | { |
---|
61 | /* |
---|
62 | * plugin was upgraded, but GPC was not |
---|
63 | * display a page to inform user to upgrade GPC |
---|
64 | */ |
---|
65 | include(ESTAT_PATH."estat_aip_release.class.inc.php"); |
---|
66 | $plugin_aip = new EStat_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation()); |
---|
67 | } |
---|
68 | |
---|
69 | $plugin_aip->manage(); |
---|
70 | |
---|
71 | ?> |
---|