@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php'; |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_TRUST_PATH')) { |
|
4 | - die('set XOOPS_TRUST_PATH into mainfile.php') ; |
|
3 | +if (!defined('XOOPS_TRUST_PATH')) { |
|
4 | + die('set XOOPS_TRUST_PATH into mainfile.php'); |
|
5 | 5 | } |
6 | 6 | |
7 | -$mydirname = basename(dirname(__DIR__)) ; |
|
8 | -$mydirpath = dirname(__DIR__) ; |
|
7 | +$mydirname = basename(dirname(__DIR__)); |
|
8 | +$mydirpath = dirname(__DIR__); |
|
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | -$mytrustdirname = 'altsys' ; |
|
10 | +$mytrustdirname = 'altsys'; |
|
11 | 11 | |
12 | -require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php' ; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.php'; |
@@ -2,13 +2,13 @@ |
||
2 | 2 | if (!defined('XOOPS_ROOT_PATH')) { |
3 | 3 | exit(); |
4 | 4 | } |
5 | -$root =& XCube_Root::getSingleton(); |
|
5 | +$root = & XCube_Root::getSingleton(); |
|
6 | 6 | //admin page |
7 | 7 | if ($root->mController->_mStrategy) { |
8 | 8 | if (strtolower(get_class($root->mController->_mStrategy)) == strtolower('Legacy_AdminControllerStrategy')) { |
9 | - include_once __DIR__.'/include/altsys_functions.php' ; |
|
9 | + include_once __DIR__.'/include/altsys_functions.php'; |
|
10 | 10 | // language file (modinfo.php) |
11 | - altsys_include_language_file('modinfo') ; |
|
11 | + altsys_include_language_file('modinfo'); |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | // load altsys newly gticket class for other modules |
@@ -5,56 +5,56 @@ discard block |
||
5 | 5 | // GIJOE <http://www.peak.ne.jp/> // |
6 | 6 | // ------------------------------------------------------------------------- // |
7 | 7 | |
8 | -require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ; |
|
9 | -require_once __DIR__.'/include/gtickets.php' ; |
|
10 | -include_once __DIR__.'/include/altsys_functions.php' ; |
|
11 | -include_once __DIR__.'/include/mygrouppermform.php' ; |
|
12 | -include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; |
|
8 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
9 | +require_once __DIR__.'/include/gtickets.php'; |
|
10 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
11 | +include_once __DIR__.'/include/mygrouppermform.php'; |
|
12 | +include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
13 | 13 | |
14 | 14 | // language file |
15 | -altsys_include_language_file('myblocksadmin') ; |
|
15 | +altsys_include_language_file('myblocksadmin'); |
|
16 | 16 | |
17 | 17 | // fork by core types |
18 | 18 | switch (altsys_get_core_type()) { |
19 | 19 | case ALTSYS_CORE_TYPE_X22 : |
20 | - include_once __DIR__.'/class/MyBlocksAdminForX22.class.php' ; |
|
21 | - $myba =& MyBlocksAdminForX22::getInstance() ; |
|
22 | - break ; |
|
20 | + include_once __DIR__.'/class/MyBlocksAdminForX22.class.php'; |
|
21 | + $myba = & MyBlocksAdminForX22::getInstance(); |
|
22 | + break; |
|
23 | 23 | case ALTSYS_CORE_TYPE_X25 : |
24 | - include_once __DIR__.'/class/MyBlocksAdminForX25.class.php' ; |
|
25 | - $myba =& MyBlocksAdminForX25::getInstance() ; |
|
26 | - break ; |
|
24 | + include_once __DIR__.'/class/MyBlocksAdminForX25.class.php'; |
|
25 | + $myba = & MyBlocksAdminForX25::getInstance(); |
|
26 | + break; |
|
27 | 27 | case ALTSYS_CORE_TYPE_XCL21 : |
28 | - include_once __DIR__.'/class/MyBlocksAdminForXCL21.class.php' ; |
|
29 | - $myba =& MyBlocksAdminForXCL21::getInstance() ; |
|
30 | - break ; |
|
28 | + include_once __DIR__.'/class/MyBlocksAdminForXCL21.class.php'; |
|
29 | + $myba = & MyBlocksAdminForXCL21::getInstance(); |
|
30 | + break; |
|
31 | 31 | case ALTSYS_CORE_TYPE_ICMS : |
32 | - include_once __DIR__.'/class/MyBlocksAdminForICMS.class.php' ; |
|
33 | - $myba =& MyBlocksAdminForICMS::getInstance() ; |
|
34 | - break ; |
|
32 | + include_once __DIR__.'/class/MyBlocksAdminForICMS.class.php'; |
|
33 | + $myba = & MyBlocksAdminForICMS::getInstance(); |
|
34 | + break; |
|
35 | 35 | case ALTSYS_CORE_TYPE_X20S : |
36 | 36 | case ALTSYS_CORE_TYPE_X23P : |
37 | - include_once __DIR__.'/class/MyBlocksAdminForX20S.class.php' ; |
|
38 | - $myba =& MyBlocksAdminForX20S::getInstance() ; |
|
39 | - break ; |
|
37 | + include_once __DIR__.'/class/MyBlocksAdminForX20S.class.php'; |
|
38 | + $myba = & MyBlocksAdminForX20S::getInstance(); |
|
39 | + break; |
|
40 | 40 | default : |
41 | - include_once __DIR__.'/class/MyBlocksAdmin.class.php' ; |
|
42 | - $myba =& MyBlocksAdmin::getInstance() ; |
|
43 | - break ; |
|
41 | + include_once __DIR__.'/class/MyBlocksAdmin.class.php'; |
|
42 | + $myba = & MyBlocksAdmin::getInstance(); |
|
43 | + break; |
|
44 | 44 | } |
45 | 45 | // permission |
46 | -$myba->checkPermission() ; |
|
46 | +$myba->checkPermission(); |
|
47 | 47 | |
48 | 48 | // set parameters target_mid , target_dirname etc. |
49 | -$myba->init($xoopsModule) ; |
|
49 | +$myba->init($xoopsModule); |
|
50 | 50 | |
51 | 51 | |
52 | 52 | // |
53 | 53 | // transaction stage |
54 | 54 | // |
55 | 55 | |
56 | -if (! empty($_POST)) { |
|
57 | - $myba->processPost() ; |
|
56 | +if (!empty($_POST)) { |
|
57 | + $myba->processPost(); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | // |
63 | 63 | |
64 | 64 | // header |
65 | -xoops_cp_header() ; |
|
65 | +xoops_cp_header(); |
|
66 | 66 | |
67 | 67 | // mymenu |
68 | -altsys_include_mymenu() ; |
|
68 | +altsys_include_mymenu(); |
|
69 | 69 | |
70 | -$myba->processGet() ; |
|
70 | +$myba->processGet(); |
|
71 | 71 | |
72 | 72 | // footer |
73 | -xoops_cp_footer() ; |
|
73 | +xoops_cp_footer(); |
@@ -5,9 +5,9 @@ discard block |
||
5 | 5 | //$langman->read( 'modinfo.php' , 'altsys' , 'altsys' ) ; |
6 | 6 | |
7 | 7 | if (file_exists(__DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) { |
8 | - include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php' ; |
|
8 | + include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php'; |
|
9 | 9 | } elseif (file_exists(__DIR__.'/language/english/modinfo.php')) { |
10 | - include_once __DIR__.'/language/english/modinfo.php' ; |
|
10 | + include_once __DIR__.'/language/english/modinfo.php'; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | $controllers = array( |
@@ -20,4 +20,4 @@ discard block |
||
20 | 20 | 'mytplsform', |
21 | 21 | 'put_templates', |
22 | 22 | 'mylangadmin' |
23 | -) ; |
|
23 | +); |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__.'/MyBlocksAdmin.class.php' ; |
|
3 | +require_once __DIR__.'/MyBlocksAdmin.class.php'; |
|
4 | 4 | |
5 | 5 | class MyBlocksAdminForX20S extends MyBlocksAdmin |
6 | 6 | { |
7 | 7 | |
8 | - public $block_positions = array() ; |
|
8 | + public $block_positions = array(); |
|
9 | 9 | |
10 | 10 | public function MyBlocksAadminForX20S() |
11 | 11 | { |
@@ -14,20 +14,20 @@ discard block |
||
14 | 14 | |
15 | 15 | public function construct() |
16 | 16 | { |
17 | - parent::construct() ; |
|
17 | + parent::construct(); |
|
18 | 18 | |
19 | - @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php' ; |
|
19 | + @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php'; |
|
20 | 20 | $this->block_positions = array( |
21 | - -1 => _NONE , |
|
22 | - 0 => _AM_SBLEFT , |
|
23 | - 1 => _AM_SBRIGHT , |
|
24 | - 3 => _AM_CBLEFT , |
|
25 | - 4 => _AM_CBRIGHT , |
|
26 | - 5 => _AM_CBCENTER , |
|
27 | - 7 => _AM_CBBOTTOMLEFT , |
|
28 | - 8 => _AM_CBBOTTOMRIGHT , |
|
21 | + -1 => _NONE, |
|
22 | + 0 => _AM_SBLEFT, |
|
23 | + 1 => _AM_SBRIGHT, |
|
24 | + 3 => _AM_CBLEFT, |
|
25 | + 4 => _AM_CBRIGHT, |
|
26 | + 5 => _AM_CBCENTER, |
|
27 | + 7 => _AM_CBBOTTOMLEFT, |
|
28 | + 8 => _AM_CBBOTTOMRIGHT, |
|
29 | 29 | 9 => _AM_CBBOTTOM |
30 | - ) ; |
|
30 | + ); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | //HACK by domifara for php5.3+ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | static $instance; |
38 | 38 | if (!isset($instance)) { |
39 | 39 | $instance = new MyBlocksAdminForX20S(); |
40 | - $instance->construct() ; |
|
40 | + $instance->construct(); |
|
41 | 41 | } |
42 | 42 | return $instance; |
43 | 43 | } |
@@ -50,19 +50,19 @@ discard block |
||
50 | 50 | return " |
51 | 51 | <table style='width:80px;'> |
52 | 52 | <tr> |
53 | - <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data) . '</td> |
|
54 | - <td>' . $this->renderRadio4BlockPosition(3, $block_data) . '</td> |
|
55 | - <td>' . $this->renderRadio4BlockPosition(5, $block_data) . '</td> |
|
56 | - <td>' . $this->renderRadio4BlockPosition(4, $block_data) . "</td> |
|
57 | - <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data) . '</td> |
|
53 | + <td rowspan='2'>".$this->renderRadio4BlockPosition(0, $block_data).'</td> |
|
54 | + <td>' . $this->renderRadio4BlockPosition(3, $block_data).'</td> |
|
55 | + <td>' . $this->renderRadio4BlockPosition(5, $block_data).'</td> |
|
56 | + <td>' . $this->renderRadio4BlockPosition(4, $block_data)."</td> |
|
57 | + <td rowspan='2'>".$this->renderRadio4BlockPosition(1, $block_data).'</td> |
|
58 | 58 | </tr> |
59 | 59 | <tr> |
60 | - <td>' . $this->renderRadio4BlockPosition(7, $block_data) . '</td> |
|
61 | - <td>' . $this->renderRadio4BlockPosition(9, $block_data) . '</td> |
|
62 | - <td>' . $this->renderRadio4BlockPosition(8, $block_data) . "</td> |
|
60 | + <td>' . $this->renderRadio4BlockPosition(7, $block_data).'</td> |
|
61 | + <td>' . $this->renderRadio4BlockPosition(9, $block_data).'</td> |
|
62 | + <td>' . $this->renderRadio4BlockPosition(8, $block_data)."</td> |
|
63 | 63 | </tr> |
64 | 64 | <tr> |
65 | - <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE . '</td> |
|
65 | + <td colspan='5'>".$this->renderRadio4BlockPosition(-1, $block_data)._NONE.'</td> |
|
66 | 66 | </tr> |
67 | 67 | </table>'; |
68 | 68 | } |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | { |
74 | 74 | $bid = (int)$block_data['bid']; |
75 | 75 | $visible = (int)$block_data['visible']; |
76 | - $current_side = $visible ? (int)$block_data['side'] : -1 ; |
|
76 | + $current_side = $visible ? (int)$block_data['side'] : -1; |
|
77 | 77 | |
78 | - $label4disp = htmlspecialchars($this->block_positions[ $target_side ], ENT_QUOTES) ; |
|
78 | + $label4disp = htmlspecialchars($this->block_positions[$target_side], ENT_QUOTES); |
|
79 | 79 | |
80 | 80 | if ($current_side == $target_side) { |
81 | - $checked = "checked='checked'" ; |
|
81 | + $checked = "checked='checked'"; |
|
82 | 82 | $divstyle = $target_side == -1 ? 'disabled' : 'selected'; |
83 | 83 | } else { |
84 | 84 | $checked = ''; |
85 | 85 | $divstyle = 'unselected'; |
86 | 86 | } |
87 | 87 | |
88 | - return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>" ; |
|
88 | + return "<div class='blockposition $divstyle' title='$label4disp'><input type='radio' name='sides[$bid]' value='$target_side' class='blockposition' $checked /></div>"; |
|
89 | 89 | } |
90 | 90 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | { |
6 | 6 | $names = array(); |
7 | 7 | |
8 | - if (! class_exists('XCube_Delegate')) { |
|
8 | + if (!class_exists('XCube_Delegate')) { |
|
9 | 9 | return $names; |
10 | 10 | } |
11 | 11 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | foreach (array_keys($callbacks) as $priority) { |
24 | 24 | foreach (array_keys($callbacks[$priority]) as $idx) { |
25 | 25 | $callback = $callbacks[$priority][$idx][0]; |
26 | - $_name = (is_array($callback))? ((is_object($callback[0]))? get_class($callback[0]) : $callback[0]) : $callback; |
|
26 | + $_name = (is_array($callback)) ? ((is_object($callback[0])) ? get_class($callback[0]) : $callback[0]) : $callback; |
|
27 | 27 | $names[$priority] = $_name; |
28 | 28 | } |
29 | 29 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | return htmlspecialchars($str, $flags, $encoding, $double_encode); |
61 | 61 | } else { |
62 | 62 | $ret = htmlspecialchars($str, $flags, $encoding); |
63 | - if (! $double_encode) { |
|
63 | + if (!$double_encode) { |
|
64 | 64 | $ret = str_replace('&amp;', '&', $ret); |
65 | 65 | } |
66 | 66 | return $ret; |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | class AltsysBreadcrumbs |
5 | 5 | { |
6 | 6 | |
7 | - public $paths = array() ; |
|
7 | + public $paths = array(); |
|
8 | 8 | |
9 | 9 | public function __construct() |
10 | 10 | { |
@@ -13,29 +13,29 @@ discard block |
||
13 | 13 | //function &getInstance() |
14 | 14 | public static function &getInstance() |
15 | 15 | { |
16 | - static $instance ; |
|
17 | - if (! isset($instance)) { |
|
18 | - $instance = new AltsysBreadcrumbs() ; |
|
16 | + static $instance; |
|
17 | + if (!isset($instance)) { |
|
18 | + $instance = new AltsysBreadcrumbs(); |
|
19 | 19 | } |
20 | - return $instance ; |
|
20 | + return $instance; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function getXoopsBreadcrumbs() |
24 | 24 | { |
25 | - $ret = array() ; |
|
25 | + $ret = array(); |
|
26 | 26 | foreach ($this->paths as $val) { |
27 | 27 | // delayed language constant |
28 | 28 | if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) { |
29 | 29 | $ret[] = array( |
30 | - 'url' => $val['url'] , |
|
30 | + 'url' => $val['url'], |
|
31 | 31 | 'name' => constant($val['name']) |
32 | - ) ; |
|
32 | + ); |
|
33 | 33 | } else { |
34 | - $ret[] = $val ; |
|
34 | + $ret[] = $val; |
|
35 | 35 | } |
36 | 36 | } |
37 | - unset($ret[count($ret) - 1 ]['url']) ; |
|
38 | - return $ret ; |
|
37 | + unset($ret[count($ret) - 1]['url']); |
|
38 | + return $ret; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // all data should be escaped |
@@ -44,19 +44,19 @@ discard block |
||
44 | 44 | if (is_array($url_or_path)) { |
45 | 45 | if (empty($url_or_path['name'])) { |
46 | 46 | // multiple paths |
47 | - $this->paths = array_merge($this->paths, $url_or_path) ; |
|
47 | + $this->paths = array_merge($this->paths, $url_or_path); |
|
48 | 48 | } else { |
49 | 49 | // array format (just a path) |
50 | - $this->paths[] = $url_or_path ; |
|
50 | + $this->paths[] = $url_or_path; |
|
51 | 51 | } |
52 | 52 | } else { |
53 | 53 | // separate format |
54 | - $this->paths[] = array( 'url' => $url_or_path , 'name' => $name ) ; |
|
54 | + $this->paths[] = array('url' => $url_or_path, 'name' => $name); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | public function hasPaths() |
59 | 59 | { |
60 | - return ! empty($this->paths) ; |
|
60 | + return !empty($this->paths); |
|
61 | 61 | } |
62 | 62 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! defined('XOOPS_ROOT_PATH')) { |
|
4 | - exit ; |
|
3 | +if (!defined('XOOPS_ROOT_PATH')) { |
|
4 | + exit; |
|
5 | 5 | } |
6 | 6 | |
7 | -if (! defined('XOOPS_TRUST_PATH') || XOOPS_TRUST_PATH == '') { |
|
8 | - header('Location: '.XOOPS_URL.'/modules/altsys/setup_xoops_trust_path.php') ; |
|
9 | - exit ; |
|
7 | +if (!defined('XOOPS_TRUST_PATH') || XOOPS_TRUST_PATH == '') { |
|
8 | + header('Location: '.XOOPS_URL.'/modules/altsys/setup_xoops_trust_path.php'); |
|
9 | + exit; |
|
10 | 10 | } |
11 | 11 | |
12 | -define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH . '/my_language'); |
|
12 | +define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH.'/my_language'); |
|
13 | 13 | |
14 | 14 | |
15 | 15 | class SetupAltsysLangMgr extends XCube_ActionFilter |
@@ -26,23 +26,23 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | -require_once XOOPS_ROOT_PATH . '/core/XCube_LanguageManager.class.php'; |
|
30 | -require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_LanguageManager.class.php'; |
|
29 | +require_once XOOPS_ROOT_PATH.'/core/XCube_LanguageManager.class.php'; |
|
30 | +require_once XOOPS_ROOT_PATH.'/modules/legacy/kernel/Legacy_LanguageManager.class.php'; |
|
31 | 31 | |
32 | 32 | class AltsysLangMgr_LanguageManager extends Legacy_LanguageManager |
33 | 33 | { |
34 | - public $langman = null ; |
|
35 | - public $theme_lang_checked = false ; |
|
34 | + public $langman = null; |
|
35 | + public $theme_lang_checked = false; |
|
36 | 36 | |
37 | 37 | public function prepare() |
38 | 38 | { |
39 | - $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ; |
|
40 | - if (! file_exists($langmanpath)) { |
|
41 | - die('install the latest altsys') ; |
|
39 | + $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php'; |
|
40 | + if (!file_exists($langmanpath)) { |
|
41 | + die('install the latest altsys'); |
|
42 | 42 | } |
43 | - require_once($langmanpath) ; |
|
44 | - $this->langman =& D3LanguageManager::getInstance() ; |
|
45 | - $this->langman->language = $this->mLanguageName ; |
|
43 | + require_once($langmanpath); |
|
44 | + $this->langman = & D3LanguageManager::getInstance(); |
|
45 | + $this->langman->language = $this->mLanguageName; |
|
46 | 46 | |
47 | 47 | parent::prepare(); |
48 | 48 | } |
@@ -50,40 +50,40 @@ discard block |
||
50 | 50 | public function _loadLanguage($dirname, $fileBodyName) |
51 | 51 | { |
52 | 52 | // read/check once (selected_theme)/language/(lang).php |
53 | - if (! $this->theme_lang_checked) { |
|
54 | - $root =& XCube_Root::getSingleton() ; |
|
55 | - if (! empty($root->mContext->mXoopsConfig['theme_set'])) { |
|
56 | - $langdir = XOOPS_THEME_PATH.'/'.$root->mContext->mXoopsConfig['theme_set'].'/language' ; |
|
53 | + if (!$this->theme_lang_checked) { |
|
54 | + $root = & XCube_Root::getSingleton(); |
|
55 | + if (!empty($root->mContext->mXoopsConfig['theme_set'])) { |
|
56 | + $langdir = XOOPS_THEME_PATH.'/'.$root->mContext->mXoopsConfig['theme_set'].'/language'; |
|
57 | 57 | if (file_exists($langdir)) { |
58 | - $langfile = $langdir.'/'.$this->mLanguageName.'.php' ; |
|
59 | - $engfile = $langdir.'/english.php' ; |
|
58 | + $langfile = $langdir.'/'.$this->mLanguageName.'.php'; |
|
59 | + $engfile = $langdir.'/english.php'; |
|
60 | 60 | if (file_exists($langfile)) { |
61 | - require_once $langfile ; |
|
61 | + require_once $langfile; |
|
62 | 62 | } elseif (file_exists($engfile)) { |
63 | - require_once $engfile ; |
|
63 | + require_once $engfile; |
|
64 | 64 | } |
65 | 65 | } |
66 | - $this->theme_lang_checked = true ; |
|
66 | + $this->theme_lang_checked = true; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | 70 | // read normal |
71 | - $this->langman->read($fileBodyName.'.php', $dirname) ; |
|
71 | + $this->langman->read($fileBodyName.'.php', $dirname); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function loadPageTypeMessageCatalog($type) |
75 | 75 | { |
76 | 76 | // I dare not to use langman... |
77 | 77 | if (strpos($type, '.') === false && $this->langman->my_language) { |
78 | - $mylang_file = $this->langman->my_language.'/'.$this->mLanguageName.'/'.$type.'.php' ; |
|
78 | + $mylang_file = $this->langman->my_language.'/'.$this->mLanguageName.'/'.$type.'.php'; |
|
79 | 79 | if (file_exists($mylang_file)) { |
80 | - require_once $mylang_file ; |
|
80 | + require_once $mylang_file; |
|
81 | 81 | } |
82 | 82 | } |
83 | - $original_error_level = error_reporting() ; |
|
84 | - error_reporting($original_error_level & ~ E_NOTICE) ; |
|
83 | + $original_error_level = error_reporting(); |
|
84 | + error_reporting($original_error_level & ~ E_NOTICE); |
|
85 | 85 | parent::loadPageTypeMessageCatalog($type); |
86 | - error_reporting($original_error_level) ; |
|
86 | + error_reporting($original_error_level); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function loadGlobalMessageCatalog() |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /* if (!$this->_loadFile(XOOPS_ROOT_PATH . "/modules/legacy/language/" . $this->mLanguageName . "/global.php")) { |
92 | 92 | $this->_loadFile(XOOPS_ROOT_PATH . "/modules/legacy/language/english/global.php"); |
93 | 93 | } */ |
94 | - $this->_loadLanguage('legacy', 'global') ; |
|
94 | + $this->_loadLanguage('legacy', 'global'); |
|
95 | 95 | |
96 | 96 | // |
97 | 97 | // Now, if XOOPS_USE_MULTIBYTES isn't defined, set zero to it. |