source: extensions/user_tags/init.php @ 32022

Last change on this file since 32022 was 20762, checked in by nikrou, 11 years ago

Fix issue that altering picture page content
Fix possible sql injections issues

File size: 2.2 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | User Tags  - a plugin for Piwigo                                      |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2010-2013 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('T4U_PLUGIN_ROOT', dirname(__FILE__));
27
28include_once T4U_PLUGIN_ROOT . "/include/constants.inc.php";
29include_once T4U_PLUGIN_ROOT . "/include/autoload.inc.php";
30
31$plugin_config = t4u_Config::getInstance();
32$plugin_config->load_config();
33
34if (defined('IN_ADMIN')) { 
35  add_event_handler('get_admin_plugin_menu_links', 
36                    't4u_Config::plugin_admin_menu'
37                    ); 
38  add_event_handler('get_popup_help_content', 
39                    't4u_Config::get_admin_help',
40                    EVENT_HANDLER_PRIORITY_NEUTRAL,
41                    2
42                    );
43} else {
44  include_once T4U_PLUGIN_ROOT . '/public.php';
45}
46
47set_plugin_data($plugin['id'], $plugin_config);
Note: See TracBrowser for help on using the repository browser.