1 | <?php |
---|
2 | /* ----------------------------------------------------------------------------- |
---|
3 | Plugin : LMT |
---|
4 | Author : Grum |
---|
5 | email : grum@piwigo.org |
---|
6 | website : http://photos.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 | global $prefixeTable; |
---|
17 | |
---|
18 | load_language('plugin.lang', LMT_PATH); |
---|
19 | |
---|
20 | $main_plugin_object = get_plugin_data($plugin_id); |
---|
21 | |
---|
22 | |
---|
23 | if(CommonPlugin::checkGPCRelease(LMT_GPC_NEEDED)) |
---|
24 | { |
---|
25 | $config=Array(); |
---|
26 | GPCCore::loadConfig('lmt', $config); |
---|
27 | |
---|
28 | |
---|
29 | if($config['installed']!=LMT_VERSION2) |
---|
30 | { |
---|
31 | /* the plugin was updated without being deactivated |
---|
32 | * deactivate + activate the plugin to process the database upgrade |
---|
33 | */ |
---|
34 | include(LMT_PATH."lmt_install.class.inc.php"); |
---|
35 | $obj=new LMT_Install($prefixeTable, dirname(__FILE__)); |
---|
36 | $obj->deactivate(); |
---|
37 | $obj->activate(); |
---|
38 | $template->delete_compiled_templates(); |
---|
39 | //$config['newInstall']='n'; |
---|
40 | } |
---|
41 | |
---|
42 | include(LMT_PATH."lmt_aip.class.inc.php"); |
---|
43 | $plugin_aip = new LMT_AIP($prefixeTable, $main_plugin_object->getFileLocation()); |
---|
44 | } |
---|
45 | else |
---|
46 | { |
---|
47 | /* |
---|
48 | * plugin was upgraded, but GPC was not |
---|
49 | * display a page to inform user to upgrade GPC |
---|
50 | */ |
---|
51 | include(LMT_PATH."lmt_aip_release.class.inc.php"); |
---|
52 | $plugin_aip = new LMT_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation()); |
---|
53 | } |
---|
54 | |
---|
55 | $plugin_aip->manage(); |
---|
56 | ?> |
---|