1: <?php
2: /**
3: * XOOPS Editor usage guide
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 (http://www.gnu.org/licenses/gpl-2.0.html)
14: * @package class
15: * @subpackage editor
16: * @since 2.3.0
17: * @author Taiwen Jiang <phppp@users.sourceforge.net>
18: */
19: defined('XOOPS_ROOT_PATH') || exit('Restricted access');
20:
21: if (!function_exists('xoopseditor_get_rootpath')) {
22: /**
23: * @return string
24: */
25: function xoopseditor_get_rootpath()
26: {
27: return XOOPS_ROOT_PATH . '/class/xoopseditor';
28: }
29: }
30: if (defined('XOOPS_ROOT_PATH')) {
31: return true;
32: }
33:
34: $mainfile = dirname(dirname(__DIR__)) . '/mainfile.php';
35: if (DIRECTORY_SEPARATOR !== '/') {
36: $mainfile = str_replace(DIRECTORY_SEPARATOR, '/', $mainfile);
37: }
38: include $mainfile;
39:
40: return defined('XOOPS_ROOT_PATH');
41: