1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: use Xoops\Core\PreloadItem;
13:
14: /**
15: * Private Messages preloads
16: *
17: * @package Pm
18: * @author trabis <lusopoemas@gmail.com>
19: * @copyright 2011-2013 XOOPS Project (http://xoops.org)
20: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
21: * @link http://xoops.org
22: * @since 2.4.0
23: */
24: class PmPreload extends PreloadItem
25: {
26:
27: /**
28: * core.pmlite.start
29: *
30: * @param array $args
31: *
32: * @return void
33: */
34: public static function eventCorePmliteStart($args)
35: {
36: header("location: ./modules/pm/pmlite.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING']));
37: exit();
38: }
39:
40: /**
41: * core.readpmsg.start
42: *
43: * @param array $args
44: *
45: * @return void
46: */
47: public static function eventCoreReadpmsgStart($args)
48: {
49: header("location: ./modules/pm/readpmsg.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING']));
50: exit();
51: }
52:
53: /**
54: * core.viewpmsg.start
55: *
56: * @param array $args
57: *
58: * @return void
59: */
60: public static function eventCoreViewpmsgStart($args)
61: {
62: header("location: ./modules/pm/viewpmsg.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING']));
63: exit();
64: }
65:
66: /**
67: * core.Class.smarty.xoops_plugins.xoinboxcount
68: *
69: * @param array $args
70: *
71: * @return void
72: */
73: public static function eventCoreClassSmartyXoops_pluginsXoinboxcount($args)
74: {
75: $args[0] = Xoops::getInstance()->getModuleHandler('message', 'pm');
76: }
77:
78: /**
79: * system.blocks.system_blocks.usershow
80: *
81: * @param array $args
82: *
83: * @return void
84: */
85: public static function eventSystemBlocksSystem_blocksUsershow($args)
86: {
87: $args[0] = Xoops::getInstance()->getModuleHandler('message', 'pm');
88: }
89: }
90: