Completed
Push — master ( b949bb...b4f428 )
by Michael
01:58
created
xoops_trust_path/libs/altsys/include/Text_Diff_Renderer.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     }
146 146
 
147 147
     /**
148
-     * @param $xbeg
149
-     * @param $xlen
150
-     * @param $ybeg
151
-     * @param $ylen
148
+     * @param integer $xbeg
149
+     * @param integer $xlen
150
+     * @param integer $ybeg
151
+     * @param integer $ylen
152 152
      * @param $edits
153 153
      * @return string
154 154
      */
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     }
218 218
 
219 219
     /**
220
-     * @param $header
220
+     * @param string $header
221 221
      * @return string
222 222
      */
223 223
 
Please login to merge, or discard this 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/Text_Diff_Renderer_inline.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-     * @param        $lines
88
+     * @param        string[] $lines
89 89
      * @param string $prefix
90 90
      * @param bool   $encode
91 91
      * @return string
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
     }
189 189
 
190 190
     /**
191
-     * @param        $string
192
-     * @param string $newlineEscape
191
+     * @param        string $string
192
+     * @param string string
193 193
      * @return array
194 194
      */
195 195
 
Please login to merge, or discard this 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/put_templates.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //                        GIJOE <http://www.peak.ne.jp/>                     //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-include_once __DIR__ . '/include/gtickets.php';
9
-include_once __DIR__ . '/include/altsys_functions.php';
10
-include_once __DIR__ . '/include/tpls_functions.php';
8
+include_once __DIR__.'/include/gtickets.php';
9
+include_once __DIR__.'/include/altsys_functions.php';
10
+include_once __DIR__.'/include/tpls_functions.php';
11 11
 
12 12
 // this page can be called only from altsys
13 13
 if ('altsys' != $xoopsModule->getVar('dirname')) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 if ('.zip' == mb_strtolower(mb_substr($orig_filename4check, -4))) {
43 43
     // zip
44 44
 
45
-    require_once __DIR__ . '/include/Archive_Zip.php';
45
+    require_once __DIR__.'/include/Archive_Zip.php';
46 46
 
47 47
     $reader = new Archive_Zip($_FILES['tplset_archive']['tmp_name']);
48 48
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 } elseif ('.tgz' == mb_substr($orig_filename4check, -4) || '.tar.gz' == mb_substr($orig_filename4check, -7)) {
57 57
     // tar.gz
58 58
 
59
-    require_once XOOPS_ROOT_PATH . '/class/class.tar.php';
59
+    require_once XOOPS_ROOT_PATH.'/class/class.tar.php';
60 60
 
61 61
     $tar = new tar();
62 62
 
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   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <http://www.peak.ne.jp/>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-include_once __DIR__ . '/include/gtickets.php';
10
-include_once __DIR__ . '/include/altsys_functions.php';
11
-include_once __DIR__ . '/include/tpls_functions.php';
12
-include_once __DIR__ . '/include/Text_Diff.php';
13
-include_once __DIR__ . '/include/Text_Diff_Renderer.php';
14
-include_once __DIR__ . '/include/Text_Diff_Renderer_unified.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+include_once __DIR__.'/include/gtickets.php';
10
+include_once __DIR__.'/include/altsys_functions.php';
11
+include_once __DIR__.'/include/tpls_functions.php';
12
+include_once __DIR__.'/include/Text_Diff.php';
13
+include_once __DIR__.'/include/Text_Diff_Renderer.php';
14
+include_once __DIR__.'/include/Text_Diff_Renderer_unified.php';
15 15
 
16 16
 // only groups have 'module_admin' of 'altsys' can do that.
17 17
 $module_handler = 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 (list($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 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) . ' : ' . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES) . ' (' . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES) . ")</h3>\n";
228
+echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>"._MD_A_MYTPLSFORM_EDIT.' : '.htmlspecialchars($tpl['tpl_type'], ENT_QUOTES).' : '.htmlspecialchars($tpl['tpl_file'], ENT_QUOTES).' ('.htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES).")</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
-    list($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
+    list($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) . '&amp;tpl_tplset=' . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES) . '&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) . '</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).'&amp;tpl_tplset='.htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES).'&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).'</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) . "' 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)."' 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/get_templates.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 error_reporting(0);
9 9
 
10
-include_once __DIR__ . '/include/gtickets.php';
11
-include_once __DIR__ . '/include/altsys_functions.php';
10
+include_once __DIR__.'/include/gtickets.php';
11
+include_once __DIR__.'/include/altsys_functions.php';
12 12
 
13 13
 // this page can be called only from altsys
14 14
 if ('altsys' != $xoopsModule->getVar('dirname')) {
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 altsys_include_language_file('compilehookadmin');
20 20
 
21 21
 if (!empty($_POST['download_zip'])) {
22
-    require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php';
22
+    require_once XOOPS_ROOT_PATH.'/class/zipdownloader.php';
23 23
 
24 24
     $downloader = new XoopsZipDownloader();
25 25
 
26 26
     $do_download = true;
27 27
 } elseif (!empty($_POST['download_tgz'])) {
28
-    require_once XOOPS_ROOT_PATH . '/class/tardownloader.php';
28
+    require_once XOOPS_ROOT_PATH.'/class/tardownloader.php';
29 29
 
30 30
     $downloader = new XoopsTarDownloader();
31 31
 
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
         break;
52 52
     }
53 53
 }
54
-$trs = $xoopsDB->query('SELECT DISTINCT tpl_file,tpl_source,tpl_lastmodified FROM ' . $xoopsDB->prefix('tplfile') . ' NATURAL LEFT JOIN ' . $xoopsDB->prefix('tplsource') . " WHERE tpl_tplset='" . addslashes($tplset) . "' ORDER BY tpl_file");
54
+$trs = $xoopsDB->query('SELECT DISTINCT tpl_file,tpl_source,tpl_lastmodified FROM '.$xoopsDB->prefix('tplfile').' NATURAL LEFT JOIN '.$xoopsDB->prefix('tplsource')." WHERE tpl_tplset='".addslashes($tplset)."' ORDER BY tpl_file");
55 55
 if ($xoopsDB->getRowsNum($trs) <= 0) {
56 56
     die(_TPLSADMIN_ERR_INVALIDTPLSET);
57 57
 }
58 58
 
59 59
 while (list($tpl_file, $tpl_source, $tpl_lastmodified) = $xoopsDB->fetchRow($trs)) {
60
-    $downloader->addFileData($tpl_source, $tplset . '/' . $tpl_file, $tpl_lastmodified);
60
+    $downloader->addFileData($tpl_source, $tplset.'/'.$tpl_file, $tpl_lastmodified);
61 61
 }
62 62
 //bugfix by nao-pon ,echo is not necessary for downloader
63
-$downloader->download('template_' . $tplset, true);
63
+$downloader->download('template_'.$tplset, true);
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/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/adminmenu_functions.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
     // write back
107 107
 
108 108
     altsys_adminmenu_save_x20([
109
-                                  'xoops_admin_menu_js' => $xoops_admin_menu_js,
110
-                                  'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
111
-                                  'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
112
-                                  'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
113
-                                  'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
114
-                                  'altsys_adminmenu_ft_hacked' => (int)(@$altsys_adminmenu_ft_hacked),
115
-                                  'altsys_adminmenu_dv_updated' => true,
116
-                              ]);
109
+                                    'xoops_admin_menu_js' => $xoops_admin_menu_js,
110
+                                    'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
111
+                                    'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
112
+                                    'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
113
+                                    'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
114
+                                    'altsys_adminmenu_ft_hacked' => (int)(@$altsys_adminmenu_ft_hacked),
115
+                                    'altsys_adminmenu_dv_updated' => true,
116
+                                ]);
117 117
 }
118 118
 
119 119
 //
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
     // write back
224 224
 
225 225
     altsys_adminmenu_save_x20([
226
-                                  'xoops_admin_menu_js' => $xoops_admin_menu_js,
227
-                                  'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
228
-                                  'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
229
-                                  'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
230
-                                  'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
231
-                                  'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_2COL,
232
-                              ]);
226
+                                    'xoops_admin_menu_js' => $xoops_admin_menu_js,
227
+                                    'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
228
+                                    'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
229
+                                    'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
230
+                                    'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
231
+                                    'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_2COL,
232
+                                ]);
233 233
 }
234 234
 
235 235
 function altsys_adminmenu_hack_ft_noimg_x20()
@@ -291,13 +291,13 @@  discard block
 block discarded – undo
291 291
     // write back
292 292
 
293 293
     altsys_adminmenu_save_x20([
294
-                                  'xoops_admin_menu_js' => $xoops_admin_menu_js,
295
-                                  'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
296
-                                  'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
297
-                                  'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
298
-                                  'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
299
-                                  'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_NOIMG,
300
-                              ]);
294
+                                    'xoops_admin_menu_js' => $xoops_admin_menu_js,
295
+                                    'xoops_admin_menu_ml' => $xoops_admin_menu_ml,
296
+                                    'xoops_admin_menu_sd' => $xoops_admin_menu_sd,
297
+                                    'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
298
+                                    'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
299
+                                    'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_NOIMG,
300
+                                ]);
301 301
 }
302 302
 
303 303
 function altsys_adminmenu_hack_ft_xcsty_x20()
@@ -426,13 +426,13 @@  discard block
 block discarded – undo
426 426
     // write back
427 427
 
428 428
     altsys_adminmenu_save_x20([
429
-                                  'xoops_admin_menu_js' => $xoops_admin_menu_js,
430
-                                  'xoops_admin_menu_ml' => [],
431
-                                  'xoops_admin_menu_sd' => [],
432
-                                  'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
433
-                                  'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
434
-                                  'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_XCSTY,
435
-                              ]);
429
+                                    'xoops_admin_menu_js' => $xoops_admin_menu_js,
430
+                                    'xoops_admin_menu_ml' => [],
431
+                                    'xoops_admin_menu_sd' => [],
432
+                                    'xoops_admin_menu_ft' => $xoops_admin_menu_ft,
433
+                                    'xoops_admin_menu_dv' => $xoops_admin_menu_dv,
434
+                                    'altsys_adminmenu_ft_hacked' => ALTSYS_ADMINMENU_HACK_XCSTY,
435
+                                ]);
436 436
 }
437 437
 
438 438
 //
Please login to merge, or discard this 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.