Completed
Push — master ( b4f428...a74d38 )
by Michael
02:21
created
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/mygroupperm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         }
24 24
     }
25 25
 
26
-    $sql = 'DELETE FROM ' . $DB->prefix('group_permission') . ' ' . $criteria->renderWhere();
26
+    $sql = 'DELETE FROM '.$DB->prefix('group_permission').' '.$criteria->renderWhere();
27 27
 
28 28
     if (!$result = $DB->query($sql)) {
29 29
         return false;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                                 if (0 != $pid && !in_array($pid, array_keys($item_ids), true)) {
107 107
                                     // one of the parent items were not selected, so skip this item
108 108
 
109
-                                    $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_A_MYBLOCKSADMIN_PERMADDNGP . ')';
109
+                                    $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_A_MYBLOCKSADMIN_PERMADDNGP.')';
110 110
 
111 111
                                     continue 2;
112 112
                                 }
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
                         $gperm->setVar('gperm_itemid', $item_id);
125 125
 
126 126
                         if (!$grouppermHandler->insert($gperm)) {
127
-                            $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
127
+                            $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
128 128
                         } else {
129
-                            $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>');
129
+                            $msg[] = sprintf(_MD_A_MYBLOCKSADMIN_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
130 130
                         }
131 131
 
132 132
                         unset($gperm);
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/gtickets.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
             // language file
29 29
 
30 30
             if (defined('XOOPS_ROOT_PATH') && !empty($xoopsConfig['language']) && !mb_strstr($xoopsConfig['language'], '/')) {
31
-                if (is_file(dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml')) {
32
-                    include dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/gticket_messages.phtml';
31
+                if (is_file(dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml')) {
32
+                    include dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/gticket_messages.phtml';
33 33
                 }
34 34
             }
35 35
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         public function getTicketHtml($salt = '', $timeout = 1800, $area = '')
62 62
         {
63
-            return '<input type="hidden" name="XOOPS_G_TICKET" value="' . $this->issue($salt, $timeout, $area) . '" />';
63
+            return '<input type="hidden" name="XOOPS_G_TICKET" value="'.$this->issue($salt, $timeout, $area).'" />';
64 64
         }
65 65
 
66 66
         // returns an object of XoopsFormHidden including theh ticket
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         public function getTicketParamString($salt = '', $noamp = false, $timeout = 1800, $area = '')
119 119
         {
120
-            return ($noamp ? '' : '&amp;') . 'XOOPS_G_TICKET=' . $this->issue($salt, $timeout, $area);
120
+            return ($noamp ? '' : '&amp;').'XOOPS_G_TICKET='.$this->issue($salt, $timeout, $area);
121 121
         }
122 122
 
123 123
         // issue a ticket
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 
136 136
             if ('' === $salt) {
137 137
                 if (version_compare(PHP_VERSION, '7.0.0') >= 0 && function_exists('random_bytes')) {
138
-                    $salt = '$2y$07$' . str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES)));
138
+                    $salt = '$2y$07$'.str_replace('+', '.', base64_encode(random_bytes(self::PBKDF2_SALT_BYTES)));
139 139
                 } elseif (function_exists('mcrypt_create_iv')) {
140
-                    $salt = '$2y$07$' . str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)));
140
+                    $salt = '$2y$07$'.str_replace('+', '.', base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)));
141 141
                 }
142 142
             }
143 143
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
             $appendix_salt = empty($_SERVER['PATH']) ? XOOPS_DB_NAME : $_SERVER['PATH'];
149 149
 
150
-            $token = crypt($salt . $usec . $appendix_salt . $sec, $salt);
150
+            $token = crypt($salt.$usec.$appendix_salt.$sec, $salt);
151 151
 
152 152
             $this->_latest_token = $token;
153 153
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
             // paid md5ed token as a ticket
184 184
 
185
-            return md5($token . XOOPS_DB_PREFIX);
185
+            return md5($token.XOOPS_DB_PREFIX);
186 186
         }
187 187
 
188 188
         // check a ticket
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                 // default lifetime 30min
229 229
 
230 230
                 if ($stub['expire'] >= time()) {
231
-                    if (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) {
231
+                    if (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) {
232 232
                         $found_stub = $stub;
233 233
                     } else {
234 234
                         // store the other valid stubs into session
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                         $_SESSION['XOOPS_G_STUBS'][] = $stub;
237 237
                     }
238 238
                 } else {
239
-                    if (md5($stub['token'] . XOOPS_DB_PREFIX) === $ticket) {
239
+                    if (md5($stub['token'].XOOPS_DB_PREFIX) === $ticket) {
240 240
                         // not CSRF but Time-Out
241 241
 
242 242
                         $timeout_flag = true;
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
             $table = '<table>';
323 323
 
324
-            $form = '<form action="?' . htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES) . '" method="post" >';
324
+            $form = '<form action="?'.htmlspecialchars(@$_SERVER['QUERY_STRING'], ENT_QUOTES).'" method="post" >';
325 325
 
326 326
             foreach ($_POST as $key => $val) {
327 327
                 if ('XOOPS_G_TICKET' == $key) {
@@ -343,22 +343,22 @@  discard block
 block discarded – undo
343 343
                         $val = stripslashes($val);
344 344
                     }
345 345
 
346
-                    $table .= '<tr><th>' . htmlspecialchars($key, ENT_QUOTES) . '</th><td>' . htmlspecialchars($val, ENT_QUOTES) . '</td></tr>' . "\n";
346
+                    $table .= '<tr><th>'.htmlspecialchars($key, ENT_QUOTES).'</th><td>'.htmlspecialchars($val, ENT_QUOTES).'</td></tr>'."\n";
347 347
 
348
-                    $form .= '<input type="hidden" name="' . htmlspecialchars($key, ENT_QUOTES) . '" value="' . htmlspecialchars($val, ENT_QUOTES) . '" />' . "\n";
348
+                    $form .= '<input type="hidden" name="'.htmlspecialchars($key, ENT_QUOTES).'" value="'.htmlspecialchars($val, ENT_QUOTES).'" />'."\n";
349 349
                 }
350 350
             }
351 351
 
352 352
             $table .= '</table>';
353 353
 
354
-            $form .= $this->getTicketHtml(__LINE__, 300, $area) . '<input type="submit" value="' . $this->messages['btn_repost'] . '" /></form>';
354
+            $form .= $this->getTicketHtml(__LINE__, 300, $area).'<input type="submit" value="'.$this->messages['btn_repost'].'" /></form>';
355 355
 
356 356
             error_reporting(0);
357 357
 
358 358
             while (@ob_get_level() && @ob_end_clean()) {
359 359
             }
360 360
 
361
-            echo '<html><head><title>' . $this->messages['err_general'] . '</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>' . sprintf($this->messages['fmt_prompt4repost'], $this->getErrors()) . $table . $form . '</body></html>';
361
+            echo '<html><head><title>'.$this->messages['err_general'].'</title><style>table,td,th {border:solid black 1px; border-collapse:collapse;}</style></head><body>'.sprintf($this->messages['fmt_prompt4repost'], $this->getErrors()).$table.$form.'</body></html>';
362 362
         }
363 363
 
364 364
         /**
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                 }
380 380
 
381 381
                 if (is_array($val)) {
382
-                    list($tmp_table, $tmp_form) = $this->extract_post_recursive($key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']', $val);
382
+                    list($tmp_table, $tmp_form) = $this->extract_post_recursive($key_name.'['.htmlspecialchars($key, ENT_QUOTES).']', $val);
383 383
 
384 384
                     $table .= $tmp_table;
385 385
 
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
                         $val = stripslashes($val);
390 390
                     }
391 391
 
392
-                    $table .= '<tr><th>' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']</th><td>' . htmlspecialchars($val, ENT_QUOTES) . '</td></tr>' . "\n";
392
+                    $table .= '<tr><th>'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES).']</th><td>'.htmlspecialchars($val, ENT_QUOTES).'</td></tr>'."\n";
393 393
 
394
-                    $form .= '<input type="hidden" name="' . $key_name . '[' . htmlspecialchars($key, ENT_QUOTES) . ']" value="' . htmlspecialchars($val, ENT_QUOTES) . '" />' . "\n";
394
+                    $form .= '<input type="hidden" name="'.$key_name.'['.htmlspecialchars($key, ENT_QUOTES).']" value="'.htmlspecialchars($val, ENT_QUOTES).'" />'."\n";
395 395
                 }
396 396
             }
397 397
 
@@ -451,8 +451,8 @@  discard block
 block discarded – undo
451 451
 
452 452
         public function errorHandler4FindOutput($errNo, $errStr, $errFile, $errLine)
453 453
         {
454
-            if (preg_match('?' . preg_quote(XOOPS_ROOT_PATH) . '([^:]+)\:(\d+)?', $errStr, $regs)) {
455
-                echo 'Irregular output! check the file ' . htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5) . ' line ' . htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5);
454
+            if (preg_match('?'.preg_quote(XOOPS_ROOT_PATH).'([^:]+)\:(\d+)?', $errStr, $regs)) {
455
+                echo 'Irregular output! check the file '.htmlspecialchars($regs[1], ENT_QUOTES | ENT_HTML5).' line '.htmlspecialchars($regs[2], ENT_QUOTES | ENT_HTML5);
456 456
             } else {
457 457
                 echo 'Irregular output! check language files etc.';
458 458
             }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/adminmenu_functions.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once dirname(__DIR__) . '/class/altsysUtils.class.php';
2
+require_once dirname(__DIR__).'/class/altsysUtils.class.php';
3 3
 
4
-define('ALTSYS_ADMINMENU_FILE', XOOPS_CACHE_PATH . '/adminmenu.php');
4
+define('ALTSYS_ADMINMENU_FILE', XOOPS_CACHE_PATH.'/adminmenu.php');
5 5
 define('ALTSYS_ADMINMENU_HACK_NONE', 0);
6 6
 define('ALTSYS_ADMINMENU_HACK_2COL', 1);
7 7
 define('ALTSYS_ADMINMENU_HACK_NOIMG', 2);
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     // read
35 35
 
36 36
     if (!is_file(ALTSYS_ADMINMENU_FILE)) {
37
-        redirect_header(XOOPS_URL . '/admin.php', 1, 'Rebuild adminmenu');
37
+        redirect_header(XOOPS_URL.'/admin.php', 1, 'Rebuild adminmenu');
38 38
 
39 39
         exit;
40 40
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     $mid = $module->getVar('mid');
49 49
 
50
-    $anchor = '<!-- ALTSYS ANCHOR ' . $dirname . ' -->';
50
+    $anchor = '<!-- ALTSYS ANCHOR '.$dirname.' -->';
51 51
 
52 52
     // fetch popup_no
53 53
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
     // replace
65 65
 
66
-    $search = '<img src=\'' . XOOPS_URL . '/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\'' . XOOPS_URL . '/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $mid . '\'';
66
+    $search = '<img src=\''.XOOPS_URL.'/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\''.XOOPS_URL.'/modules/system/admin.php?fct=preferences&amp;op=showmod&amp;mod='.$mid.'\'';
67 67
 
68
-    $replace = $anchor . '<img src=\'' . XOOPS_URL . '/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\'' . XOOPS_URL . '/modules/' . $dirname . '/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences\'';
68
+    $replace = $anchor.'<img src=\''.XOOPS_URL.'/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\''.XOOPS_URL.'/modules/'.$dirname.'/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences\'';
69 69
 
70 70
     // do replacement
71 71
 
72
-    $new_xoops_admin_menu_dv = preg_replace('#' . preg_quote($search) . '#', $replace, $xoops_admin_menu_dv);
72
+    $new_xoops_admin_menu_dv = preg_replace('#'.preg_quote($search).'#', $replace, $xoops_admin_menu_dv);
73 73
 
74 74
     if ($xoops_admin_menu_dv == $new_xoops_admin_menu_dv) {
75 75
         return;
@@ -84,24 +84,24 @@  discard block
 block discarded – undo
84 84
     if ('altsys' != $dirname) {
85 85
         $blocksadmin_title = defined('_MD_A_MYMENU_MYBLOCKSADMIN') ? _MD_A_MYMENU_MYBLOCKSADMIN : 'blocksadmin';
86 86
 
87
-        $insert .= '<img src=\'' . XOOPS_URL . '/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\'' . XOOPS_URL . '/modules/' . $dirname . '/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin\'>' . $blocksadmin_title . '</a><br />' . "\n";
87
+        $insert .= '<img src=\''.XOOPS_URL.'/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\''.XOOPS_URL.'/modules/'.$dirname.'/admin/index.php?mode=admin&amp;lib=altsys&amp;page=myblocksadmin\'>'.$blocksadmin_title.'</a><br />'."\n";
88 88
     }
89 89
 
90 90
     // insert tplsadmin
91 91
 
92 92
     $db = XoopsDatabaseFactory::getDatabaseConnection();
93 93
 
94
-    [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_module='$dirname'"));
94
+    [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplfile')." WHERE tpl_module='$dirname'"));
95 95
 
96 96
     if ($count > 0) {
97 97
         $tplsadmin_title = defined('_MD_A_MYMENU_MYTPLSADMIN') ? _MD_A_MYMENU_MYTPLSADMIN : 'tplsadmin';
98 98
 
99
-        $insert = '<img src=\'' . XOOPS_URL . '/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\'' . XOOPS_URL . '/modules/' . $dirname . '/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin\'>' . $tplsadmin_title . '</a><br />' . "\n" . $insert;
99
+        $insert = '<img src=\''.XOOPS_URL.'/images/pointer.gif\' width=\'8\' height=\'8\' alt=\'\' />&nbsp;<a href=\''.XOOPS_URL.'/modules/'.$dirname.'/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin\'>'.$tplsadmin_title.'</a><br />'."\n".$insert;
100 100
     }
101 101
 
102 102
     // do insertion
103 103
 
104
-    $xoops_admin_menu_dv = preg_replace('#' . preg_quote($anchor) . '#', $anchor . $insert, $xoops_admin_menu_dv);
104
+    $xoops_admin_menu_dv = preg_replace('#'.preg_quote($anchor).'#', $anchor.$insert, $xoops_admin_menu_dv);
105 105
 
106 106
     // write back
107 107
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     // read
146 146
 
147 147
     if (!is_file(ALTSYS_ADMINMENU_FILE)) {
148
-        redirect_header(XOOPS_URL . '/admin.php', 1, 'Rebuild adminmenu');
148
+        redirect_header(XOOPS_URL.'/admin.php', 1, 'Rebuild adminmenu');
149 149
 
150 150
         exit;
151 151
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         // rebuild adminmenu
167 167
 
168
-        require_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
168
+        require_once XOOPS_ROOT_PATH.'/include/cp_functions.php';
169 169
 
170 170
         xoops_module_write_admin_menu(xoops_module_get_admin_menu());
171 171
 
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
     foreach ($mids as $mid) {
198 198
         $module = $module_handler->get($mid);
199 199
 
200
-        $new_menu_ft = preg_replace('#' . preg_quote($search) . '#', sprintf($replace_fmt, $module->getVar('name')), $xoops_admin_menu_ft[$mid]);
200
+        $new_menu_ft = preg_replace('#'.preg_quote($search).'#', sprintf($replace_fmt, $module->getVar('name')), $xoops_admin_menu_ft[$mid]);
201 201
 
202 202
         if ($is_left) {
203 203
             if ($mid == $last_mid) {
204
-                $xoops_admin_menu_ft[$mid] = $new_menu_ft . '</td><td>';
204
+                $xoops_admin_menu_ft[$mid] = $new_menu_ft.'</td><td>';
205 205
             } else {
206 206
                 $left_body = $new_menu_ft;
207 207
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 $xoops_admin_menu_ml[$mid] = str_replace(',105);', ',85);', $xoops_admin_menu_ml[$mid]);
211 211
             }
212 212
         } else {
213
-            $xoops_admin_menu_ft[$mid] = $left_body . '</td><td>' . $new_menu_ft;
213
+            $xoops_admin_menu_ft[$mid] = $left_body.'</td><td>'.$new_menu_ft;
214 214
 
215 215
             unset($xoops_admin_menu_ft[$left_key]);
216 216
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     // read
238 238
 
239 239
     if (!is_file(ALTSYS_ADMINMENU_FILE)) {
240
-        redirect_header(XOOPS_URL . '/admin.php', 1, 'Rebuild adminmenu');
240
+        redirect_header(XOOPS_URL.'/admin.php', 1, 'Rebuild adminmenu');
241 241
 
242 242
         exit;
243 243
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         // rebuild adminmenu
259 259
 
260
-        require_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
260
+        require_once XOOPS_ROOT_PATH.'/include/cp_functions.php';
261 261
 
262 262
         xoops_module_write_admin_menu(xoops_module_get_admin_menu());
263 263
 
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
     foreach ($mids as $mid) {
282 282
         $module = $module_handler->get($mid);
283 283
 
284
-        $xoops_admin_menu_ft[$mid] = preg_replace('/\<img src\=.*$/', $module->getVar('name') . '</a>', $xoops_admin_menu_ft[$mid]);
284
+        $xoops_admin_menu_ft[$mid] = preg_replace('/\<img src\=.*$/', $module->getVar('name').'</a>', $xoops_admin_menu_ft[$mid]);
285 285
 
286
-        $xoops_admin_menu_ft[$mid] = '<div style="text-align:' . _GLOBAL_LEFT . ';background-color:#CCC;" title="' . $module->getVar('dirname') . '">' . $xoops_admin_menu_ft[$mid] . '</div>';
286
+        $xoops_admin_menu_ft[$mid] = '<div style="text-align:'._GLOBAL_LEFT.';background-color:#CCC;" title="'.$module->getVar('dirname').'">'.$xoops_admin_menu_ft[$mid].'</div>';
287 287
 
288 288
         $xoops_admin_menu_ml[$mid] = str_replace(',105);', ',45);', $xoops_admin_menu_ml[$mid]);
289 289
     }
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     // read
306 306
 
307 307
     if (!is_file(ALTSYS_ADMINMENU_FILE)) {
308
-        redirect_header(XOOPS_URL . '/admin.php', 1, 'Rebuild adminmenu');
308
+        redirect_header(XOOPS_URL.'/admin.php', 1, 'Rebuild adminmenu');
309 309
 
310 310
         exit;
311 311
     }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
         // rebuild adminmenu
327 327
 
328
-        require_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
328
+        require_once XOOPS_ROOT_PATH.'/include/cp_functions.php';
329 329
 
330 330
         $fp = fopen(ALTSYS_ADMINMENU_FILE, 'wb');
331 331
 
@@ -358,10 +358,10 @@  discard block
 block discarded – undo
358 358
         if (preg_match('/popUpL\d+/', $xoops_admin_menu_ft[$mid], $regs)) {
359 359
             $popup = $regs[0];
360 360
 
361
-            preg_match_all('#\<a href.*' . $popup . '\(\).*\</a>#U', $xoops_admin_menu_dv, $regs);
361
+            preg_match_all('#\<a href.*'.$popup.'\(\).*\</a>#U', $xoops_admin_menu_dv, $regs);
362 362
 
363 363
             foreach ($regs[0] as $submenuitem) {
364
-                $submenuitems[] = str_replace($popup . '();', '', $submenuitem);
364
+                $submenuitems[] = str_replace($popup.'();', '', $submenuitem);
365 365
             }
366 366
         } else {
367 367
             return;
@@ -370,14 +370,14 @@  discard block
 block discarded – undo
370 370
         // module icon
371 371
 
372 372
         if (preg_match('#\<img .*/\>#U', $xoops_admin_menu_ft[$mid], $regs)) {
373
-            $icon_img = str_replace("alt=''", 'alt="' . $module->getVar('name') . '"', $regs[0]);
373
+            $icon_img = str_replace("alt=''", 'alt="'.$module->getVar('name').'"', $regs[0]);
374 374
         } else {
375 375
             $icon_img = '';
376 376
         }
377 377
 
378 378
         // version number
379 379
 
380
-        $icon_img .= '<span class="version" style="">' . sprintf('%.2f', $module->getVar('version') / 100.0) . '</span>';
380
+        $icon_img .= '<span class="version" style="">'.sprintf('%.2f', $module->getVar('version') / 100.0).'</span>';
381 381
 
382 382
         $newline = preg_replace('/ onmouseover.*$/', '', $xoops_admin_menu_ft[$mid]);
383 383
 
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
                     . '" style="display:none;"><ul>';
404 404
 
405 405
         foreach ($submenuitems as $submenuitem) {
406
-            $newline .= '<li>' . $submenuitem . '</li>';
406
+            $newline .= '<li>'.$submenuitem.'</li>';
407 407
         }
408 408
 
409
-        $newline .= '</ul>' . $icon_img . '</div>';
409
+        $newline .= '</ul>'.$icon_img.'</div>';
410 410
 
411 411
         $xoops_admin_menu_ft[$mid] = $newline;
412 412
     }
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
     echo "<?php\n// modified by altsys\nif( ! defined('XOOPS_ROOT_PATH') ) exit ;\n";
452 452
 
453 453
     foreach ($xoops_admin_vars as $key => $val) {
454
-        echo '$' . $key . " = \n";
454
+        echo '$'.$key." = \n";
455 455
 
456 456
         @var_export($val);
457 457
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/autoupdate_from_d3module.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,27 +14,27 @@
 block discarded – undo
14 14
 foreach ($tplsadmin_autoupdate_mydirnames as $tplsadmin_mydirname) {
15 15
     $tplsadmin_mydirname = preg_replace('/[^a-zA-Z0-9_-]/', '', $tplsadmin_mydirname);
16 16
 
17
-    require XOOPS_ROOT_PATH . '/modules/' . $tplsadmin_mydirname . '/mytrustdirname.php';
17
+    require XOOPS_ROOT_PATH.'/modules/'.$tplsadmin_mydirname.'/mytrustdirname.php';
18 18
 
19 19
     $altsys_mid_path = 'altsys' == $mytrustdirname ? '/libs/' : '/modules/';
20 20
 
21
-    $tplsadmin_autoupdate_path = XOOPS_TRUST_PATH . $altsys_mid_path . $mytrustdirname . '/templates';
21
+    $tplsadmin_autoupdate_path = XOOPS_TRUST_PATH.$altsys_mid_path.$mytrustdirname.'/templates';
22 22
 
23 23
     // modules
24 24
 
25
-    if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) {
25
+    if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) {
26 26
         while (false !== ($file = readdir($handler))) {
27
-            $file_path = $tplsadmin_autoupdate_path . '/' . $file;
27
+            $file_path = $tplsadmin_autoupdate_path.'/'.$file;
28 28
 
29 29
             if (is_file($file_path)) {
30 30
                 $mtime = (int)(@filemtime($file_path));
31 31
 
32
-                $tpl_file = $tplsadmin_mydirname . '_' . $file;
32
+                $tpl_file = $tplsadmin_mydirname.'_'.$file;
33 33
 
34
-                list($count) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($tpl_file) . "' AND tpl_lastmodified >= $mtime"));
34
+                list($count) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($tpl_file)."' AND tpl_lastmodified >= $mtime"));
35 35
 
36 36
                 if ($count <= 0) {
37
-                    include_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php';
37
+                    include_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php';
38 38
 
39 39
                     tplsadmin_import_data($xoopsConfig['template_set'], $tpl_file, implode('', file($file_path)), $mtime);
40 40
                 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/tpls_functions.php 1 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
2 2
 
3
-include_once XOOPS_ROOT_PATH . '/class/template.php';
4
-include_once __DIR__ . '/altsys_functions.php';
3
+include_once XOOPS_ROOT_PATH.'/class/template.php';
4
+include_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
-    list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='default' AND tpl_file='" . addslashes($tpl_file) . "'"));
19
+    list($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
-        list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset) . "' AND tpl_file='" . addslashes($tpl_file) . "'"));
28
+        list($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 (list($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 (list($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 || @include XOOPS_ROOT_PATH . '/modules/' . $dirname . '/mytrustdirname.php') {
243
+        $path = ALTSYS_TPLSADMIN_BASEPATH.'/'.mb_substr($tpl_file, mb_strlen($dirname) + 1);
244
+    } elseif ($mytrustdirname || @include 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)
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.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function __construct($params = [])
43 43
     {
44 44
         foreach ($params as $param => $value) {
45
-            $v = '_' . $param;
45
+            $v = '_'.$param;
46 46
 
47 47
             if (isset($this->$v)) {
48 48
                 $this->$v = $value;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $output .= $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block);
142 142
         }
143 143
 
144
-        return $output . $this->_endDiff();
144
+        return $output.$this->_endDiff();
145 145
     }
146 146
 
147 147
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             }
175 175
         }
176 176
 
177
-        return $output . $this->_endBlock();
177
+        return $output.$this->_endBlock();
178 178
     }
179 179
 
180 180
     /**
@@ -206,14 +206,14 @@  discard block
 block discarded – undo
206 206
     public function _blockHeader($xbeg, $xlen, $ybeg, $ylen)
207 207
     {
208 208
         if ($xlen > 1) {
209
-            $xbeg .= ',' . ($xbeg + $xlen - 1);
209
+            $xbeg .= ','.($xbeg + $xlen - 1);
210 210
         }
211 211
 
212 212
         if ($ylen > 1) {
213
-            $ybeg .= ',' . ($ybeg + $ylen - 1);
213
+            $ybeg .= ','.($ybeg + $ylen - 1);
214 214
         }
215 215
 
216
-        return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
216
+        return $xbeg.($xlen ? ($ylen ? 'c' : 'd') : 'a').$ybeg;
217 217
     }
218 218
 
219 219
     /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
     public function _startBlock($header)
225 225
     {
226
-        return $header . "\n";
226
+        return $header."\n";
227 227
     }
228 228
 
229 229
     /**
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     public function _lines($lines, $prefix = ' ')
245 245
     {
246
-        return $prefix . implode("\n$prefix", $lines) . "\n";
246
+        return $prefix.implode("\n$prefix", $lines)."\n";
247 247
     }
248 248
 
249 249
     /**
@@ -284,6 +284,6 @@  discard block
 block discarded – undo
284 284
 
285 285
     public function _changed($orig, $final)
286 286
     {
287
-        return $this->_deleted($orig) . "---\n" . $this->_added($final);
287
+        return $this->_deleted($orig)."---\n".$this->_added($final);
288 288
     }
289 289
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/include/admin_in_theme_functions.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         return $s;
47 47
     }
48 48
 
49
-    list($tmp_s, $tmp_after) = explode("<td width='1%' background='" . XOOPS_URL . "/modules/system/images/bg_content.gif'>", $tmp_s);
49
+    list($tmp_s, $tmp_after) = explode("<td width='1%' background='".XOOPS_URL."/modules/system/images/bg_content.gif'>", $tmp_s);
50 50
 
51 51
     if (empty($tmp_after)) {
52 52
         define('ALTSYS_DONT_USE_ADMIN_IN_THEME', 1);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         return $s;
55 55
     }
56 56
 
57
-    $xoops_admin_contents = $former_outputs . mb_substr(strrev(mb_strstr(strrev($tmp_s), strrev('</div>'))), 0, -6);
57
+    $xoops_admin_contents = $former_outputs.mb_substr(strrev(mb_strstr(strrev($tmp_s), strrev('</div>'))), 0, -6);
58 58
 
59 59
     return '';
60 60
 }
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 
89 89
     // language files
90 90
 
91
-    if (is_file(dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/admin_in_theme.php')) {
92
-        include_once dirname(__DIR__) . '/language/' . $xoopsConfig['language'] . '/admin_in_theme.php';
91
+    if (is_file(dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php')) {
92
+        include_once dirname(__DIR__).'/language/'.$xoopsConfig['language'].'/admin_in_theme.php';
93 93
     } else {
94
-        include_once dirname(__DIR__) . '/language/english/admin_in_theme.php';
94
+        include_once dirname(__DIR__).'/language/english/admin_in_theme.php';
95 95
     }
96 96
 
97 97
     // set the theme
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
 
105 105
     error_reporting($original_error_level & ~E_NOTICE);
106 106
 
107
-    if (is_file(XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/language/' . $xoopsConfig['language'] . '.php')) {
108
-        include_once XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/language/' . $xoopsConfig['language'] . '.php';
109
-    } elseif (is_file(XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/language/english.php')) {
110
-        include_once XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/language/english.php';
107
+    if (is_file(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php')) {
108
+        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/'.$xoopsConfig['language'].'.php';
109
+    } elseif (is_file(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php')) {
110
+        include_once XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/english.php';
111 111
     }
112 112
 
113 113
     error_reporting($original_error_level);
114 114
 
115
-    include __DIR__ . '/admin_in_theme_header.inc.php';
115
+    include __DIR__.'/admin_in_theme_header.inc.php';
116 116
 
117 117
     /*  // include adminmenu
118 118
         include XOOPS_CACHE_PATH.'/adminmenu.php' ;
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
     $xoops_module_header = '';
153 153
 
154 154
     if (ALTSYS_CORE_TYPE_XCL21 == altsys_get_core_type()) {
155
-        $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/modules/legacyRender/admin/css.php?file=style.css" />' . "\n";
155
+        $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=style.css" />'."\n";
156 156
 
157 157
         if (is_object(@$xoopsModule)) {
158
-            $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/modules/legacyRender/admin/css.php?file=module.css&amp;dirname=' . $xoopsModule->getVar('dirname') . '" />' . "\n";
158
+            $xoops_module_header .= '<link rel="stylesheet" type="text/css" media="all" href="'.XOOPS_URL.'/modules/legacyRender/admin/css.php?file=module.css&amp;dirname='.$xoopsModule->getVar('dirname').'" />'."\n";
159 159
         }
160 160
     }
161 161
 
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 
164 164
     $xoopsTpl->assign([
165 165
                           'xoops_theme' => $xoopsConfig['theme_set'],
166
-                          'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/',
166
+                          'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/',
167 167
                           'xoops_themecss' => xoops_getcss($xoopsConfig['theme_set']),
168 168
                           'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES),
169 169
                           'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES),
170 170
                           'xoops_showlblock' => 1,
171 171
                           //        'xoops_js' => '//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript" src="'.XOOPS_URL.'/include/layersmenu.js"></script><script type="text/javascript"><!--'."\n".$xoops_admin_menu_js ,
172
-                          'xoops_js' => '//--></script><script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script><script type="text/javascript"><!--' . "\n",
172
+                          'xoops_js' => '//--></script><script type="text/javascript" src="'.XOOPS_URL.'/include/xoops.js"></script><script type="text/javascript"><!--'."\n",
173 173
                           'xoops_runs_admin_side' => 1,
174 174
                           'xoops_breadcrumbs' => $xoops_breadcrumbs,
175 175
                           'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES),
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
     // rendering
181 181
 
182
-    $xoopsTpl->display($xoopsConfig['theme_set'] . '/theme.html');
182
+    $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html');
183 183
 
184 184
     // for XOOPS 2.0.14/15/16 from xoops.org
185 185
 
Please login to merge, or discard this patch.