1: | <?php |
2: | /** |
3: | * Protector |
4: | * |
5: | * You may not change or alter any portion of this comment or credits |
6: | * of supporting developers from this source code or any supporting source code |
7: | * which is considered copyrighted (c) material of the original comment or credit authors. |
8: | * This program is distributed in the hope that it will be useful, |
9: | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10: | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11: | * |
12: | * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) |
13: | * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
14: | * @package protector |
15: | * @since 2.4.0 |
16: | * @author trabis <lusopoemas@gmail.com> |
17: | */ |
18: | |
19: | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
20: | |
21: | /** |
22: | * Protector core preloads |
23: | * |
24: | * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) |
25: | * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
26: | * @author trabis <lusopoemas@gmail.com> |
27: | */ |
28: | class ProtectorCorePreload extends XoopsPreloadItem |
29: | { |
30: | /** |
31: | * @param $args |
32: | */ |
33: | public static function eventCoreIncludeCommonStart($args) |
34: | { |
35: | include XOOPS_TRUST_PATH . '/modules/protector/include/precheck.inc.php'; |
36: | } |
37: | |
38: | /** |
39: | * @param $args |
40: | */ |
41: | public static function eventCoreIncludeCommonEnd($args) |
42: | { |
43: | include XOOPS_TRUST_PATH . '/modules/protector/include/postcheck.inc.php'; |
44: | } |
45: | |
46: | /** |
47: | * @param $args |
48: | */ |
49: | public static function eventCoreClassDatabaseDatabasefactoryConnection($args) |
50: | { |
51: | if (defined('XOOPS_DB_ALTERNATIVE') && class_exists(XOOPS_DB_ALTERNATIVE)) { |
52: | $args[0] = XOOPS_DB_ALTERNATIVE; |
53: | } |
54: | } |
55: | } |
56: |