source: extensions/GMaps/admin.php @ 32472

Last change on this file since 32472 was 15345, checked in by grum, 13 years ago

feature:2638 - Compatibility with Piwigo 2.4

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1<?php
2/* -----------------------------------------------------------------------------
3  Plugin     : GMaps
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
14if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
15
16
17
18global $prefixeTable, $template;
19
20load_language('plugin.lang', GMAPS_PATH);
21
22$main_plugin_object = get_plugin_data($plugin_id);
23
24
25if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED))
26{
27  $config=Array();
28  GPCCore::loadConfig('gmaps', $config);
29
30
31  if($config['installed']!=GMAPS_VERSION2)
32  {
33    /* the plugin was updated without being deactivated
34     * deactivate + activate the plugin to process the database upgrade
35     */
36    include(GMAPS_PATH."gmaps_install.class.inc.php");
37    $gmaps=new GMaps_Install($prefixeTable, dirname(__FILE__));
38    $gmaps->deactivate();
39    $gmaps->activate();
40    $template->delete_compiled_templates();
41    //$config['newInstall']='n';
42  }
43
44  include(GMAPS_PATH."gmaps_aip.class.inc.php");
45  $plugin_aip = new GMaps_AIP($prefixeTable, $main_plugin_object->getFileLocation());
46}
47else
48{
49  /*
50   * plugin was upgraded, but GPC was not
51   * display a page to inform user to upgrade GPC
52   */
53  include(GMAPS_PATH."gmaps_aip_release.class.inc.php");
54  $plugin_aip = new GMaps_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation());
55}
56
57
58
59
60$plugin_aip->manage();
61
62?>
Note: See TracBrowser for help on using the repository browser.