Completed
Push — master ( 99eb82...6dab8b )
by Michael
19s
created
xoops_trust_path/libs/altsys/mylangadmin.php 1 patch
Spacing   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -5,170 +5,170 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <http://www.peak.ne.jp/>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ;
9
-include_once __DIR__ . '/include/gtickets.php';
10
-include_once __DIR__.'/include/altsys_functions.php' ;
11
-include_once __DIR__.'/include/lang_functions.php' ;
12
-include_once __DIR__.'/class/D3LanguageManager.class.php' ;
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11
+include_once __DIR__.'/include/lang_functions.php';
12
+include_once __DIR__.'/class/D3LanguageManager.class.php';
13 13
 
14 14
 
15 15
 // only groups have 'module_admin' of 'altsys' can do that.
16
-$module_handler = xoops_getHandler('module') ;
17
-$module = $module_handler->getByDirname('altsys') ;
18
-if (! is_object($module)) {
19
-    die('install altsys') ;
16
+$module_handler = xoops_getHandler('module');
17
+$module = $module_handler->getByDirname('altsys');
18
+if (!is_object($module)) {
19
+    die('install altsys');
20 20
 }
21
-$moduleperm_handler = xoops_getHandler('groupperm') ;
22
-if (! is_object(@$xoopsUser) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) {
23
-    die('only admin of altsys can access this area') ;
21
+$moduleperm_handler = xoops_getHandler('groupperm');
22
+if (!is_object(@$xoopsUser) || !$moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) {
23
+    die('only admin of altsys can access this area');
24 24
 }
25 25
 
26 26
 
27 27
 // initials
28 28
 $db = XoopsDatabaseFactory::getDatabaseConnection();
29
-(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance() ;
30
-$langman = D3LanguageManager::getInstance() ;
29
+(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
30
+$langman = D3LanguageManager::getInstance();
31 31
 
32 32
 // language file of this controller
33
-altsys_include_language_file('mylangadmin') ;
33
+altsys_include_language_file('mylangadmin');
34 34
 
35 35
 // check $xoopsModule
36
-if (! is_object($xoopsModule)) {
37
-    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM) ;
36
+if (!is_object($xoopsModule)) {
37
+    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
38 38
 }
39 39
 
40 40
 // set target_module if specified by $_GET['dirname']
41 41
 $module_handler = xoops_getHandler('module');
42
-if (! empty($_GET['dirname'])) {
43
-    $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname']) ;
44
-    $target_module = $module_handler->getByDirname($dirname) ;
42
+if (!empty($_GET['dirname'])) {
43
+    $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname']);
44
+    $target_module = $module_handler->getByDirname($dirname);
45 45
 }
46 46
 
47
-if (! empty($target_module) && is_object($target_module)) {
47
+if (!empty($target_module) && is_object($target_module)) {
48 48
     // specified by dirname (for langadmin as an independent module)
49
-    $target_mid = $target_module->getVar('mid') ;
50
-    $target_dirname = $target_module->getVar('dirname') ;
51
-    $target_dirname4sql = addslashes($target_dirname) ;
52
-    $target_mname = $target_module->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0) ;
49
+    $target_mid = $target_module->getVar('mid');
50
+    $target_dirname = $target_module->getVar('dirname');
51
+    $target_dirname4sql = addslashes($target_dirname);
52
+    $target_mname = $target_module->getVar('name').'&nbsp;'.sprintf('(%2.2f)', $target_module->getVar('version') / 100.0);
53 53
     //$query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ;
54 54
 } else {
55 55
     // not specified by dirname (for 3rd party modules as mylangadmin)
56
-    $target_mid = $xoopsModule->getVar('mid') ;
57
-    $target_dirname = $xoopsModule->getVar('dirname') ;
58
-    $target_dirname4sql = addslashes($target_dirname) ;
59
-    $target_mname = $xoopsModule->getVar('name') ;
56
+    $target_mid = $xoopsModule->getVar('mid');
57
+    $target_dirname = $xoopsModule->getVar('dirname');
58
+    $target_dirname4sql = addslashes($target_dirname);
59
+    $target_mname = $xoopsModule->getVar('name');
60 60
     //$query4redirect = '' ;
61 61
 }
62 62
 
63 63
 // basic GET variables
64
-$target_lang = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['target_lang']) ;
64
+$target_lang = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['target_lang']);
65 65
 if (empty($target_lang)) {
66
-    $target_lang = $GLOBALS['xoopsConfig']['language'] ;
66
+    $target_lang = $GLOBALS['xoopsConfig']['language'];
67 67
 }
68
-$target_lang4sql = addslashes($target_lang) ;
69
-$target_file = preg_replace('/[^0-9a-zA-Z_.-]/', '', @$_GET['target_file']) ;
68
+$target_lang4sql = addslashes($target_lang);
69
+$target_file = preg_replace('/[^0-9a-zA-Z_.-]/', '', @$_GET['target_file']);
70 70
 if (empty($target_file)) {
71
-    $target_file = 'main.php' ;
71
+    $target_file = 'main.php';
72 72
 }
73 73
 
74 74
 // get $target_trustdirname
75
-$mytrustdirname = '' ;
75
+$mytrustdirname = '';
76 76
 if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php')) {
77
-    require XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php' ;
77
+    require XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php';
78 78
 }
79
-$target_trustdirname = $mytrustdirname ;
79
+$target_trustdirname = $mytrustdirname;
80 80
 
81 81
 // get base directory
82 82
 if (empty($target_trustdirname)) {
83 83
     // conventinal module
84
-    $base_dir = XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/language' ;
84
+    $base_dir = XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/language';
85 85
 } else {
86 86
     // D3 module
87
-    $base_dir = XOOPS_TRUST_PATH.'/modules/'.$target_trustdirname.'/language' ;
87
+    $base_dir = XOOPS_TRUST_PATH.'/modules/'.$target_trustdirname.'/language';
88 88
 }
89 89
 
90 90
 // make list of language and check $target_lang
91
-$languages = array() ;
92
-$languages4disp = array() ;
93
-if (! is_dir($base_dir)) {
94
-    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODNOLANGUAGE) ;
91
+$languages = array();
92
+$languages4disp = array();
93
+if (!is_dir($base_dir)) {
94
+    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODNOLANGUAGE);
95 95
 }
96
-$dh = opendir($base_dir) ;
96
+$dh = opendir($base_dir);
97 97
 if ($dh) {
98 98
     while ($file = readdir($dh)) {
99 99
         if (substr($file, 0, 1) == '.') {
100
-            continue ;
100
+            continue;
101 101
         }
102 102
         if (is_dir("$base_dir/$file")) {
103
-            list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='" . addslashes($file) . "'")) ;
104
-            $languages[] = $file ;
105
-            $languages4disp[] = $file . " ($count)" ;
103
+            list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='".addslashes($file)."'"));
104
+            $languages[] = $file;
105
+            $languages4disp[] = $file." ($count)";
106 106
         }
107 107
     }
108 108
 }
109
-closedir($dh) ;
110
-if (! in_array($target_lang, $languages)) {
111
-    $target_lang = $languages[0] ;
109
+closedir($dh);
110
+if (!in_array($target_lang, $languages)) {
111
+    $target_lang = $languages[0];
112 112
 }
113 113
 
114 114
 // get base directory seleced language
115
-$lang_base_dir = $base_dir.'/'.$target_lang ;
116
-if (! is_dir($lang_base_dir)) {
117
-    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODLANGINCOMPATIBLE) ;
115
+$lang_base_dir = $base_dir.'/'.$target_lang;
116
+if (!is_dir($lang_base_dir)) {
117
+    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODLANGINCOMPATIBLE);
118 118
 }
119 119
 
120 120
 // make list of files and check $target_file
121
-$lang_files = array() ;
122
-$dh = opendir($lang_base_dir) ;
121
+$lang_files = array();
122
+$dh = opendir($lang_base_dir);
123 123
 if ($dh) {
124 124
     while ($file = readdir($dh)) {
125 125
         if (substr($file, 0, 1) == '.') {
126
-            continue ;
126
+            continue;
127 127
         }
128 128
         if ($file == 'index.html') {
129
-            continue ;
129
+            continue;
130 130
         }
131 131
     //if( $file == 'modinfo.php' ) continue ; // TODO(?)
132 132
     //if( $file == 'global.php' ) continue ; // TODO(?)
133 133
     if (is_file("$lang_base_dir/$file")) {
134
-        $lang_files[] = $file ;
134
+        $lang_files[] = $file;
135 135
     }
136 136
     }
137 137
 }
138
-closedir($dh) ;
138
+closedir($dh);
139 139
 if (empty($lang_files)) {
140
-    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODEMPTYLANGDIR) ;
140
+    altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODEMPTYLANGDIR);
141 141
 }
142
-if (! in_array($target_file, $lang_files)) {
143
-    $target_file = $lang_files[0] ;
142
+if (!in_array($target_file, $lang_files)) {
143
+    $target_file = $lang_files[0];
144 144
 }
145 145
 
146 146
 // get unique path of language_file
147
-$langfile_unique_path = "$lang_base_dir/$target_file" ;
147
+$langfile_unique_path = "$lang_base_dir/$target_file";
148 148
 
149 149
 // get constants defined by the target_file
150
-list($langfile_names, $constpref, $already_read) = altsys_mylangadmin_get_constant_names($langfile_unique_path, $target_dirname) ;
150
+list($langfile_names, $constpref, $already_read) = altsys_mylangadmin_get_constant_names($langfile_unique_path, $target_dirname);
151 151
 
152 152
 // get user_values should be overridden
153
-$langfile_constants = array() ;
153
+$langfile_constants = array();
154 154
 foreach ($langfile_names as $name) {
155
-    list($value) = $db->fetchRow($db->query('SELECT value FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='$target_lang4sql' AND name='" . addslashes($name) . "'")) ;
156
-    $langfile_constants[ $name ] = $value ;
155
+    list($value) = $db->fetchRow($db->query('SELECT value FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='$target_lang4sql' AND name='".addslashes($name)."'"));
156
+    $langfile_constants[$name] = $value;
157 157
 }
158 158
 
159 159
 // constants defined in XOOPS_ROOT_PATH/my_language/(dirname)/...
160 160
 if ($langman->my_language) {
161
-    $mylang_unique_path = $langman->my_language.'/modules/'.$target_dirname.'/'.$target_lang.'/'.$target_file ;
162
-    $mylang_constants = array_map('htmlspecialchars', altsys_mylangadmin_get_constants_by_pcre($mylang_unique_path)) ;
161
+    $mylang_unique_path = $langman->my_language.'/modules/'.$target_dirname.'/'.$target_lang.'/'.$target_file;
162
+    $mylang_constants = array_map('htmlspecialchars', altsys_mylangadmin_get_constants_by_pcre($mylang_unique_path));
163 163
     foreach ($mylang_constants as $key => $val) {
164
-        if (! in_array($key, array_keys($langfile_constants))) {
165
-            $langfile_constants[ $key ] = null ;
166
-            define($key, _MYLANGADMIN_NOTE_ADDEDBYMYLANG) ;
164
+        if (!in_array($key, array_keys($langfile_constants))) {
165
+            $langfile_constants[$key] = null;
166
+            define($key, _MYLANGADMIN_NOTE_ADDEDBYMYLANG);
167 167
         }
168 168
     }
169 169
 } else {
170
-    $mylang_unique_path = '' ;
171
-    $mylang_constants = array() ;
170
+    $mylang_unique_path = '';
171
+    $mylang_constants = array();
172 172
 }
173 173
 
174 174
 
@@ -177,57 +177,57 @@  discard block
 block discarded – undo
177 177
 //
178 178
 
179 179
 // Update language table and cache file
180
-if (! empty($_POST['do_update'])) {
180
+if (!empty($_POST['do_update'])) {
181 181
     // Ticket Check
182
-    if (! $xoopsGTicket->check(true, 'altsys')) {
182
+    if (!$xoopsGTicket->check(true, 'altsys')) {
183 183
         redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
184 184
     }
185 185
 
186 186
     // read original file
187
-    $file_contents = file_get_contents($langfile_unique_path) ;
187
+    $file_contents = file_get_contents($langfile_unique_path);
188 188
 
189 189
     // insert fingerprint of langfile_unique_path
190
-    $langfile_fingerprint = '_MYLANGADMIN_'.md5($langfile_unique_path) ;
191
-    $file_contents = str_replace('<?php', "<?php\nif(!defined('$langfile_fingerprint'))define('$langfile_fingerprint',1);", $file_contents) ;
190
+    $langfile_fingerprint = '_MYLANGADMIN_'.md5($langfile_unique_path);
191
+    $file_contents = str_replace('<?php', "<?php\nif(!defined('$langfile_fingerprint'))define('$langfile_fingerprint',1);", $file_contents);
192 192
 
193 193
     // constants loop
194
-    $overrides_counter = 0 ;
194
+    $overrides_counter = 0;
195 195
     foreach (array_reverse($langfile_names) as $name) {
196
-        $user_value = $myts->stripSlashesGPC(@$_POST[$name]) ;
197
-        $db->query('DELETE FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='$target_lang4sql' AND name='" . addslashes($name) . "'") ;
196
+        $user_value = $myts->stripSlashesGPC(@$_POST[$name]);
197
+        $db->query('DELETE FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='$target_lang4sql' AND name='".addslashes($name)."'");
198 198
         if ($user_value !== '') {
199
-            $overrides_counter ++ ;
199
+            $overrides_counter++;
200 200
             // Update table
201
-            $db->query('INSERT INTO ' . $db->prefix('altsys_language_constants') . " (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','" . addslashes($name) . "','" . addslashes($user_value) . "')") ;
201
+            $db->query('INSERT INTO '.$db->prefix('altsys_language_constants')." (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','".addslashes($name)."','".addslashes($user_value)."')");
202 202
             // rewrite script for cache
203 203
             // comment-out the line of define()
204 204
             if (empty($constpref)) {
205
-                $from = '/.*define\s?\(\s*(["\'])'.preg_quote($name).'(\\1).*\;.*/' ;
205
+                $from = '/.*define\s?\(\s*(["\'])'.preg_quote($name).'(\\1).*\;.*/';
206 206
             } else {
207
-                $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])'.preg_quote(substr($name, strlen($constpref))).'(\\1).*\;.*/' ;
207
+                $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])'.preg_quote(substr($name, strlen($constpref))).'(\\1).*\;.*/';
208 208
             }
209
-            $to = '//$0'."\ndefine('".addslashes($name)."','".addslashes($user_value)."');" ;
210
-            $file_contents = preg_replace($from, $to, $file_contents) ;
209
+            $to = '//$0'."\ndefine('".addslashes($name)."','".addslashes($user_value)."');";
210
+            $file_contents = preg_replace($from, $to, $file_contents);
211 211
         }
212 212
     }
213 213
 
214 214
     // get the file name for caching
215
-    $cache_file_name = $langman->getCacheFileName($target_file, $target_dirname, $target_lang) ;
215
+    $cache_file_name = $langman->getCacheFileName($target_file, $target_dirname, $target_lang);
216 216
 
217 217
     // Create language cache file
218 218
     if ($overrides_counter > 0) {
219
-        $fp = fopen($cache_file_name, 'wb') ;
220
-        if (! $fp) {
221
-            die('Invalid Cache Directory. (Set XOOPS_TRUST_PATH/cache writable)') ;
219
+        $fp = fopen($cache_file_name, 'wb');
220
+        if (!$fp) {
221
+            die('Invalid Cache Directory. (Set XOOPS_TRUST_PATH/cache writable)');
222 222
         }
223
-        fwrite($fp, $file_contents) ;
224
-        fclose($fp) ;
223
+        fwrite($fp, $file_contents);
224
+        fclose($fp);
225 225
     } else {
226
-        unlink($cache_file_name) ;
226
+        unlink($cache_file_name);
227 227
     }
228 228
 
229
-    redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname='.$target_dirname.'&target_lang='.rawurlencode($target_lang).'&target_file='.rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED) ;
230
-    exit ;
229
+    redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname='.$target_dirname.'&target_lang='.rawurlencode($target_lang).'&target_file='.rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED);
230
+    exit;
231 231
 }
232 232
 
233 233
 
@@ -236,22 +236,22 @@  discard block
 block discarded – undo
236 236
 //
237 237
 
238 238
 // check cache file
239
-$cache_file_name = $langman->getCacheFileName($target_file, $target_dirname, $target_lang) ;
240
-$cache_file_mtime = file_exists($cache_file_name) ? filemtime($cache_file_name) : 0 ;
239
+$cache_file_name = $langman->getCacheFileName($target_file, $target_dirname, $target_lang);
240
+$cache_file_mtime = file_exists($cache_file_name) ? filemtime($cache_file_name) : 0;
241 241
 
242 242
 // check core version and generate message to enable D3LanguageManager
243 243
 if (altsys_get_core_type() == ALTSYS_CORE_TYPE_XCL21) {
244 244
     // XoopsCube Legacy without preload
245 245
     if (class_exists('AltsysLangMgr_LanguageManager')) {
246 246
         // the preload enabled
247
-        $notice4disp = _MYLANGADMIN_MSG_D3LANGMANENABLED ;
247
+        $notice4disp = _MYLANGADMIN_MSG_D3LANGMANENABLED;
248 248
     } else {
249 249
         // the preload disabled
250
-        $notice4disp = sprintf(_MYLANGADMIN_FMT_HOWTOENABLED3LANGMAN4XCL, 'SetupAltsysLangMgr.class.php', 'XOOPS_ROOT_PATH/preload') ;
250
+        $notice4disp = sprintf(_MYLANGADMIN_FMT_HOWTOENABLED3LANGMAN4XCL, 'SetupAltsysLangMgr.class.php', 'XOOPS_ROOT_PATH/preload');
251 251
     }
252 252
 } else {
253 253
     // X2 core etc.
254
-    $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2.'<br />' ;
254
+    $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2.'<br />';
255 255
     $notice4disp .= '
256 256
 		<h4>include/common.php</h4>
257 257
 		<pre>
@@ -275,20 +275,20 @@  discard block
 block discarded – undo
275 275
 //
276 276
 
277 277
 
278
-xoops_cp_header() ;
278
+xoops_cp_header();
279 279
 
280 280
 // mymenu
281
-altsys_include_mymenu() ;
281
+altsys_include_mymenu();
282 282
 
283 283
 // breadcrumbs
284
-$breadcrumbsObj = AltsysBreadcrumbs::getInstance() ;
284
+$breadcrumbsObj = AltsysBreadcrumbs::getInstance();
285 285
 if ($breadcrumbsObj->hasPaths()) {
286
-    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN) ;
287
-    $breadcrumbsObj->appendPath('', $target_mname) ;
286
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
287
+    $breadcrumbsObj->appendPath('', $target_mname);
288 288
 }
289 289
 
290
-require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ;
291
-$tpl = new D3Tpl() ;
290
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
291
+$tpl = new D3Tpl();
292 292
 $tpl->assign(array(
293 293
     'target_dirname' => $target_dirname,
294 294
     'target_mname' => $target_mname,
@@ -307,8 +307,8 @@  discard block
 block discarded – undo
307 307
     'notice' => $notice4disp,
308 308
     'already_read' => $already_read,
309 309
     'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys')
310
-)) ;
311
-$tpl->display('db:altsys_main_mylangadmin.html') ;
310
+));
311
+$tpl->display('db:altsys_main_mylangadmin.html');
312 312
 
313
-xoops_cp_footer() ;
314
-exit ;
313
+xoops_cp_footer();
314
+exit;
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mypreferences.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -5,33 +5,33 @@  discard block
 block discarded – undo
5 5
 //                     GIJOE <http://www.peak.ne.jp/>                        //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__.'/class/AltsysBreadcrumbs.class.php' ;
9
-include_once __DIR__.'/include/gtickets.php' ;
10
-include_once __DIR__.'/include/altsys_functions.php' ;
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // check access right (needs module_admin of this module)
13
-if (! is_object($xoopsUser) || ! is_object($xoopsModule) || ! $xoopsUser->isAdmin($xoopsModule->mid())) {
14
-    die('Access Denied') ;
13
+if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
14
+    die('Access Denied');
15 15
 }
16 16
 
17 17
 
18 18
 // initials
19 19
 $db = XoopsDatabaseFactory::getDatabaseConnection();
20
-(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance() ;
20
+(method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
21 21
 
22 22
 // language file
23
-altsys_include_language_file('mypreferences') ;
23
+altsys_include_language_file('mypreferences');
24 24
 
25 25
 
26
-$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']) ;
26
+$op = empty($_GET['op']) ? 'showmod' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['op']);
27 27
 
28 28
 if ($op == 'showmod') {
29 29
     $config_handler = xoops_getHandler('config');
30
-    $mod = $xoopsModule->mid() ;
30
+    $mod = $xoopsModule->mid();
31 31
     $config = $config_handler->getConfigs(new Criteria('conf_modid', $mod));
32 32
     $count = count($config);
33 33
     if ($count < 1) {
34
-        die('no configs') ;
34
+        die('no configs');
35 35
     }
36 36
     include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
37 37
     $form = new XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save');
@@ -39,30 +39,30 @@  discard block
 block discarded – undo
39 39
     $module = $module_handler->get($mod);
40 40
 
41 41
     // language
42
-    $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ;
42
+    $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
43 43
 
44 44
     // load modinfo.php if necessary (judged by a specific constant is defined)
45
-    if (! defined('_MYMENU_CONSTANT_IN_MODINFO') || ! defined(_MYMENU_CONSTANT_IN_MODINFO)) {
45
+    if (!defined('_MYMENU_CONSTANT_IN_MODINFO') || !defined(_MYMENU_CONSTANT_IN_MODINFO)) {
46 46
         if (file_exists("$mydirpath/language/$language/modinfo.php")) {
47 47
             // user customized language file
48
-            include_once "$mydirpath/language/$language/modinfo.php" ;
48
+            include_once "$mydirpath/language/$language/modinfo.php";
49 49
         } elseif (file_exists("$mytrustdirpath/language/$language/modinfo.php")) {
50 50
             // default language file
51
-            include_once "$mytrustdirpath/language/$language/modinfo.php" ;
51
+            include_once "$mytrustdirpath/language/$language/modinfo.php";
52 52
         } else {
53 53
             // fallback english
54
-            include_once "$mytrustdirpath/language/english/modinfo.php" ;
54
+            include_once "$mytrustdirpath/language/english/modinfo.php";
55 55
         }
56 56
     }
57 57
 
58 58
     // if has comments feature, need comment lang file
59
-    if ($module->getVar('hascomments') == 1 && ! defined('_CM_TITLE')) {
59
+    if ($module->getVar('hascomments') == 1 && !defined('_CM_TITLE')) {
60 60
         include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
61 61
     }
62 62
 
63 63
     // RMV-NOTIFY
64 64
     // if has notification feature, need notification lang file
65
-    if ($module->getVar('hasnotification') == 1 && ! defined('_NOT_NOTIFICATIONOPTIONS')) {
65
+    if ($module->getVar('hasnotification') == 1 && !defined('_NOT_NOTIFICATIONOPTIONS')) {
66 66
         include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
67 67
     }
68 68
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
         //  $form->addElement(new XoopsFormHidden('redirect', XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$module->getInfo('adminindex')));
73 73
     // }
74 74
     for ($i = 0; $i < $count; $i++) {
75
-        $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt')? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
75
+        $title_icon = ($config[$i]->getVar('conf_valuetype') === 'encrypt') ? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
76 76
         $title4tray = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title')).$title_icon.'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>'); // GIJ
77
-        $title = '' ; // GIJ
77
+        $title = ''; // GIJ
78 78
         switch ($config[$i]->getVar('conf_formtype')) {
79 79
         case 'textarea':
80 80
             (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
@@ -155,25 +155,25 @@  discard block
 block discarded – undo
155 155
             break;
156 156
         }
157 157
         $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id'));
158
-        $ele_tray = new XoopsFormElementTray($title4tray, '') ;
158
+        $ele_tray = new XoopsFormElementTray($title4tray, '');
159 159
         $ele_tray->addElement($ele);
160 160
         $ele_tray->addElement($hidden);
161
-        $form->addElement($ele_tray) ;
161
+        $form->addElement($ele_tray);
162 162
         unset($ele_tray, $ele, $hidden);
163 163
     }
164 164
     // $button_tray->addElement(new XoopsFormHidden('op', 'save'));
165
-    $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences') ;
165
+    $xoopsGTicket->addTicketXoopsFormElement($button_tray, __LINE__, 1800, 'mypreferences');
166 166
     $button_tray->addElement(new XoopsFormButton('', 'button', _GO, 'submit'));
167
-    $form->addElement($button_tray) ;
167
+    $form->addElement($button_tray);
168 168
     xoops_cp_header();
169 169
 
170 170
     // GIJ patch start
171
-    altsys_include_mymenu() ;
172
-    $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ;
171
+    altsys_include_mymenu();
172
+    $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
173 173
     if ($breadcrumbsObj->hasPaths()) {
174
-        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES) ;
174
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
175 175
     }
176
-    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getVar('name').' &nbsp; '._PREFERENCES."</h3>\n" ;
176
+    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getVar('name').' &nbsp; '._PREFERENCES."</h3>\n";
177 177
     // GIJ patch end
178 178
 
179 179
     $form->display();
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
     //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
186 186
     //  exit('Invalid referer');
187 187
     //}
188
-    if (! $xoopsGTicket->check(true, 'mypreferences')) {
188
+    if (!$xoopsGTicket->check(true, 'mypreferences')) {
189 189
         redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
190 190
     }
191
-    require_once XOOPS_ROOT_PATH.'/class/template.php' ;
191
+    require_once XOOPS_ROOT_PATH.'/class/template.php';
192 192
     $xoopsTpl = new XoopsTpl();
193 193
 //HACK by domifara for new XOOPS and XCL etc.
194 194
 //old xoops
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     if ($count > 0) {
210 210
         for ($i = 0; $i < $count; $i++) {
211 211
             $config = $config_handler->getConfig($conf_ids[$i]);
212
-            $new_value =& $_POST[$config->getVar('conf_name')];
212
+            $new_value = & $_POST[$config->getVar('conf_name')];
213 213
             if (is_array($new_value) || $new_value != $config->getVar('conf_value')) {
214 214
                 // if language has been changed
215 215
                 if (!$lang_updated && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'language') {
@@ -238,13 +238,13 @@  discard block
 block discarded – undo
238 238
                         // generate compiled files for the new theme
239 239
                         // block files only for now..
240 240
                         $tplfile_handler = xoops_getHandler('tplfile');
241
-                        $dtemplates =& $tplfile_handler->find('default', 'block');
241
+                        $dtemplates = & $tplfile_handler->find('default', 'block');
242 242
                         $dcount = count($dtemplates);
243 243
 
244 244
                         // need to do this to pass to xoops_template_touch function
245 245
                         $GLOBALS['xoopsConfig']['template_set'] = $newtplset;
246 246
 
247
-                        altsys_clear_templates_c() ;
247
+                        altsys_clear_templates_c();
248 248
 
249 249
 /*                      for ($i = 0; $i < $dcount; $i++) {
250 250
                             $found =& $tplfile_handler->find($newtplset, 'block', $dtemplates[$i]->getVar('tpl_refid'), null);
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
                 }
273 273
 
274 274
                 // add read permission for the start module to all groups
275
-                if (!$startmod_updated    && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') {
275
+                if (!$startmod_updated && $new_value != '--' && $config->getVar('conf_catid') == XOOPS_CONF && $config->getVar('conf_name') == 'startpage') {
276 276
                     $member_handler = xoops_getHandler('member');
277
-                    $groups =& $member_handler->getGroupList();
277
+                    $groups = & $member_handler->getGroupList();
278 278
                     $moduleperm_handler = xoops_getHandler('groupperm');
279 279
                     $module_handler = xoops_getHandler('module');
280 280
                     $module = $module_handler->getByDirname($new_value);
@@ -293,5 +293,5 @@  discard block
 block discarded – undo
293 293
         }
294 294
     }
295 295
 
296
-    redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED) ;
296
+    redirect_header('index.php?mode=admin&lib=altsys&page=mypreferences', 2, _MD_A_MYPREFERENCES_UPDATED);
297 297
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // notification handler for D3 modules
4 4
 
5
-require_once XOOPS_ROOT_PATH . '/include/notification_functions.php' ;
5
+require_once XOOPS_ROOT_PATH.'/include/notification_functions.php';
6 6
 
7 7
 class D3NotificationHandler
8 8
 {
@@ -10,59 +10,59 @@  discard block
 block discarded – undo
10 10
 //function &getInstance( $conn = null )
11 11
 public static function &getInstance($conn = null)
12 12
 {
13
-    static $instance ;
14
-    if (! isset($instance)) {
15
-        $instance = new D3NotificationHandler() ;
13
+    static $instance;
14
+    if (!isset($instance)) {
15
+        $instance = new D3NotificationHandler();
16 16
     }
17
-    return $instance ;
17
+    return $instance;
18 18
 }
19 19
 
20 20
 
21 21
     public function getMailTemplateDir($mydirname, $mytrustdirname = '')
22 22
     {
23
-        global $xoopsConfig ;
23
+        global $xoopsConfig;
24 24
 
25
-        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname ;
26
-        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname ;
27
-        $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'] ;
25
+        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname;
26
+        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname;
27
+        $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
28 28
 
29 29
         $search_paths = array(
30
-        "$mydirpath/language/$language/mail_template/" ,
31
-        "$mytrustdirpath/language/$language/mail_template/" ,
32
-        "$mydirpath/language/english/mail_template/" ,
30
+        "$mydirpath/language/$language/mail_template/",
31
+        "$mytrustdirpath/language/$language/mail_template/",
32
+        "$mydirpath/language/english/mail_template/",
33 33
         "$mytrustdirpath/language/english/mail_template/"
34
-    ) ;
34
+    );
35 35
 
36
-        $mail_template_dir = "$mytrustdirpath/language/english/mail_template/" ;
36
+        $mail_template_dir = "$mytrustdirpath/language/english/mail_template/";
37 37
         foreach ($search_paths as $path) {
38 38
             if (file_exists($path)) {
39
-                $mail_template_dir = $path ;
40
-                break ;
39
+                $mail_template_dir = $path;
40
+                break;
41 41
             }
42 42
         }
43 43
 
44
-        return $mail_template_dir ;
44
+        return $mail_template_dir;
45 45
     }
46 46
 
47 47
 
48
-    public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags=array(), $user_list=array(), $omit_user_id=null)
48
+    public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, $extra_tags = array(), $user_list = array(), $omit_user_id = null)
49 49
     {
50
-        $module_handler = xoops_getHandler('module') ;
51
-        $module = $module_handler->getByDirname($mydirname) ;
50
+        $module_handler = xoops_getHandler('module');
51
+        $module = $module_handler->getByDirname($mydirname);
52 52
 
53
-        $notification_handler = xoops_getHandler('notification') ;
54
-        $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname) ;
53
+        $notification_handler = xoops_getHandler('notification');
54
+        $mail_template_dir = $this->getMailTemplateDir($mydirname, $mytrustdirname);
55 55
 
56 56
     // calling a delegate before
57 57
     if (class_exists('XCube_DelegateUtils')) {
58
-        $force_return = false ;
59
-        XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname) ;
58
+        $force_return = false;
59
+        XCube_DelegateUtils::raiseEvent('D3NotificationHandler.Trigger', new XCube_Ref($category), new XCube_Ref($event), new XCube_Ref($item_id), new XCube_Ref($extra_tags), new XCube_Ref($module), new XCube_Ref($user_list), new XCube_Ref($omit_user_id), $module->getInfo('notification'), new XCube_Ref($force_return), new XCube_Ref($mail_template_dir), $mydirname, $mytrustdirname);
60 60
         if ($force_return) {
61
-            return ;
61
+            return;
62 62
         }
63 63
     }
64 64
 
65
-        $mid = $module->getVar('mid') ;
65
+        $mid = $module->getVar('mid');
66 66
 
67 67
     // Check if event is enabled
68 68
     $config_handler = xoops_getHandler('config');
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
         if (empty($mod_config['notification_enabled'])) {
71 71
             return false;
72 72
         }
73
-        $category_info =& notificationCategoryInfo($category, $mid);
74
-        $event_info =& notificationEventInfo($category, $event, $mid);
73
+        $category_info = & notificationCategoryInfo($category, $mid);
74
+        $event_info = & notificationEventInfo($category, $event, $mid);
75 75
         if (!in_array(notificationGenerateConfig($category_info, $event_info, 'option_name'), $mod_config['notification_events']) && empty($event_info['invisible'])) {
76 76
             return false;
77 77
         }
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
     $tags = array();
104 104
     // {X_ITEM_NAME} {X_ITEM_URL} {X_ITEM_TYPE} from lookup_func are disabled
105 105
     $tags['X_MODULE'] = $module->getVar('name', 'n');
106
-        $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
106
+        $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/';
107 107
         $tags['X_NOTIFY_CATEGORY'] = $category;
108 108
         $tags['X_NOTIFY_EVENT'] = $event;
109 109
 
110
-        $template = $event_info['mail_template'] . '.tpl';
110
+        $template = $event_info['mail_template'].'.tpl';
111 111
         $subject = $event_info['mail_subject'];
112 112
 
113 113
         if ($user_list) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 // user-specific tags
122 122
             //$tags['X_UNSUBSCRIBE_URL'] = 'TODO';
123 123
             // TODO: don't show unsubscribe link if it is 'one-time' ??
124
-            $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
124
+            $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php';
125 125
                 $tags = array_merge($tags, $extra_tags);
126 126
 
127 127
                 $notification->notifyUser($mail_template_dir, $template, $subject, $tags);
Please login to merge, or discard this patch.
html/preload/SetupAltsysLangMgr.class.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,8 +91,8 @@  discard block
 block discarded – undo
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') ;
95
-        $this->_loadLanguage('legacy', 'setting') ;
94
+        $this->_loadLanguage('legacy', 'global');
95
+        $this->_loadLanguage('legacy', 'setting');
96 96
 
97 97
         //
98 98
         // Now, if XOOPS_USE_MULTIBYTES isn't defined, set zero to it.
Please login to merge, or discard this patch.