source: extensions/user_tags/include/autoload.inc.php @ 20139

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

Fix issue with cache directory key in config parameters array.

File size: 2.0 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 version2 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
22global $__t4u_autoload;
23$__t4u_autoload['t4u_Ws'] = T4U_PLUGIN_ROOT . '/include/t4u_ws.class.php';
24$__t4u_autoload['t4u_Config'] = T4U_PLUGIN_ROOT . '/include/t4u_config.class.php';
25$__t4u_autoload['t4u_Content'] = T4U_PLUGIN_ROOT . '/include/t4u_content.class.php';
26
27
28if (function_exists('spl_autoload_register')) {
29  spl_autoload_register('t4u_autoload');
30} else {
31  function __autoload($name) {
32    t4u_autoload($name);
33  }
34}
35
36function t4u_autoload($name) {
37  global $__t4u_autoload;
38
39  if (!empty($__t4u_autoload[$name])) {
40    require_once $__t4u_autoload[$name];
41  }
42}
Note: See TracBrowser for help on using the repository browser.