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 | |
---|
22 | if (!defined('PHPWG_ROOT_PATH')) { |
---|
23 | die('Hacking attempt!'); |
---|
24 | } |
---|
25 | |
---|
26 | define('DM_PLUGIN_NAME', 'Database Migration'); |
---|
27 | define('DM_PLUGIN_ROOT', dirname(__FILE__)); |
---|
28 | define('DM_PLUGIN_LANG', DM_PLUGIN_ROOT . '/'); |
---|
29 | define('DM_TEMPLATE', DM_PLUGIN_ROOT . '/template'); |
---|
30 | define('DM_PLUGIN_BASE_URL', PHPWG_PLUGINS_PATH . basename(DM_PLUGIN_ROOT)); |
---|
31 | define('DM_CSS', DM_PLUGIN_BASE_URL . '/css'); |
---|
32 | define('DM_JS', DM_PLUGIN_BASE_URL . '/js'); |
---|
33 | |
---|
34 | include_once DM_PLUGIN_ROOT . "/include/config.class.php"; |
---|
35 | |
---|
36 | load_language('plugin.lang', DM_PLUGIN_LANG); |
---|
37 | |
---|
38 | $plugin_config = new dmConfig(DM_PLUGIN_ROOT, DM_PLUGIN_NAME); |
---|
39 | $plugin_config->load_config(); |
---|
40 | |
---|
41 | if (defined('IN_ADMIN')) { |
---|
42 | add_event_handler('get_admin_plugin_menu_links', array($plugin_config, 'plugin_admin_menu')); |
---|
43 | } |
---|
44 | |
---|
45 | set_plugin_data($plugin['id'], $plugin_config); |
---|
46 | ?> |
---|