Completed
Push — master ( 6dab8b...b949bb )
by Michael
02:15 queued 11s
created
xoops_trust_path/libs/altsys/class/D3LanguageManager.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->language = preg_replace('/[^0-9a-zA-Z_-]/', '', @$GLOBALS['xoopsConfig']['language']);
31 31
 
32
-        $this->salt = mb_substr(md5(XOOPS_ROOT_PATH . XOOPS_DB_USER . XOOPS_DB_PREFIX), 0, 6);
32
+        $this->salt = mb_substr(md5(XOOPS_ROOT_PATH.XOOPS_DB_USER.XOOPS_DB_PREFIX), 0, 6);
33 33
 
34
-        $this->cache_path = XOOPS_TRUST_PATH . '/cache';
34
+        $this->cache_path = XOOPS_TRUST_PATH.'/cache';
35 35
 
36 36
         if (defined('ALTSYS_MYLANGUAGE_ROOT_PATH') && file_exists(ALTSYS_MYLANGUAGE_ROOT_PATH)) {
37 37
             $this->my_language = ALTSYS_MYLANGUAGE_ROOT_PATH;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function read($resource, $mydirname, $mytrustdirname = null, $read_once = true)
69 69
     {
70
-        $d3file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php';
70
+        $d3file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php';
71 71
 
72 72
         if (empty($mytrustdirname) && is_file($d3file)) {
73 73
             require $d3file;
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
 
80 80
         $cache_file = $this->getCacheFileName($resource, $mydirname);
81 81
 
82
-        $root_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->language . '/' . $resource;
82
+        $root_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->language.'/'.$resource;
83 83
 
84 84
         // language overriding by XOOPS_ROOT_PATH/my_language
85 85
 
86 86
         if ($this->my_language) {
87
-            $mylang_file = $this->my_language . '/modules/' . $mydirname . '/' . $this->language . '/' . $resource;
87
+            $mylang_file = $this->my_language.'/modules/'.$mydirname.'/'.$this->language.'/'.$resource;
88 88
 
89 89
             if (is_file($mylang_file)) {
90 90
                 require_once $mylang_file;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         if (empty($mytrustdirname)) {
99 99
             // conventional module
100 100
 
101
-            $default_file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/language/' . $this->default_language . '/' . $resource;
101
+            $default_file = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/language/'.$this->default_language.'/'.$resource;
102 102
 
103 103
             if (is_file($cache_file)) {
104 104
                 require_once $cache_file;
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
         } else {
113 113
             // D3 modules
114 114
 
115
-            $trust_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->language . '/' . $resource;
115
+            $trust_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->language.'/'.$resource;
116 116
 
117
-            $default_file = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname . '/language/' . $this->default_language . '/' . $resource;
117
+            $default_file = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname.'/language/'.$this->default_language.'/'.$resource;
118 118
 
119 119
             if (is_file($cache_file)) {
120 120
                 require_once $cache_file;
@@ -155,6 +155,6 @@  discard block
 block discarded – undo
155 155
             $language = $this->language;
156 156
         }
157 157
 
158
-        return $this->cache_path . '/' . $this->cache_prefix . '_' . $this->salt . '_' . $mydirname . '_' . $language . '_' . $resource;
158
+        return $this->cache_path.'/'.$this->cache_prefix.'_'.$this->salt.'_'.$mydirname.'_'.$language.'_'.$resource;
159 159
     }
160 160
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/SetupAltsysLangMgr.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@  discard block
 block discarded – undo
5 5
 }
6 6
 
7 7
 if (!defined('XOOPS_TRUST_PATH') || XOOPS_TRUST_PATH == '') {
8
-    header('Location: ' . XOOPS_URL . '/modules/altsys/setup_xoops_trust_path.php');
8
+    header('Location: '.XOOPS_URL.'/modules/altsys/setup_xoops_trust_path.php');
9 9
 
10 10
     exit;
11 11
 }
12 12
 
13
-define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH . '/my_language');
13
+define('ALTSYS_MYLANGUAGE_ROOT_PATH', XOOPS_ROOT_PATH.'/my_language');
14 14
 
15 15
 /**
16 16
  * Class SetupAltsysLangMgr
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     }
34 34
 }
35 35
 
36
-require_once XOOPS_ROOT_PATH . '/core/XCube_LanguageManager.class.php';
37
-require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_LanguageManager.class.php';
36
+require_once XOOPS_ROOT_PATH.'/core/XCube_LanguageManager.class.php';
37
+require_once XOOPS_ROOT_PATH.'/modules/legacy/kernel/Legacy_LanguageManager.class.php';
38 38
 
39 39
 /**
40 40
  * Class AltsysLangMgr_LanguageManager
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function prepare()
49 49
     {
50
-        $langmanpath = XOOPS_TRUST_PATH . '/libs/altsys/class/D3LanguageManager.class.php';
50
+        $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php';
51 51
 
52 52
         if (!is_file($langmanpath)) {
53 53
             die('install the latest altsys');
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
             $root = XCube_Root::getSingleton();
76 76
 
77 77
             if (!empty($root->mContext->mXoopsConfig['theme_set'])) {
78
-                $langdir = XOOPS_THEME_PATH . '/' . $root->mContext->mXoopsConfig['theme_set'] . '/language';
78
+                $langdir = XOOPS_THEME_PATH.'/'.$root->mContext->mXoopsConfig['theme_set'].'/language';
79 79
 
80 80
                 if (file_exists($langdir)) {
81
-                    $langfile = $langdir . '/' . $this->mLanguageName . '.php';
81
+                    $langfile = $langdir.'/'.$this->mLanguageName.'.php';
82 82
 
83
-                    $engfile = $langdir . '/english.php';
83
+                    $engfile = $langdir.'/english.php';
84 84
 
85 85
                     if (is_file($langfile)) {
86 86
                         require_once $langfile;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         // read normal
97 97
 
98
-        $this->langman->read($fileBodyName . '.php', $dirname);
98
+        $this->langman->read($fileBodyName.'.php', $dirname);
99 99
     }
100 100
 
101 101
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         // I dare not to use langman...
108 108
 
109 109
         if (false === mb_strpos($type, '.') && $this->langman->my_language) {
110
-            $mylang_file = $this->langman->my_language . '/' . $this->mLanguageName . '/' . $type . '.php';
110
+            $mylang_file = $this->langman->my_language.'/'.$this->mLanguageName.'/'.$type.'.php';
111 111
 
112 112
             if (is_file($mylang_file)) {
113 113
                 require_once $mylang_file;
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForXCL21.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // $Id: MyBlocksAdminForXCL21.class.php ,ver 0.0.7.1 2011/01/27 16:10:00 domifara Exp $
3 3
 
4
-require_once __DIR__ . '/MyBlocksAdmin.class.php';
4
+require_once __DIR__.'/MyBlocksAdmin.class.php';
5 5
 
6 6
 /**
7 7
  * Class MyBlocksAdminForXCL21
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function checkFck()
75 75
     {
76
-        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'));
76
+        return (!altsysUtils::isInstalledXclHtmleditor() && file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'));
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/MyBlocksAdminForX25.class.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/MyBlocksAdmin.class.php';
3
+require_once __DIR__.'/MyBlocksAdmin.class.php';
4 4
 
5 5
 /**
6 6
  * Class MyBlocksAdminForX25
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         parent::construct();
17 17
 
18
-        @include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $this->lang . '/admin/blocksadmin.php';
18
+        @include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$this->lang.'/admin/blocksadmin.php';
19 19
     }
20 20
 
21 21
     //HACK by domifara for php5.3+
@@ -114,59 +114,59 @@  discard block
 block discarded – undo
114 114
         <tr>
115 115
             <td rowspan='2'>
116 116
                 <div class='blockposition $scol0'>
117
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_LEFT . "' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_LEFT . ";' />
117
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' class='blockposition' $ssel0 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_LEFT.";' />
118 118
                 </div>
119
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
119
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
120 120
             </td>
121 121
             <td>
122 122
                 <div class='blockposition $scol3'>
123
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_LEFT . "' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_LEFT . ";' />
123
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' class='blockposition' $ssel3 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_LEFT.";' />
124 124
                 </div>
125 125
             </td>
126 126
             <td>
127 127
                 <div class='blockposition $scol5'>
128
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_CENTER . "' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_CENTER . ";' />
128
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' class='blockposition' $ssel5 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_CENTER.";' />
129 129
                 </div>
130 130
             </td>
131 131
             <td>
132 132
                 <div class='blockposition $scol4'>
133
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_RIGHT . "' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_RIGHT . ";' />
133
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' class='blockposition' $ssel4 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_RIGHT.";' />
134 134
                 </div>
135 135
             </td>
136 136
             <td rowspan='2'>
137
-                <div style='float:" . _GLOBAL_LEFT . ";'>-</div>
137
+                <div style='float:" . _GLOBAL_LEFT.";'>-</div>
138 138
                 <div class='blockposition $scol1'>
139
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_SIDEBLOCK_RIGHT . "' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_SIDEBLOCK_RIGHT . ";' />
139
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' class='blockposition' $ssel1 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_SIDEBLOCK_RIGHT.";' />
140 140
                 </div>
141 141
             </td>
142 142
         </tr>
143 143
         <tr>
144 144
             <td>
145 145
                 <div class='blockposition $scol7'>
146
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMLEFT . "' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMLEFT . ";' />
146
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."' class='blockposition' $ssel7 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMLEFT.";' />
147 147
                 </div>
148 148
             </td>
149 149
             <td>
150 150
                 <div class='blockposition $scol9'>
151
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOM . "' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOM . ";' />
151
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOM."' class='blockposition' $ssel9 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOM.";' />
152 152
                 </div>
153 153
             </td>
154 154
             <td>
155 155
                 <div class='blockposition $scol8'>
156
-                    <input type='radio' name='sides[$bid]' value='" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . "' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=" . XOOPS_CENTERBLOCK_BOTTOMRIGHT . ";' />
156
+                    <input type='radio' name='sides[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."' class='blockposition' $ssel8 onclick='document.getElementById(\"extra_side_$bid\").value=".XOOPS_CENTERBLOCK_BOTTOMRIGHT.";' />
157 157
                 </div>
158 158
 
159 159
             </td>
160 160
         </tr>
161 161
         <tr>
162 162
             <td colspan='5'>
163
-                <div style='float:" . _GLOBAL_LEFT . ";width:50px;' class='$stextbox'>
164
-                    <input type='text' name='extra_sides[$bid]' value='" . $value4extra_side . "' style='width:20px;' id='extra_side_$bid' />
163
+                <div style='float:" . _GLOBAL_LEFT.";width:50px;' class='$stextbox'>
164
+                    <input type='text' name='extra_sides[$bid]' value='".$value4extra_side."' style='width:20px;' id='extra_side_$bid' />
165 165
                 </div>
166 166
                 <div class='blockposition $scoln'>
167 167
                     <input type='radio' name='sides[$bid]' value='-1' class='blockposition' $sseln onclick='document.getElementById(\"extra_side_$bid\").value=-1;' />
168 168
                 </div>
169
-                <div style='float:" . _GLOBAL_LEFT . ";'>" . _NONE . '</div>
169
+                <div style='float:"._GLOBAL_LEFT.";'>"._NONE.'</div>
170 170
             </td>
171 171
         </tr>
172 172
     </table>
@@ -280,13 +280,13 @@  discard block
 block discarded – undo
280 280
 
281 281
         // display
282 282
 
283
-        require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
283
+        require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
284 284
 
285 285
         $tpl = new D3Tpl();
286 286
 
287 287
         //dhtml
288 288
 
289
-        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
289
+        include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
290 290
 
291 291
         if ('H' == $block_data['ctype'] || empty($block_data['ctype'])) {
292 292
             $editor_configs = [];
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 
316 316
             $rendered = $form->render();
317 317
 
318
-            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">' . str_replace(['<textarea', '</textarea><br />'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered) . '</div>';
318
+            $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">'.str_replace(['<textarea', '</textarea><br />'], ['</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'], $rendered).'</div>';
319 319
 
320 320
             $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
321 321
         }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                          'op' => $next_op,
331 331
                          'form_title' => $form_title,
332 332
                          'submit_button' => $button_value,
333
-                         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'),
333
+                         'common_fck_installed' => file_exists(XOOPS_ROOT_PATH.'/common/fckeditor/fckeditor.js'),
334 334
                          'gticket_hidden' => $GLOBALS['xoopsSecurity']->getTokenHTML('myblocksadmin'),
335 335
                      ]);
336 336
 
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
         $c_type = $block_data['ctype'];
418 418
 
419 419
         if ('H' == $c_type) {
420
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
420
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
421 421
         } elseif ('P' == $c_type) {
422 422
             ob_start();
423 423
 
@@ -427,17 +427,17 @@  discard block
 block discarded – undo
427 427
 
428 428
             ob_end_clean();
429 429
 
430
-            $ret = str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
430
+            $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
431 431
         } elseif ('S' == $c_type) {
432 432
             (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
433 433
 
434
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
434
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
435 435
 
436 436
             $ret = $myts->displayTarea($content, 1, 1);
437 437
         } else {
438 438
             (method_exists('MyTextSanitizer', 'sGetInstance') and $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
439 439
 
440
-            $content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $block->getVar('content', 'N'));
440
+            $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $block->getVar('content', 'N'));
441 441
 
442 442
             $ret = $myts->displayTarea($content, 1, 0);
443 443
         }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3NotificationHandler.class.php 1 patch
Spacing   +6 added lines, -6 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
 /**
8 8
  * Class D3NotificationHandler
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
     {
40 40
         global $xoopsConfig;
41 41
 
42
-        $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
42
+        $mydirpath = XOOPS_ROOT_PATH.'/modules/'.$mydirname;
43 43
 
44
-        $mytrustdirpath = XOOPS_TRUST_PATH . '/modules/' . $mytrustdirname;
44
+        $mytrustdirpath = XOOPS_TRUST_PATH.'/modules/'.$mytrustdirname;
45 45
 
46 46
         $language = empty($xoopsConfig['language']) ? 'english' : $xoopsConfig['language'];
47 47
 
@@ -177,13 +177,13 @@  discard block
 block discarded – undo
177 177
 
178 178
         $tags['X_MODULE'] = $module->getVar('name', 'n');
179 179
 
180
-        $tags['X_MODULE_URL'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/';
180
+        $tags['X_MODULE_URL'] = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/';
181 181
 
182 182
         $tags['X_NOTIFY_CATEGORY'] = $category;
183 183
 
184 184
         $tags['X_NOTIFY_EVENT'] = $event;
185 185
 
186
-        $template = $event_info['mail_template'] . '.tpl';
186
+        $template = $event_info['mail_template'].'.tpl';
187 187
 
188 188
         $subject = $event_info['mail_subject'];
189 189
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
                 // TODO: don't show unsubscribe link if it is 'one-time' ??
204 204
 
205
-                $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL . '/notifications.php';
205
+                $tags['X_UNSUBSCRIBE_URL'] = XOOPS_URL.'/notifications.php';
206 206
 
207 207
                 $tags = array_merge($tags, $extra_tags);
208 208
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/D3Tpl.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once XOOPS_ROOT_PATH . '/class/template.php';
4
-require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
3
+require_once XOOPS_ROOT_PATH.'/class/template.php';
4
+require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
5 5
 
6 6
 /**
7 7
  * Class D3Tpl
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         parent::__construct();
22 22
 
23 23
         if (in_array(altsys_get_core_type(), [ALTSYS_CORE_TYPE_X20S, ALTSYS_CORE_TYPE_X23P], true)) {
24
-            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH . '/libs/altsys/smarty_plugins');
24
+            array_unshift($this->plugins_dir, XOOPS_TRUST_PATH.'/libs/altsys/smarty_plugins');
25 25
         }
26 26
 
27 27
         // for RTL users
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/class/d3utilities.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $this->mydirname = $mydirname;
39 39
 
40
-        $this->table = $db->prefix($mydirname ? $mydirname . '_' . $table_body : $table_body);
40
+        $this->table = $db->prefix($mydirname ? $mydirname.'_'.$table_body : $table_body);
41 41
 
42 42
         $this->primary_key = $primary_key;
43 43
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function get_language_constant($name)
65 65
     {
66
-        return constant(mb_strtoupper('_MD_A_' . $this->dirname . '_' . $this->page_name . '_' . $name));
66
+        return constant(mb_strtoupper('_MD_A_'.$this->dirname.'_'.$this->page_name.'_'.$name));
67 67
     }
68 68
 
69 69
     /**
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
             case 'blob':
80 80
                 $length = empty($col['length']) ? 65535 : (int)$col['length'];
81 81
 
82
-                return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'";
82
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
83 83
             case 'char':
84 84
             case 'varchar':
85 85
             case 'string':
86 86
                 $length = empty($col['length']) ? 255 : (int)$col['length'];
87 87
 
88
-                return "`{$col['name']}`='" . addslashes(xoops_substr($value, 0, $length)) . "'";
88
+                return "`{$col['name']}`='".addslashes(xoops_substr($value, 0, $length))."'";
89 89
             case 'int':
90 90
             case 'integer':
91 91
                 $value = (int)$value;
@@ -123,21 +123,21 @@  discard block
 block discarded – undo
123 123
                 continue;
124 124
             }
125 125
 
126
-            $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col) . ',';
126
+            $set4sql .= $this->get_set4sql(@$_POST[$col['name']], $col).',';
127 127
         }
128 128
 
129 129
         if (!empty($set4sql)) {
130 130
             if ($id > 0) {
131 131
                 // UPDATE
132 132
 
133
-                $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key='" . addslashes($id) . "'");
133
+                $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key='".addslashes($id)."'");
134 134
 
135 135
                 return [$id, 'update'];
136 136
             }
137 137
 
138 138
             // INSERT
139 139
 
140
-            $db->queryF("INSERT INTO $this->table SET " . mb_substr($set4sql, 0, -1));
140
+            $db->queryF("INSERT INTO $this->table SET ".mb_substr($set4sql, 0, -1));
141 141
 
142 142
             return [$db->getInsertId(), 'insert'];
143 143
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $ret = [];
171 171
 
172 172
         foreach (array_keys($_POST[$column4key]) as $id) {
173
-            $id = (int)$id;    // primary_key should be 'integer'
173
+            $id = (int)$id; // primary_key should be 'integer'
174 174
 
175 175
             $set4sql = '';
176 176
 
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
                     continue;
184 184
                 }
185 185
 
186
-                $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col) . ',';
186
+                $set4sql .= $this->get_set4sql(@$_POST[$col['name']][$id], $col).',';
187 187
             }
188 188
 
189 189
             if (!empty($set4sql)) {
190 190
                 $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
191 191
 
192 192
                 if (1 == $db->getRowsNum($result)) {
193
-                    $db->queryF("UPDATE $this->table SET " . mb_substr($set4sql, 0, -1) . " WHERE $this->primary_key=$id");
193
+                    $db->queryF("UPDATE $this->table SET ".mb_substr($set4sql, 0, -1)." WHERE $this->primary_key=$id");
194 194
 
195 195
                     if (1 == $db->getAffectedRows()) {
196 196
                         $ret[$id] = $db->fetchArray($result);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $ret = [];
216 216
 
217 217
         foreach (array_keys($_POST['admin_main_checkboxes']) as $id) {
218
-            $id = (int)$id;    // primary_key should be 'integer'
218
+            $id = (int)$id; // primary_key should be 'integer'
219 219
 
220 220
             $result = $db->query("SELECT * FROM $this->table WHERE $this->primary_key=$id");
221 221
 
@@ -227,13 +227,13 @@  discard block
 block discarded – undo
227 227
                 if ($delete_comments) {
228 228
                     // remove comments
229 229
 
230
-                    $db->queryF('DELETE FROM ' . $db->prefix('xoopscomments') . " WHERE com_modid=$this->mid AND com_itemid=$id");
230
+                    $db->queryF('DELETE FROM '.$db->prefix('xoopscomments')." WHERE com_modid=$this->mid AND com_itemid=$id");
231 231
                 }
232 232
 
233 233
                 if ($delete_notifications) {
234 234
                     // remove notifications
235 235
 
236
-                    $db->queryF('DELETE FROM ' . $db->prefix('xoopsnotifications') . " WHERE not_modid=$this->mid AND not_itemid=$id");
236
+                    $db->queryF('DELETE FROM '.$db->prefix('xoopsnotifications')." WHERE not_modid=$this->mid AND not_itemid=$id");
237 237
                 }
238 238
             }
239 239
         }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                 default:
315 315
                     $size = empty($col['edit_size']) ? 32 : (int)$col['edit_size'];
316 316
                     $length = empty($col['length']) ? 255 : (int)$col['length'];
317
-                    $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='" . htmlspecialchars($col['default_value'], ENT_QUOTES) . "' />";
317
+                    $lines[$col['name']] = "<input type='text' name='{$col['name']}' size='$size' maxlength='$length' value='".htmlspecialchars($col['default_value'], ENT_QUOTES)."' />";
318 318
                     break;
319 319
                 case false:
320 320
                     $lines[$col['name']] = htmlspecialchars($col['default_value'], ENT_QUOTES);
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             <form action='' method='get' name='admin_control' id='admin_control'>
355 355
                 $hiddens
356 356
                 $controllers_html
357
-                <input type='submit' value='" . _SUBMIT . "' />
357
+                <input type='submit' value='"._SUBMIT."' />
358 358
             </form>\n";
359 359
     }
360 360
 
@@ -367,12 +367,12 @@  discard block
 block discarded – undo
367 367
 
368 368
     public function get_select($name, $options, $current_value)
369 369
     {
370
-        $ret = "<select name='" . htmlspecialchars($name, ENT_QUOTES) . "'>\n";
370
+        $ret = "<select name='".htmlspecialchars($name, ENT_QUOTES)."'>\n";
371 371
 
372 372
         foreach ($options as $key => $val) {
373 373
             $selected = $val == $current_value ? "selected='selected'" : '';
374 374
 
375
-            $ret .= "<option value='" . htmlspecialchars($key, ENT_QUOTES) . "' $selected>" . htmlspecialchars($val, ENT_QUOTES) . "</option>\n";
375
+            $ret .= "<option value='".htmlspecialchars($key, ENT_QUOTES)."' $selected>".htmlspecialchars($val, ENT_QUOTES)."</option>\n";
376 376
         }
377 377
 
378 378
         $ret .= "</select>\n";
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/oninstall.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-eval(' function xoops_module_install_' . $mydirname . '( $module ) { return altsys_oninstall_base( $module , "' . $mydirname . '" ) ; } ');
3
+eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , "'.$mydirname.'" ) ; } ');
4 4
 
5 5
 if (!function_exists('altsys_oninstall_base')) {
6 6
     /**
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if (defined('XOOPS_CUBE_LEGACY')) {
21 21
             $root = XCube_Root::getSingleton();
22 22
 
23
-            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_oninstall');
23
+            $root->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.'.ucfirst($mydirname).'.Success', 'altsys_message_append_oninstall');
24 24
 
25 25
             $ret = [];
26 26
         } else {
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 
38 38
         // set weight=0
39 39
 
40
-        $db->queryF('UPDATE ' . $db->prefix('modules') . " SET weight=0 WHERE mid=$mid");
40
+        $db->queryF('UPDATE '.$db->prefix('modules')." SET weight=0 WHERE mid=$mid");
41 41
 
42 42
         /*************** END ALTSYS SPECIFIC PART ******************/
43 43
 
44 44
         // TABLES (loading mysql.sql)
45 45
 
46
-        $sql_file_path = __DIR__ . '/sql/mysql.sql';
46
+        $sql_file_path = __DIR__.'/sql/mysql.sql';
47 47
 
48
-        $prefix_mod = $db->prefix() . '_' . $mydirname;
48
+        $prefix_mod = $db->prefix().'_'.$mydirname;
49 49
 
50 50
         if (file_exists($sql_file_path)) {
51
-            $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5) . '</b>.<br /> Creating tables...';
51
+            $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5).'</b>.<br /> Creating tables...';
52 52
 
53
-            if (is_file(XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php')) {
54
-                include_once XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php';
53
+            if (is_file(XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php')) {
54
+                include_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php';
55 55
 
56 56
                 $sqlutil = new OldSqlUtility();
57 57
             } else {
58
-                include_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php';
58
+                include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
59 59
 
60 60
                 $sqlutil = new SqlUtility();
61 61
             }
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
                 $prefixed_query = $sqlutil->prefixQuery($piece, $prefix_mod);
71 71
 
72 72
                 if (!$prefixed_query) {
73
-                    $ret[] = 'Invalid SQL <b>' . htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5) . '</b><br />';
73
+                    $ret[] = 'Invalid SQL <b>'.htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5).'</b><br />';
74 74
 
75 75
                     return false;
76 76
                 }
77 77
 
78 78
                 if (!$db->query($prefixed_query[0])) {
79
-                    $ret[] = '<b>' . htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5) . '</b><br />';
79
+                    $ret[] = '<b>'.htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5).'</b><br />';
80 80
 
81 81
                     //var_dump( $db->error() ) ;
82 82
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
                 }
85 85
 
86 86
                 if (!in_array($prefixed_query[4], $created_tables, true)) {
87
-                    $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b> created.<br />';
87
+                    $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b> created.<br />';
88 88
 
89 89
                     $created_tables[] = $prefixed_query[4];
90 90
                 } else {
91
-                    $ret[] = 'Data inserted to table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b>.</br />';
91
+                    $ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b>.</br />';
92 92
                 }
93 93
             }
94 94
         }
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
 
98 98
         $tplfile_handler = xoops_getHandler('tplfile');
99 99
 
100
-        $tpl_path = __DIR__ . '/templates';
100
+        $tpl_path = __DIR__.'/templates';
101 101
 
102
-        if ($handler = @opendir($tpl_path . '/')) {
102
+        if ($handler = @opendir($tpl_path.'/')) {
103 103
             while (false !== ($file = readdir($handler))) {
104 104
                 if ('.' == mb_substr($file, 0, 1)) {
105 105
                     continue;
106 106
                 }
107 107
 
108
-                $file_path = $tpl_path . '/' . $file;
108
+                $file_path = $tpl_path.'/'.$file;
109 109
 
110 110
                 if (is_file($file_path)) {
111 111
                     $mtime = (int)(@filemtime($file_path));
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
                     $tplfile->setVar('tpl_tplset', 'default');
120 120
 
121
-                    $tplfile->setVar('tpl_file', $mydirname . '_' . $file);
121
+                    $tplfile->setVar('tpl_file', $mydirname.'_'.$file);
122 122
 
123 123
                     $tplfile->setVar('tpl_desc', '', true);
124 124
 
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
                     $tplfile->setVar('tpl_type', 'module');
132 132
 
133 133
                     if (!$tplfile_handler->insert($tplfile)) {
134
-                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span><br />';
134
+                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span><br />';
135 135
                     } else {
136 136
                         $tplid = $tplfile->getVar('tpl_id');
137 137
 
138
-                        $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br />';
138
+                        $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />';
139 139
 
140
-                        require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
140
+                        require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
141 141
 
142 142
                         altsys_clear_templates_c();
143 143
 
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
             closedir($handler);
157 157
         }
158 158
 
159
-        include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
159
+        include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
160 160
 
161
-        include_once XOOPS_ROOT_PATH . '/class/template.php';
161
+        include_once XOOPS_ROOT_PATH.'/class/template.php';
162 162
 
163 163
         xoops_template_clear_module_cache($mid);
164 164
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenu.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // language files (modinfo.php)
21 21
 altsys_include_language_file('modinfo');
22 22
 
23
-include __DIR__ . '/admin_menu.php';
23
+include __DIR__.'/admin_menu.php';
24 24
 
25 25
 $adminmenu = array_merge($adminmenu, $adminmenu4altsys);
26 26
 
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 // link conversion from relative to absolute
58 58
 foreach (array_keys($adminmenu) as $i) {
59 59
     if (false === mb_stristr($adminmenu[$i]['link'], XOOPS_URL)) {
60
-        $adminmenu[$i]['link'] = XOOPS_URL . "/modules/$mydirname/" . $adminmenu[$i]['link'];
60
+        $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/".$adminmenu[$i]['link'];
61 61
     }
62 62
 }
63 63
 
64 64
 // display
65
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
65
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
66 66
 $tpl = new D3Tpl();
67 67
 $tpl->assign([
68 68
                  'adminmenu' => $adminmenu,
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
 
72 72
 // submenu
73 73
 $page = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['page']);
74
-if (file_exists(__DIR__ . '/mymenusub/' . $page . '.php')) {
75
-    include __DIR__ . '/mymenusub/' . $page . '.php';
74
+if (file_exists(__DIR__.'/mymenusub/'.$page.'.php')) {
75
+    include __DIR__.'/mymenusub/'.$page.'.php';
76 76
 }
Please login to merge, or discard this patch.