source: extensions/database_migration/init.php @ 27153

Last change on this file since 27153 was 6222, checked in by nikrou, 14 years ago

Database migration plugin : first public version

File size: 2.2 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | database_migration - a plugin for Piwigo                              |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
6// +-----------------------------------------------------------------------+
7// | This program is free software; you can redistribute it and/or modify  |
8// | it under the terms of the GNU General Public License version 2 as     |
9// | published by the Free Software Foundation                             |
10// |                                                                       |
11// | This program is distributed in the hope that it will be useful, but   |
12// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
13// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
14// | General Public License for more details.                              |
15// |                                                                       |
16// | You should have received a copy of the GNU General Public License     |
17// | along with this program; if not, write to the Free Software           |
18// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
19// | MA 02110-1301 USA                                                     |
20// +-----------------------------------------------------------------------+
21
22if (!defined('PHPWG_ROOT_PATH')) {
23  die('Hacking attempt!');
24}
25
26define('DM_PLUGIN_NAME', 'Database Migration');
27define('DM_PLUGIN_ROOT', dirname(__FILE__));
28define('DM_PLUGIN_LANG', DM_PLUGIN_ROOT . '/');
29define('DM_TEMPLATE', DM_PLUGIN_ROOT . '/template');
30define('DM_PLUGIN_BASE_URL', PHPWG_PLUGINS_PATH . basename(DM_PLUGIN_ROOT));
31define('DM_CSS', DM_PLUGIN_BASE_URL . '/css');
32define('DM_JS', DM_PLUGIN_BASE_URL . '/js');
33
34include_once DM_PLUGIN_ROOT . "/include/config.class.php";
35
36load_language('plugin.lang', DM_PLUGIN_LANG);
37
38$plugin_config = new dmConfig(DM_PLUGIN_ROOT, DM_PLUGIN_NAME);
39$plugin_config->load_config();
40
41if (defined('IN_ADMIN')) { 
42  add_event_handler('get_admin_plugin_menu_links', array($plugin_config, 'plugin_admin_menu')); 
43}
44
45set_plugin_data($plugin['id'], $plugin_config);
46?>
Note: See TracBrowser for help on using the repository browser.