source: extensions/lmt/admin.php @ 18780

Last change on this file since 18780 was 15341, checked in by grum, 12 years ago

feature:2641 - Compatibility with Piwigo 2.4

  • Property svn:executable set to *
File size: 1.5 KB
Line 
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
14if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
15
16global $prefixeTable;
17
18load_language('plugin.lang', LMT_PATH);
19
20$main_plugin_object = get_plugin_data($plugin_id);
21
22
23if(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}
45else
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?>
Note: See TracBrowser for help on using the repository browser.