Completed
Branch master (5c4e1a)
by Michael
46s
created
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.
xoops_trust_path/libs/altsys/mytplsform.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -184,16 +184,16 @@
 block discarded – undo
184 184
     }
185 185
 
186 186
     $sql = 'INSERT INTO '
187
-           . $db->prefix('tplfile')
188
-           . " SET tpl_file='"
189
-           . addslashes(($_POST['tpl_file']))
190
-           . "',tpl_refid=0,tpl_module='"
191
-           . addslashes($tpl['tpl_module'])
192
-           . "',tpl_tplset='"
193
-           . addslashes($tpl['tpl_tplset'])
194
-           . "',tpl_lastmodified=UNIX_TIMESTAMP(),tpl_type='"
195
-           . addslashes($tpl['tpl_type'])
196
-           . "'";
187
+            . $db->prefix('tplfile')
188
+            . " SET tpl_file='"
189
+            . addslashes(($_POST['tpl_file']))
190
+            . "',tpl_refid=0,tpl_module='"
191
+            . addslashes($tpl['tpl_module'])
192
+            . "',tpl_tplset='"
193
+            . addslashes($tpl['tpl_tplset'])
194
+            . "',tpl_lastmodified=UNIX_TIMESTAMP(),tpl_type='"
195
+            . addslashes($tpl['tpl_type'])
196
+            . "'";
197 197
 
198 198
     if (!$db->query($sql)) {
199 199
         die('SQL Error' . __LINE__);
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <https://www.peak.ne.jp>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
11
-require_once __DIR__ . '/include/tpls_functions.php';
12
-require_once __DIR__ . '/include/Text_Diff.php';
13
-require_once __DIR__ . '/include/Text_Diff_Renderer.php';
14
-require_once __DIR__ . '/include/Text_Diff_Renderer_unified.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11
+require_once __DIR__.'/include/tpls_functions.php';
12
+require_once __DIR__.'/include/Text_Diff.php';
13
+require_once __DIR__.'/include/Text_Diff_Renderer.php';
14
+require_once __DIR__.'/include/Text_Diff_Renderer_unified.php';
15 15
 
16 16
 // only groups have 'module_admin' of 'altsys' can do that.
17 17
 $moduleHandler = xoops_getHandler('module');
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 // check $xoopsModule
35 35
 if (!is_object($xoopsModule)) {
36
-    redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
36
+    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
37 37
 }
38 38
 
39 39
 // check access right (needs system_admin of tplset)
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         'tpl_refid' => 0,
58 58
         'tpl_module' => '_custom',
59 59
         'tpl_tplset' => $tpl_tplset,
60
-        'tpl_file' => '_custom_' . mb_substr(date('YmdHis'), 2, -2) . '.html',
60
+        'tpl_file' => '_custom_'.mb_substr(date('YmdHis'), 2, -2).'.html',
61 61
         'tpl_desc' => '',
62 62
         'tpl_lastmodified' => 0,
63 63
         'tpl_lastimported' => 0,
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
     $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
71 71
 
72
-    $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', '_MI_ALTSYS_MENU_MYTPLSADMIN');
72
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', '_MI_ALTSYS_MENU_MYTPLSADMIN');
73 73
 
74
-    $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname=_custom', _MYTPLSADMIN_CUSTOMTEMPLATE);
74
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname=_custom', _MYTPLSADMIN_CUSTOMTEMPLATE);
75 75
 
76 76
     $breadcrumbsObj->appendPath('', '_MYTPLSADMIN_CREATENEWCUSTOMTEMPLATE');
77 77
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     // get information from tplfile table
91 91
 
92
-    $sql = 'SELECT * FROM ' . $db->prefix('tplfile') . ' f NATURAL LEFT JOIN ' . $db->prefix('tplsource') . " s WHERE f.tpl_file='$tpl_file4sql' ORDER BY f.tpl_tplset='$tpl_tplset4sql' DESC,f.tpl_tplset='default' DESC";
92
+    $sql = 'SELECT * FROM '.$db->prefix('tplfile').' f NATURAL LEFT JOIN '.$db->prefix('tplsource')." s WHERE f.tpl_file='$tpl_file4sql' ORDER BY f.tpl_tplset='$tpl_tplset4sql' DESC,f.tpl_tplset='default' DESC";
93 93
 
94 94
     $tpl = $db->fetchArray($db->query($sql));
95 95
 
@@ -114,19 +114,19 @@  discard block
 block discarded – undo
114 114
     if ('altsys' != $mydirname && is_object($target_module)) {
115 115
         // mytplsform in each modules
116 116
 
117
-        $mod_url = XOOPS_URL . '/modules/' . $target_module->getVar('dirname');
117
+        $mod_url = XOOPS_URL.'/modules/'.$target_module->getVar('dirname');
118 118
 
119 119
         $modinfo = $target_module->getInfo();
120 120
 
121
-        $breadcrumbsObj->appendPath($mod_url . '/' . @$modinfo['adminindex'], $target_mname);
121
+        $breadcrumbsObj->appendPath($mod_url.'/'.@$modinfo['adminindex'], $target_mname);
122 122
 
123
-        $breadcrumbsObj->appendPath($mod_url . '/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', _MD_A_MYTPLSFORM_TPLSADMIN);
123
+        $breadcrumbsObj->appendPath($mod_url.'/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', _MD_A_MYTPLSFORM_TPLSADMIN);
124 124
     } else {
125 125
         // mytplsform in altsys
126 126
 
127
-        $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', '_MI_ALTSYS_MENU_MYTPLSADMIN');
127
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', '_MI_ALTSYS_MENU_MYTPLSADMIN');
128 128
 
129
-        $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname=' . htmlspecialchars($tpl['tpl_module'], ENT_QUOTES | ENT_HTML5), $target_mname);
129
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname='.htmlspecialchars($tpl['tpl_module'], ENT_QUOTES | ENT_HTML5), $target_mname);
130 130
     }
131 131
 
132 132
     $breadcrumbsObj->appendPath('', _MD_A_MYTPLSFORM_EDIT);
@@ -148,19 +148,19 @@  discard block
 block discarded – undo
148 148
     // Ticket Check
149 149
 
150 150
     if (!$xoopsGTicket->check(true, 'altsys_tplsform')) {
151
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
151
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
152 152
     }
153 153
 
154
-    $result = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_file='$tpl_file4sql' AND tpl_tplset='" . addslashes($tpl['tpl_tplset']) . "'");
154
+    $result = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_file='$tpl_file4sql' AND tpl_tplset='".addslashes($tpl['tpl_tplset'])."'");
155 155
 
156 156
     while ([$tpl_id] = $db->fetchRow($result)) {
157
-        $sql = 'UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes(($_POST['tpl_source'])) . "' WHERE tpl_id=$tpl_id";
157
+        $sql = 'UPDATE '.$db->prefix('tplsource')." SET tpl_source='".addslashes(($_POST['tpl_source']))."' WHERE tpl_id=$tpl_id";
158 158
 
159 159
         if (!$db->query($sql)) {
160 160
             die('SQL Error');
161 161
         }
162 162
 
163
-        $db->query('UPDATE ' . $db->prefix('tplfile') . " SET tpl_lastmodified=UNIX_TIMESTAMP() WHERE tpl_id=$tpl_id");
163
+        $db->query('UPDATE '.$db->prefix('tplfile')." SET tpl_lastmodified=UNIX_TIMESTAMP() WHERE tpl_id=$tpl_id");
164 164
 
165 165
         altsys_template_touch($tpl_id);
166 166
     }
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
     // continue or end ?
169 169
 
170 170
     if (!empty($_POST['do_modifycont'])) {
171
-        redirect_header('index.php?mode=admin&lib=altsys&page=mytplsform&tpl_file=' . $tpl_file . '&tpl_tplset=' . $tpl_tplset . '&dirname=' . $tpl['tpl_module'] . '#altsys_tplsform_top', 1, _MD_A_MYTPLSFORM_UPDATED);
171
+        redirect_header('index.php?mode=admin&lib=altsys&page=mytplsform&tpl_file='.$tpl_file.'&tpl_tplset='.$tpl_tplset.'&dirname='.$tpl['tpl_module'].'#altsys_tplsform_top', 1, _MD_A_MYTPLSFORM_UPDATED);
172 172
     } else {
173
-        redirect_header('index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $tpl['tpl_module'], 1, _MD_A_MYTPLSFORM_UPDATED);
173
+        redirect_header('index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$tpl['tpl_module'], 1, _MD_A_MYTPLSFORM_UPDATED);
174 174
     }
175 175
 
176 176
     exit;
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     // Ticket Check
181 181
 
182 182
     if (!$xoopsGTicket->check(true, 'altsys_tplsform')) {
183
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
183
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
184 184
     }
185 185
 
186 186
     $sql = 'INSERT INTO '
@@ -196,22 +196,22 @@  discard block
 block discarded – undo
196 196
            . "'";
197 197
 
198 198
     if (!$db->query($sql)) {
199
-        die('SQL Error' . __LINE__);
199
+        die('SQL Error'.__LINE__);
200 200
     }
201 201
 
202
-    $tpl_id = (int) $db->getInsertId();
202
+    $tpl_id = (int)$db->getInsertId();
203 203
 
204
-    $sql = 'INSERT INTO ' . $db->prefix('tplsource') . " SET tpl_id=$tpl_id,tpl_source='" . addslashes(($_POST['tpl_source'])) . "'";
204
+    $sql = 'INSERT INTO '.$db->prefix('tplsource')." SET tpl_id=$tpl_id,tpl_source='".addslashes(($_POST['tpl_source']))."'";
205 205
 
206 206
     if (!$db->query($sql)) {
207
-        die('SQL Error' . __LINE__);
207
+        die('SQL Error'.__LINE__);
208 208
     }
209 209
 
210 210
     altsys_template_touch($tpl_id);
211 211
 
212 212
     // continue or end ?
213 213
 
214
-    redirect_header('index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $tpl['tpl_module'], 1, _MD_A_MYTPLSFORM_CREATED);
214
+    redirect_header('index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$tpl['tpl_module'], 1, _MD_A_MYTPLSFORM_CREATED);
215 215
 
216 216
     exit;
217 217
 }
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 //   FORM stage   //
221 221
 //****************//
222 222
 xoops_cp_header();
223
-$mymenu_fake_uri = 'index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $mydirname;
223
+$mymenu_fake_uri = 'index.php?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$mydirname;
224 224
 
225 225
 // mymenu
226 226
 altsys_include_mymenu();
227 227
 
228
-echo "<h3 style='text-align:" . _GLOBAL_LEFT . ";'>" . _MD_A_MYTPLSFORM_EDIT . ' : ' . htmlspecialchars($tpl['tpl_type'], ENT_QUOTES | ENT_HTML5) . ' : ' . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5) . ' (' . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5) . ")</h3>\n";
228
+echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>"._MD_A_MYTPLSFORM_EDIT.' : '.htmlspecialchars($tpl['tpl_type'], ENT_QUOTES | ENT_HTML5).' : '.htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5).' ('.htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5).")</h3>\n";
229 229
 
230 230
 // diff from file to selected DB template
231 231
 $basefilepath = tplsadmin_get_basefilepath($tpl['tpl_module'], $tpl['tpl_type'], $tpl['tpl_file']);
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
 
244 244
     foreach (explode("\n", $diff_str) as $line) {
245 245
         if (0x2d == ord($line)) {
246
-            $diff_from_file4disp .= "<span style='color:red;'>" . $line . "</span>\n";
246
+            $diff_from_file4disp .= "<span style='color:red;'>".$line."</span>\n";
247 247
         } elseif (0x2b == ord($line)) {
248
-            $diff_from_file4disp .= "<span style='color:blue;'>" . $line . "</span>\n";
248
+            $diff_from_file4disp .= "<span style='color:blue;'>".$line."</span>\n";
249 249
         } else {
250
-            $diff_from_file4disp .= $line . "\n";
250
+            $diff_from_file4disp .= $line."\n";
251 251
         }
252 252
     }
253 253
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
     error_reporting($original_error_level & ~E_NOTICE & ~E_WARNING);
263 263
 
264
-    [$default_source] = $db->fetchRow($db->query('SELECT tpl_source FROM ' . $db->prefix('tplfile') . ' NATURAL LEFT JOIN ' . $db->prefix('tplsource') . " WHERE tpl_tplset='default' AND tpl_file='" . addslashes($tpl['tpl_file']) . "' AND tpl_module='" . addslashes($tpl['tpl_module']) . "'"));
264
+    [$default_source] = $db->fetchRow($db->query('SELECT tpl_source FROM '.$db->prefix('tplfile').' NATURAL LEFT JOIN '.$db->prefix('tplsource')." WHERE tpl_tplset='default' AND tpl_file='".addslashes($tpl['tpl_file'])."' AND tpl_module='".addslashes($tpl['tpl_module'])."'"));
265 265
 
266 266
     $diff = new Text_Diff(explode("\n", $default_source), explode("\n", $tpl['tpl_source']));
267 267
 
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
 
272 272
     foreach (explode("\n", $diff_str) as $line) {
273 273
         if (0x2d == ord($line)) {
274
-            $diff_from_default4disp .= "<span style='color:red;'>" . $line . "</span>\n";
274
+            $diff_from_default4disp .= "<span style='color:red;'>".$line."</span>\n";
275 275
         } elseif (0x2b == ord($line)) {
276
-            $diff_from_default4disp .= "<span style='color:blue;'>" . $line . "</span>\n";
276
+            $diff_from_default4disp .= "<span style='color:blue;'>".$line."</span>\n";
277 277
         } else {
278
-            $diff_from_default4disp .= $line . "\n";
278
+            $diff_from_default4disp .= $line."\n";
279 279
         }
280 280
     }
281 281
 
@@ -297,25 +297,25 @@  discard block
 block discarded – undo
297 297
 
298 298
 echo "
299 299
 <a name='altsys_tplsform_top' id='altsys_tplsform_top'></a>
300
-<form name='MainForm' id='altsys_tplsform' action='?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=" . htmlspecialchars($tpl_file, ENT_QUOTES | ENT_HTML5) . '&amp;tpl_tplset=' . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5) . '&amp;dirname=' . $target_mname . "' method='post'>
301
-    " . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys_tplsform') . "
302
-    <textarea name='tpl_source' id='altsys_tpl_source' wrap='off' style='width:600px;height:400px;'>" . htmlspecialchars($tpl['tpl_source'], ENT_QUOTES | ENT_HTML5) . '</textarea>
300
+<form name='MainForm' id='altsys_tplsform' action='?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=" . htmlspecialchars($tpl_file, ENT_QUOTES | ENT_HTML5).'&amp;tpl_tplset='.htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5).'&amp;dirname='.$target_mname."' method='post'>
301
+    " . $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys_tplsform')."
302
+    <textarea name='tpl_source' id='altsys_tpl_source' wrap='off' style='width:600px;height:400px;'>" . htmlspecialchars($tpl['tpl_source'], ENT_QUOTES | ENT_HTML5).'</textarea>
303 303
     <br>
304 304
 ';
305 305
 if ('create' == $edit_mode) {
306 306
     // create form
307 307
 
308 308
     echo "
309
-    <label for='tpl_file'>" . _MD_A_MYTPLSFORM_LABEL_TPLFILE . "</label>
310
-    <input type='text' name='tpl_file' id='tpl_file' value='" . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5) . "' size='64'><br>
311
-    <input type='submit' name='do_create' id='do_create' value='" . _MD_A_MYTPLSFORM_BTN_CREATE . "'>\n";
309
+    <label for='tpl_file'>" . _MD_A_MYTPLSFORM_LABEL_TPLFILE."</label>
310
+    <input type='text' name='tpl_file' id='tpl_file' value='" . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5)."' size='64'><br>
311
+    <input type='submit' name='do_create' id='do_create' value='" . _MD_A_MYTPLSFORM_BTN_CREATE."'>\n";
312 312
 } else {
313 313
     // modify form
314 314
 
315 315
     echo "
316
-    <input type='submit' name='do_modifycont' id='do_modifycont' value='" . _MD_A_MYTPLSFORM_BTN_MODIFYCONT . "'>
317
-    <input type='submit' name='do_modify' id='do_modify' value='" . _MD_A_MYTPLSFORM_BTN_MODIFYEND . "'>
318
-    <input type='reset' name='reset' value='" . _MD_A_MYTPLSFORM_BTN_RESET . "'>
316
+    <input type='submit' name='do_modifycont' id='do_modifycont' value='" . _MD_A_MYTPLSFORM_BTN_MODIFYCONT."'>
317
+    <input type='submit' name='do_modify' id='do_modify' value='" . _MD_A_MYTPLSFORM_BTN_MODIFYEND."'>
318
+    <input type='reset' name='reset' value='" . _MD_A_MYTPLSFORM_BTN_RESET."'>
319 319
 </form>\n";
320 320
 }
321 321
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/x20_keepblockoptions.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 // Keep Block option values when update (by nobunobu) for XOOPS 2.0.x
5 5
 global $xoopsDB;
6
-$query = 'SELECT mid FROM ' . $xoopsDB->prefix('modules') . " WHERE dirname='" . $modversion['dirname'] . "' ";
6
+$query = 'SELECT mid FROM '.$xoopsDB->prefix('modules')." WHERE dirname='".$modversion['dirname']."' ";
7 7
 $result = $xoopsDB->query($query);
8 8
 $record = $xoopsDB->fetchArray($result);
9 9
 if ($record) {
@@ -55,20 +55,20 @@  discard block
 block discarded – undo
55 55
         }
56 56
     } */
57 57
 
58
-    $sql = 'SELECT * FROM ' . $xoopsDB->prefix('newblocks') . ' WHERE mid=' . $mid . " AND block_type <>'D' AND func_num > $count";
58
+    $sql = 'SELECT * FROM '.$xoopsDB->prefix('newblocks').' WHERE mid='.$mid." AND block_type <>'D' AND func_num > $count";
59 59
 
60 60
     $fresult = $xoopsDB->query($sql);
61 61
 
62 62
     while (false !== ($fblock = $xoopsDB->fetchArray($fresult))) {
63
-        $local_msgs[] = 'Non Defined Block <b>' . $fblock['name'] . '</b> will be deleted';
63
+        $local_msgs[] = 'Non Defined Block <b>'.$fblock['name'].'</b> will be deleted';
64 64
 
65
-        $sql = 'DELETE FROM ' . $xoopsDB->prefix('newblocks') . " WHERE bid='" . $fblock['bid'] . "'";
65
+        $sql = 'DELETE FROM '.$xoopsDB->prefix('newblocks')." WHERE bid='".$fblock['bid']."'";
66 66
 
67 67
         $iret = $xoopsDB->query($sql);
68 68
     }
69 69
 
70 70
     for ($i = 1; $i <= $count; ++$i) {
71
-        $sql = 'SELECT name,options FROM ' . $xoopsDB->prefix('newblocks') . ' WHERE mid=' . $mid . ' AND func_num=' . $i . " AND show_func='" . addslashes($modversion['blocks'][$i]['show_func']) . "' AND func_file='" . addslashes($modversion['blocks'][$i]['file']) . "'";
71
+        $sql = 'SELECT name,options FROM '.$xoopsDB->prefix('newblocks').' WHERE mid='.$mid.' AND func_num='.$i." AND show_func='".addslashes($modversion['blocks'][$i]['show_func'])."' AND func_file='".addslashes($modversion['blocks'][$i]['file'])."'";
72 72
 
73 73
         $fresult = $xoopsDB->query($sql);
74 74
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             if (count($old_vals) == count($def_vals)) {
83 83
                 $modversion['blocks'][$i]['options'] = $fblock['options'];
84 84
 
85
-                $local_msgs[] = "Option's values of the block <b>" . $fblock['name'] . '</b> will be kept. (value = <b>' . $fblock['options'] . '</b>)';
85
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be kept. (value = <b>'.$fblock['options'].'</b>)';
86 86
             } elseif (count($old_vals) < count($def_vals)) {
87 87
                 for ($j = 0; $j < count($old_vals); $j++) {
88 88
                     $def_vals[$j] = $old_vals[$j];
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 
91 91
                 $modversion['blocks'][$i]['options'] = implode('|', $def_vals);
92 92
 
93
-                $local_msgs[] = "Option's values of the block <b>" . $fblock['name'] . '</b> will be kept and new option(s) are added. (value = <b>' . $modversion['blocks'][$i]['options'] . '</b>)';
93
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be kept and new option(s) are added. (value = <b>'.$modversion['blocks'][$i]['options'].'</b>)';
94 94
             } else {
95
-                $local_msgs[] = "Option's values of the block <b>" . $fblock['name'] . '</b> will be reset to the default, because of some decrease of options. (value = <b>' . $modversion['blocks'][$i]['options'] . '</b>)';
95
+                $local_msgs[] = "Option's values of the block <b>".$fblock['name'].'</b> will be reset to the default, because of some decrease of options. (value = <b>'.$modversion['blocks'][$i]['options'].'</b>)';
96 96
             }
97 97
         }
98 98
     }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/compilehook.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     $tplsvars_file = 'tplsvars_';
14 14
 
15
-    $tplsvars_file .= mb_substr(md5(mb_substr(XOOPS_DB_PASS, 0, 4)), 0, 4) . '_';
15
+    $tplsvars_file .= mb_substr(md5(mb_substr(XOOPS_DB_PASS, 0, 4)), 0, 4).'_';
16 16
 
17 17
     if (0 === strncmp($file, 'db:', 3)) {
18 18
         $tplsvars_file .= mb_substr($file, 3);
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $tplsvars_file .= strtr($file, '/', '%');
23 23
     }
24 24
 
25
-    if ($fw = @fopen(XOOPS_COMPILE_PATH . '/' . $tplsvars_file, 'xb')) {
25
+    if ($fw = @fopen(XOOPS_COMPILE_PATH.'/'.$tplsvars_file, 'xb')) {
26 26
         fwrite($fw, serialize($smarty->_tpl_vars));
27 27
 
28 28
         fclose($fw);
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/tpls_functions.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
     // get tplfile and tplsource
101 101
 
102 102
     $result = $db->query("SELECT tpl_refid,tpl_module,'"
103
-                         . addslashes($tplset_to)
104
-                         . "',tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type,tpl_source FROM "
105
-                         . $db->prefix('tplfile')
106
-                         . ' NATURAL LEFT JOIN '
107
-                         . $db->prefix('tplsource')
108
-                         . " WHERE tpl_tplset='"
109
-                         . addslashes($tplset_from)
110
-                         . "' AND ($whr_append)");
103
+                            . addslashes($tplset_to)
104
+                            . "',tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type,tpl_source FROM "
105
+                            . $db->prefix('tplfile')
106
+                            . ' NATURAL LEFT JOIN '
107
+                            . $db->prefix('tplsource')
108
+                            . " WHERE tpl_tplset='"
109
+                            . addslashes($tplset_from)
110
+                            . "' AND ($whr_append)");
111 111
 
112 112
     while (false !== ($row = $db->fetchArray($result))) {
113 113
         $tpl_source = array_pop($row);
@@ -135,18 +135,18 @@  discard block
 block discarded – undo
135 135
                 // UPDATE mode
136 136
 
137 137
                 $db->query('UPDATE '
138
-                           . $db->prefix('tplfile')
139
-                           . " SET tpl_refid='"
140
-                           . addslashes($row['tpl_refid'])
141
-                           . "',tpl_desc='"
142
-                           . addslashes($row['tpl_desc'])
143
-                           . "',tpl_lastmodified='"
144
-                           . addslashes($row['tpl_lastmodified'])
145
-                           . "',tpl_lastimported='"
146
-                           . addslashes($row['tpl_lastimported'])
147
-                           . "',tpl_type='"
148
-                           . addslashes($row['tpl_type'])
149
-                           . "' WHERE tpl_id='$tpl_id'");
138
+                            . $db->prefix('tplfile')
139
+                            . " SET tpl_refid='"
140
+                            . addslashes($row['tpl_refid'])
141
+                            . "',tpl_desc='"
142
+                            . addslashes($row['tpl_desc'])
143
+                            . "',tpl_lastmodified='"
144
+                            . addslashes($row['tpl_lastmodified'])
145
+                            . "',tpl_lastimported='"
146
+                            . addslashes($row['tpl_lastimported'])
147
+                            . "',tpl_type='"
148
+                            . addslashes($row['tpl_type'])
149
+                            . "' WHERE tpl_id='$tpl_id'");
150 150
 
151 151
                 $db->query('UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes($tpl_source) . "' WHERE tpl_id='$tpl_id'");
152 152
 
@@ -181,22 +181,22 @@  discard block
 block discarded – undo
181 181
             // INSERT mode
182 182
 
183 183
             $sql = 'INSERT INTO '
184
-                   . $db->prefix('tplfile')
185
-                   . " SET tpl_refid='"
186
-                   . addslashes($row['tpl_refid'])
187
-                   . "',tpl_desc='"
188
-                   . addslashes($row['tpl_desc'])
189
-                   . "',tpl_lastmodified='"
190
-                   . addslashes($lastmodified)
191
-                   . "',tpl_type='"
192
-                   . addslashes($row['tpl_type'])
193
-                   . "',tpl_tplset='"
194
-                   . addslashes($tplset_to)
195
-                   . "',tpl_file='"
196
-                   . addslashes($row['tpl_file'])
197
-                   . "',tpl_module='"
198
-                   . addslashes($row['tpl_module'])
199
-                   . "'";
184
+                    . $db->prefix('tplfile')
185
+                    . " SET tpl_refid='"
186
+                    . addslashes($row['tpl_refid'])
187
+                    . "',tpl_desc='"
188
+                    . addslashes($row['tpl_desc'])
189
+                    . "',tpl_lastmodified='"
190
+                    . addslashes($lastmodified)
191
+                    . "',tpl_type='"
192
+                    . addslashes($row['tpl_type'])
193
+                    . "',tpl_tplset='"
194
+                    . addslashes($tplset_to)
195
+                    . "',tpl_file='"
196
+                    . addslashes($row['tpl_file'])
197
+                    . "',tpl_module='"
198
+                    . addslashes($row['tpl_module'])
199
+                    . "'";
200 200
 
201 201
             $db->query($sql);
202 202
 
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-require_once XOOPS_ROOT_PATH . '/class/template.php';
4
-require_once __DIR__ . '/altsys_functions.php';
3
+require_once XOOPS_ROOT_PATH.'/class/template.php';
4
+require_once __DIR__.'/altsys_functions.php';
5 5
 
6 6
 /**
7 7
  * @param     $tplset
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     // check the file is valid template
18 18
 
19
-    [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='default' AND tpl_file='" . addslashes($tpl_file) . "'"));
19
+    [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='default' AND tpl_file='".addslashes($tpl_file)."'"));
20 20
 
21 21
     if (!$count) {
22 22
         return false;
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
     // check the template exists in the tplset
26 26
 
27 27
     if ('default' != $tplset) {
28
-        [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset) . "' AND tpl_file='" . addslashes($tpl_file) . "'"));
28
+        [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset)."' AND tpl_file='".addslashes($tpl_file)."'"));
29 29
 
30 30
         if ($count <= 0) {
31 31
             // copy from 'default' to the tplset
32 32
 
33
-            $result = $db->query('SELECT * FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='default' AND tpl_file='" . addslashes($tpl_file) . "'");
33
+            $result = $db->query('SELECT * FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='default' AND tpl_file='".addslashes($tpl_file)."'");
34 34
 
35 35
             while (false !== ($row = $db->fetchArray($result))) {
36 36
                 $db->queryF('INSERT INTO '
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
 
52 52
                 $tpl_id = $db->getInsertId();
53 53
 
54
-                $db->queryF('INSERT INTO ' . $db->prefix('tplsource') . " SET tpl_id='$tpl_id', tpl_source=''");
54
+                $db->queryF('INSERT INTO '.$db->prefix('tplsource')." SET tpl_id='$tpl_id', tpl_source=''");
55 55
             }
56 56
         }
57 57
     }
58 58
 
59 59
     // UPDATE just tpl_lastmodified and tpl_source
60 60
 
61
-    $drs = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset) . "' AND tpl_file='" . addslashes($tpl_file) . "'");
61
+    $drs = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset)."' AND tpl_file='".addslashes($tpl_file)."'");
62 62
 
63 63
     while ([$tpl_id] = $db->fetchRow($drs)) {
64
-        $db->queryF('UPDATE ' . $db->prefix('tplfile') . " SET tpl_lastmodified='" . addslashes($lastmodified) . "',tpl_lastimported=UNIX_TIMESTAMP() WHERE tpl_id='$tpl_id'");
64
+        $db->queryF('UPDATE '.$db->prefix('tplfile')." SET tpl_lastmodified='".addslashes($lastmodified)."',tpl_lastimported=UNIX_TIMESTAMP() WHERE tpl_id='$tpl_id'");
65 65
 
66
-        $db->queryF('UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes($tpl_source) . "' WHERE tpl_id='$tpl_id'");
66
+        $db->queryF('UPDATE '.$db->prefix('tplsource')." SET tpl_source='".addslashes($tpl_source)."' WHERE tpl_id='$tpl_id'");
67 67
 
68 68
         altsys_template_touch($tpl_id);
69 69
     }
@@ -112,22 +112,22 @@  discard block
 block discarded – undo
112 112
     while (false !== ($row = $db->fetchArray($result))) {
113 113
         $tpl_source = array_pop($row);
114 114
 
115
-        $drs = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_to) . "' AND ($whr_append) AND tpl_file='" . addslashes($row['tpl_file']) . "' AND tpl_refid='" . addslashes($row['tpl_refid']) . "'");
115
+        $drs = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_to)."' AND ($whr_append) AND tpl_file='".addslashes($row['tpl_file'])."' AND tpl_refid='".addslashes($row['tpl_refid'])."'");
116 116
 
117 117
         if (!$db->getRowsNum($drs)) {
118 118
             // INSERT mode
119 119
 
120
-            $sql = 'INSERT INTO ' . $db->prefix('tplfile') . ' (tpl_refid,tpl_module,tpl_tplset,tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type) VALUES (';
120
+            $sql = 'INSERT INTO '.$db->prefix('tplfile').' (tpl_refid,tpl_module,tpl_tplset,tpl_file,tpl_desc,tpl_lastmodified,tpl_lastimported,tpl_type) VALUES (';
121 121
 
122 122
             foreach ($row as $colval) {
123
-                $sql .= "'" . addslashes($colval) . "',";
123
+                $sql .= "'".addslashes($colval)."',";
124 124
             }
125 125
 
126
-            $db->query(mb_substr($sql, 0, -1) . ')');
126
+            $db->query(mb_substr($sql, 0, -1).')');
127 127
 
128 128
             $tpl_id = $db->getInsertId();
129 129
 
130
-            $db->query('INSERT INTO ' . $db->prefix('tplsource') . " SET tpl_id='$tpl_id', tpl_source='" . addslashes($tpl_source) . "'");
130
+            $db->query('INSERT INTO '.$db->prefix('tplsource')." SET tpl_id='$tpl_id', tpl_source='".addslashes($tpl_source)."'");
131 131
 
132 132
             altsys_template_touch($tpl_id);
133 133
         } else {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                            . addslashes($row['tpl_type'])
149 149
                            . "' WHERE tpl_id='$tpl_id'");
150 150
 
151
-                $db->query('UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes($tpl_source) . "' WHERE tpl_id='$tpl_id'");
151
+                $db->query('UPDATE '.$db->prefix('tplsource')." SET tpl_source='".addslashes($tpl_source)."' WHERE tpl_id='$tpl_id'");
152 152
 
153 153
                 altsys_template_touch($tpl_id);
154 154
             }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
     // get tplsource
168 168
 
169
-    $result = $db->query('SELECT * FROM ' . $db->prefix('tplfile') . "  WHERE tpl_tplset='default' AND ($whr_append)");
169
+    $result = $db->query('SELECT * FROM '.$db->prefix('tplfile')."  WHERE tpl_tplset='default' AND ($whr_append)");
170 170
 
171 171
     while (false !== ($row = $db->fetchArray($result))) {
172 172
         $basefilepath = tplsadmin_get_basefilepath($row['tpl_module'], $row['tpl_type'], $row['tpl_file']);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         $lastmodified = filemtime($basefilepath);
177 177
 
178
-        $drs = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_to) . "' AND ($whr_append) AND tpl_file='" . addslashes($row['tpl_file']) . "' AND tpl_refid='" . addslashes($row['tpl_refid']) . "'");
178
+        $drs = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_to)."' AND ($whr_append) AND tpl_file='".addslashes($row['tpl_file'])."' AND tpl_refid='".addslashes($row['tpl_refid'])."'");
179 179
 
180 180
         if (!$db->getRowsNum($drs)) {
181 181
             // INSERT mode
@@ -202,16 +202,16 @@  discard block
 block discarded – undo
202 202
 
203 203
             $tpl_id = $db->getInsertId();
204 204
 
205
-            $db->query('INSERT INTO ' . $db->prefix('tplsource') . " SET tpl_id='$tpl_id', tpl_source='" . addslashes($tpl_source) . "'");
205
+            $db->query('INSERT INTO '.$db->prefix('tplsource')." SET tpl_id='$tpl_id', tpl_source='".addslashes($tpl_source)."'");
206 206
 
207 207
             altsys_template_touch($tpl_id);
208 208
         } else {
209 209
             while ([$tpl_id] = $db->fetchRow($drs)) {
210 210
                 // UPDATE mode
211 211
 
212
-                $db->query('UPDATE ' . $db->prefix('tplfile') . " SET tpl_lastmodified='" . addslashes($lastmodified) . "' WHERE tpl_id='$tpl_id'");
212
+                $db->query('UPDATE '.$db->prefix('tplfile')." SET tpl_lastmodified='".addslashes($lastmodified)."' WHERE tpl_id='$tpl_id'");
213 213
 
214
-                $db->query('UPDATE ' . $db->prefix('tplsource') . " SET tpl_source='" . addslashes($tpl_source) . "' WHERE tpl_id='$tpl_id'");
214
+                $db->query('UPDATE '.$db->prefix('tplsource')." SET tpl_source='".addslashes($tpl_source)."' WHERE tpl_id='$tpl_id'");
215 215
 
216 216
                 altsys_template_touch($tpl_id);
217 217
             }
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 {
230 230
     // module instance
231 231
 
232
-    $path = $basefilepath = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/templates/' . ('block' == $type ? 'blocks/' : '') . $tpl_file;
232
+    $path = $basefilepath = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/templates/'.('block' == $type ? 'blocks/' : '').$tpl_file;
233 233
 
234 234
     if (is_callable('Legacy_Utils::getTrustDirnameByDirname')) {
235 235
         $mytrustdirname = Legacy_Utils::getTrustDirnameByDirname($dirname);
@@ -240,19 +240,19 @@  discard block
 block discarded – undo
240 240
     if (defined('ALTSYS_TPLSADMIN_BASEPATH')) {
241 241
         // Special hook
242 242
 
243
-        $path = ALTSYS_TPLSADMIN_BASEPATH . '/' . mb_substr($tpl_file, mb_strlen($dirname) + 1);
244
-    } elseif ($mytrustdirname || @require XOOPS_ROOT_PATH . '/modules/' . $dirname . '/mytrustdirname.php') {
243
+        $path = ALTSYS_TPLSADMIN_BASEPATH.'/'.mb_substr($tpl_file, mb_strlen($dirname) + 1);
244
+    } elseif ($mytrustdirname || @require XOOPS_ROOT_PATH.'/modules/'.$dirname.'/mytrustdirname.php') {
245 245
         // D3 module base
246 246
 
247 247
         if (!empty($mytrustdirname)) {
248 248
             $mid_path = 'altsys' == $mytrustdirname ? '/libs/' : '/modules/';
249 249
 
250
-            $path = XOOPS_TRUST_PATH . $mid_path . $mytrustdirname . '/templates/' . ('block' == $type ? 'blocks/' : '') . mb_substr($tpl_file, mb_strlen($dirname) + 1);
250
+            $path = XOOPS_TRUST_PATH.$mid_path.$mytrustdirname.'/templates/'.('block' == $type ? 'blocks/' : '').mb_substr($tpl_file, mb_strlen($dirname) + 1);
251 251
 
252 252
             //new for xcck etc.other trust_module
253 253
 
254 254
             if (!file_exists($path)) {
255
-                $path = XOOPS_TRUST_PATH . $mid_path . $mytrustdirname . '/templates/' . ('block' == $type ? 'blocks/' : '') . $tpl_file;
255
+                $path = XOOPS_TRUST_PATH.$mid_path.$mytrustdirname.'/templates/'.('block' == $type ? 'blocks/' : '').$tpl_file;
256 256
 
257 257
                 if (!file_exists($path)) {
258 258
                     $path = $basefilepath;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 function tplsadmin_die($msg, $target_dirname = '', $wait = 2): void
273 273
 {
274 274
     if ('post' === mb_strtolower($_SERVER['REQUEST_METHOD'])) {
275
-        redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, $wait, $msg);
275
+        redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, $wait, $msg);
276 276
 
277 277
         exit;
278 278
     }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/Text_Diff_Renderer_inline.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             return implode('', $lines);
102 102
         }
103 103
 
104
-        return implode("\n", $lines) . "\n";
104
+        return implode("\n", $lines)."\n";
105 105
     }
106 106
 
107 107
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         array_walk($lines, [&$this, '_encode']);
115 115
 
116
-        $lines[0] = $this->_ins_prefix . $lines[0];
116
+        $lines[0] = $this->_ins_prefix.$lines[0];
117 117
 
118 118
         $lines[count($lines) - 1] .= $this->_ins_suffix;
119 119
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         array_walk($lines, [&$this, '_encode']);
132 132
 
133
-        $lines[0] = $this->_del_prefix . $lines[0];
133
+        $lines[0] = $this->_del_prefix.$lines[0];
134 134
 
135 135
         $lines[count($lines) - 1] .= $this->_del_suffix;
136 136
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $final[0] = mb_substr($final[0], 1);
162 162
             }
163 163
 
164
-            return $prefix . $this->_deleted($orig) . $this->_added($final);
164
+            return $prefix.$this->_deleted($orig).$this->_added($final);
165 165
         }
166 166
 
167 167
         $text1 = implode("\n", $orig);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
         /* Run the diff and get the output. */
186 186
 
187
-        return str_replace($nl, "\n", $renderer->render($diff)) . "\n";
187
+        return str_replace($nl, "\n", $renderer->render($diff))."\n";
188 188
     }
189 189
 
190 190
     /**
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/admin_in_theme.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
     if (preg_match('#(^/admin.php|^/modules/system/|^/modules/[a-zA-Z0-9_.-]+/admin/)#', $xoops_subpath)) {
8 8
         // The request looks like admin
9 9
 
10
-        require_once __DIR__ . '/altsys_functions.php';
10
+        require_once __DIR__.'/altsys_functions.php';
11 11
 
12
-        if (!empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH . '/' . $GLOBALS['altsysModuleConfig']['admin_in_theme'] . '/theme.html')) {
12
+        if (!empty($GLOBALS['altsysModuleConfig']['admin_in_theme']) && file_exists(XOOPS_THEME_PATH.'/'.$GLOBALS['altsysModuleConfig']['admin_in_theme'].'/theme.html')) {
13 13
             // configs OK
14 14
 
15
-            require_once __DIR__ . '/admin_in_theme_functions.php';
15
+            require_once __DIR__.'/admin_in_theme_functions.php';
16 16
 
17 17
             // for security with register_globals=1
18 18
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/lang_functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     $already_read = false;
17 17
 
18
-    $langfile_fingerprint = '_MYLANGADMIN_' . md5($langfile_unique_path);
18
+    $langfile_fingerprint = '_MYLANGADMIN_'.md5($langfile_unique_path);
19 19
 
20 20
     // for debug
21 21
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     // modinfo.php of D3 module
43 43
 
44
-    if (empty($langfile_names) && file_exists(XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php') /* && substr( $langfile_unique_path , -11 ) == 'modinfo.php' */) {
44
+    if (empty($langfile_names) && file_exists(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/mytrustdirname.php') /* && substr( $langfile_unique_path , -11 ) == 'modinfo.php' */) {
45 45
         // get $constpref
46 46
 
47 47
         $constpref = '';
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 
123 123
     $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
124 124
 
125
-    $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
125
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
126 126
 
127 127
     $breadcrumbsObj->appendPath('', $target_mname);
128 128
 
129
-    echo '<h3>' . _MYLANGADMIN_H3_MODULE . ' : ' . $target_mname . '</h3>';
129
+    echo '<h3>'._MYLANGADMIN_H3_MODULE.' : '.$target_mname.'</h3>';
130 130
 
131
-    echo '<p>' . $message4disp . '</p>';
131
+    echo '<p>'.$message4disp.'</p>';
132 132
 
133 133
     xoops_cp_footer();
134 134
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/language/german/blocks_each.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
3 3
 if (defined('FOR_XOOPS_LANG_CHECKER')) {
4 4
     $mydirname = 'd3forum';
5 5
 }
6
-$constpref = '_MB_' . mb_strtoupper($mydirname);
6
+$constpref = '_MB_'.mb_strtoupper($mydirname);
7 7
 
8
-if (defined('FOR_XOOPS_LANG_CHECKER') || !defined($constpref . '_LOADED')) {
9
-    define($constpref . '_LOADED', 1);
8
+if (defined('FOR_XOOPS_LANG_CHECKER') || !defined($constpref.'_LOADED')) {
9
+    define($constpref.'_LOADED', 1);
10 10
 
11 11
     // definitions for displaying blocks
12 12
     // Since altsys is a singleton moudle, this file has non-sense.
Please login to merge, or discard this patch.