Passed
Push — master ( 48d769...5ccf6e )
by Michael
07:14
created
include/class_eq_pie.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 
115 115
             $piePart = $value[1];
116 116
             if (isset($this->total) && $this->total > 0) {
117
-                $piePart100 = round($piePart / $this->total * 100, 2);  // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
117
+                $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
118 118
             } else {
119 119
                 $piePart100 = 0;
120 120
             }
121 121
 
122
-            $piePart360 = $piePart100 * 3.6;                    // in degrees
122
+            $piePart360 = $piePart100 * 3.6; // in degrees
123 123
 
124 124
             $colR      = hexdec(substr($value[2], 1, 2));
125 125
             $colG      = hexdec(substr($value[2], 3, 2));
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
         foreach ($EQpieData as $i => $value) {
147 147
             $piePart = $value[1];
148 148
             if (isset($this->total) && $this->total > 0) {
149
-                $piePart100 = round($piePart / $this->total * 100, 2);  // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
149
+                $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
150 150
             } else {
151 151
                 $piePart100 = 0;
152 152
             }
153
-            $piePart360 = $piePart100 * 3.6;                    // in degrees
153
+            $piePart360 = $piePart100 * 3.6; // in degrees
154 154
 
155 155
             $colR      = hexdec(substr($value[2], 1, 2));
156 156
             $colG      = hexdec(substr($value[2], 3, 2));
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             foreach ($EQpieData as $i => $value) {
194 194
                 $piePart = $value[1];
195 195
                 if (isset($this->total) && $this->total > 0) {
196
-                    $piePart100 = round($piePart / $this->total * 100, 2);  // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
196
+                    $piePart100 = round($piePart / $this->total * 100, 2); // value in percentage, the rounding and * 100 for extra accuracy for pie w/o gaps
197 197
                 } else {
198 198
                     $piePart100 = 0;
199 199
                 }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 imagefilledrectangle($legendImage, 5, $yOffset + 2, 5 + $box_width, $yOffset + $box_height + 2, $PartColor);
206 206
                 imagerectangle($legendImage, 5, $yOffset + 2, 5 + $box_width, $yOffset + $box_height + 2, $borderColor);
207 207
 
208
-                $text = $value[0] . ' ' . $piePart100 . '%';
208
+                $text = $value[0].' '.$piePart100.'%';
209 209
                 imagestring($legendImage, 2, '20', $yOffset, $text, $textColor);
210 210
                 $yOffset += 15;
211 211
             }
Please login to merge, or discard this patch.
include/color.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,8 +216,8 @@
 block discarded – undo
216 216
      */
217 217
     public function changeLightness($degree = 10)
218 218
     {
219
-        $color1 =& $this->color1;
220
-        $color2 =& $this->color2;
219
+        $color1 = & $this->color1;
220
+        $color2 = & $this->color2;
221 221
 
222 222
         for ($x = 0; $x < 3; ++$x) {
223 223
             if (($color1[$x] + $degree) < 256) {
Please login to merge, or discard this patch.
tools.php 3 patches
Switch Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -68,107 +68,107 @@
 block discarded – undo
68 68
 }
69 69
 
70 70
 switch ($op) {
71
-    case 'lang':
72
-        lang();
73
-        break;
74
-    case 'langsave':
75
-        langsave();
76
-        break;
77
-    case 'colours':
78
-        colours();
79
-        break;
80
-    case 'savecolours':
81
-        savecolours();
82
-        break;
83
-    case 'settings':
84
-        settings();
85
-        break;
86
-    case 'settingssave':
87
-        settingssave();
88
-        break;
89
-    case 'pro':
90
-        pro();
91
-        break;
92
-    case 'userfields':
93
-        userfields($field);
94
-        $uf = true;
95
-        break;
96
-    case 'listuserfields':
97
-        listuserfields();
98
-        $uf = true;
99
-        break;
100
-    case 'togglelocked':
101
-        togglelocked($field);
102
-        break;
103
-    case 'fieldmove':
104
-        fieldmove($field, $_GET['move']);
105
-        break;
106
-    case 'deluserfield':
107
-        deluserfield($_GET['id']);
108
-        break;
109
-    case 'restoreuserfield':
110
-        restoreuserfield($_GET['id']);
111
-        break;
112
-    case 'editlookup':
113
-        editlookup($_GET['id']);
114
-        break;
115
-    case 'lookupmove':
116
-        lookupmove($field, $_GET['id'], $_GET['move']);
117
-        break;
118
-    case 'dellookupvalue':
119
-        dellookupvalue($field, $_GET['id']);
120
-        break;
121
-    case 'addlookupvalue':
122
-        addlookupvalue($field);
123
-        break;
124
-    case 'editlookupvalue':
125
-        editlookupvalue($field, $_GET['id']);
126
-        break;
127
-    case 'savelookupvalue':
128
-        savelookupvalue($field, $_GET['id']);
129
-        break;
130
-    case 'deleted':
131
-        deleted();
132
-        break;
133
-    case 'delperm':
134
-        delperm($_GET['id']);
135
-        break;
136
-    case 'delall':
137
-        delall();
138
-        break;
139
-    case 'restore':
140
-        restore($_GET['id']);
141
-        break;
142
-    case 'database':
143
-        database();
144
-        $db = true;
145
-        break;
146
-    case 'userq':
147
-        userq();
148
-        $db = true;
149
-        break;
150
-    case 'userqrun':
151
-        userqrun($_GET['f']);
152
-        $db = true;
153
-        break;
154
-    case 'dbanc':
155
-        database_oa();
156
-        $db = true;
157
-        break;
158
-    case 'fltypar':
159
-        database_fp();
160
-        $db = true;
161
-        break;
162
-    case 'credits':
163
-        credits();
164
-        break;
165
-    case 'index':
166
-        index();
167
-        break;
168
-    default :
169
-        userfields();
170
-        $uf = true;
171
-        break;
71
+        case 'lang':
72
+            lang();
73
+            break;
74
+        case 'langsave':
75
+            langsave();
76
+            break;
77
+        case 'colours':
78
+            colours();
79
+            break;
80
+        case 'savecolours':
81
+            savecolours();
82
+            break;
83
+        case 'settings':
84
+            settings();
85
+            break;
86
+        case 'settingssave':
87
+            settingssave();
88
+            break;
89
+        case 'pro':
90
+            pro();
91
+            break;
92
+        case 'userfields':
93
+            userfields($field);
94
+            $uf = true;
95
+            break;
96
+        case 'listuserfields':
97
+            listuserfields();
98
+            $uf = true;
99
+            break;
100
+        case 'togglelocked':
101
+            togglelocked($field);
102
+            break;
103
+        case 'fieldmove':
104
+            fieldmove($field, $_GET['move']);
105
+            break;
106
+        case 'deluserfield':
107
+            deluserfield($_GET['id']);
108
+            break;
109
+        case 'restoreuserfield':
110
+            restoreuserfield($_GET['id']);
111
+            break;
112
+        case 'editlookup':
113
+            editlookup($_GET['id']);
114
+            break;
115
+        case 'lookupmove':
116
+            lookupmove($field, $_GET['id'], $_GET['move']);
117
+            break;
118
+        case 'dellookupvalue':
119
+            dellookupvalue($field, $_GET['id']);
120
+            break;
121
+        case 'addlookupvalue':
122
+            addlookupvalue($field);
123
+            break;
124
+        case 'editlookupvalue':
125
+            editlookupvalue($field, $_GET['id']);
126
+            break;
127
+        case 'savelookupvalue':
128
+            savelookupvalue($field, $_GET['id']);
129
+            break;
130
+        case 'deleted':
131
+            deleted();
132
+            break;
133
+        case 'delperm':
134
+            delperm($_GET['id']);
135
+            break;
136
+        case 'delall':
137
+            delall();
138
+            break;
139
+        case 'restore':
140
+            restore($_GET['id']);
141
+            break;
142
+        case 'database':
143
+            database();
144
+            $db = true;
145
+            break;
146
+        case 'userq':
147
+            userq();
148
+            $db = true;
149
+            break;
150
+        case 'userqrun':
151
+            userqrun($_GET['f']);
152
+            $db = true;
153
+            break;
154
+        case 'dbanc':
155
+            database_oa();
156
+            $db = true;
157
+            break;
158
+        case 'fltypar':
159
+            database_fp();
160
+            $db = true;
161
+            break;
162
+        case 'credits':
163
+            credits();
164
+            break;
165
+        case 'index':
166
+            index();
167
+            break;
168
+        default :
169
+            userfields();
170
+            $uf = true;
171
+            break;
172 172
 }
173 173
 
174 174
 //create tools array
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -395,9 +395,9 @@  discard block
 block discarded – undo
395 395
             $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" . "<td>&nbsp;</td>\n";
396 396
         } else { //other rows
397 397
             $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>"
398
-                     . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n"
399
-                     . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n"
400
-                     . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n";
398
+                        . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n"
399
+                        . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n"
400
+                        . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n";
401 401
         }
402 402
         $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>" . "<img src='images/delete.png' alt='delete field'></a>&nbsp;" . "<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n";
403 403
         //can the filed be shown in a list
@@ -567,33 +567,33 @@  discard block
 block discarded – undo
567 567
         $form .= "  <tr>\n";
568 568
         if (0 == $count) { //first row
569 569
             $form .= "    <td style='width: 15px;'>&nbsp;</td>\n"
570
-                     . "    <td style='width: 15px;'>\n"
571
-                     . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n"
572
-                     . "    </td>\n"
573
-                     . "    <td>\n"
574
-                     . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n"
575
-                     . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
576
-                     . "    </td>\n";
570
+                        . "    <td style='width: 15px;'>\n"
571
+                        . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n"
572
+                        . "    </td>\n"
573
+                        . "    <td>\n"
574
+                        . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n"
575
+                        . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
576
+                        . "    </td>\n";
577 577
         } elseif ($count == $numrows - 1) { //last row
578 578
             $form .= "    <td>\n"
579
-                     . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n"
580
-                     . "    </td>\n"
581
-                     . "    <td>&nbsp;</td>\n"
582
-                     . "    <td>\n"
583
-                     . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='assets/images/delete.png'></a>\n"
584
-                     . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
585
-                     . "    </td>\n";
579
+                        . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n"
580
+                        . "    </td>\n"
581
+                        . "    <td>&nbsp;</td>\n"
582
+                        . "    <td>\n"
583
+                        . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='assets/images/delete.png'></a>\n"
584
+                        . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
585
+                        . "    </td>\n";
586 586
         } else { //other rows
587 587
             $form .= "    <td>\n"
588
-                     . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n"
589
-                     . "    </td>\n"
590
-                     . "    <td>\n"
591
-                     . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n"
592
-                     . "    </td>\n"
593
-                     . "    <td>\n"
594
-                     . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n"
595
-                     . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
596
-                     . "    </td>\n";
588
+                        . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=up'><img src='assets/images/up.gif'></a>\n"
589
+                        . "    </td>\n"
590
+                        . "    <td>\n"
591
+                        . "      <a href='tools.php?op=lookupmove&field={$field}&id={$row['id']}&move=down'><img src='assets/images/down.gif'></a>\n"
592
+                        . "    </td>\n"
593
+                        . "    <td>\n"
594
+                        . "      <a href='tools.php?op=dellookupvalue&field={$field}&id={$row['id']}'><img src='images/delete.png'></a>\n"
595
+                        . "      &nbsp;<a href='tools.php?op=editlookupvalue&field={$field}&id={$row['id']}'>{$row['value']}</a>\n"
596
+                        . "    </td>\n";
597 597
         }
598 598
         $form .= "</tr>\n";
599 599
         ++$count;
Please login to merge, or discard this patch.
Spacing   +134 added lines, -134 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 
26 26
 //require_once  dirname(dirname(__DIR__)) . '/mainfile.php';
27
-require_once __DIR__ . '/header.php';
27
+require_once __DIR__.'/header.php';
28 28
 $moduleDirName = basename(__DIR__);
29 29
 xoops_loadLanguage('main', $moduleDirName);
30 30
 $helper = Pedigree\Helper::getInstance();
@@ -34,23 +34,23 @@  discard block
 block discarded – undo
34 34
 include $GLOBALS['xoops']->path('/header.php');
35 35
 
36 36
 // Include any common code for this module.
37
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
37
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
38 38
 
39 39
 //check for access
40 40
 $xoopsModule = XoopsModule::getByDirname($moduleDirName);
41 41
 if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) {
42
-    redirect_header('index.php', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST);
42
+    redirect_header('index.php', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST);
43 43
 }
44 44
 
45
-$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
45
+$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js');
46 46
 //$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.ThickBox/thickbox-compressed.js');
47 47
 
48
-$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.magnific-popup.min.js');
49
-$xoTheme->addScript(PEDIGREE_URL . '/assets/js/colpick.js');
48
+$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.magnific-popup.min.js');
49
+$xoTheme->addScript(PEDIGREE_URL.'/assets/js/colpick.js');
50 50
 
51
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/colpick.css');
52
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/magnific-popup.css');
53
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/style.css');
51
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/colpick.css');
52
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/magnific-popup.css');
53
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/style.css');
54 54
 
55 55
 global $field;
56 56
 //add JS routines
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 $GLOBALS['xoopsTpl']->assign('tools', $tools);
202 202
 
203 203
 //footer
204
-include XOOPS_ROOT_PATH . '/footer.php';
204
+include XOOPS_ROOT_PATH.'/footer.php';
205 205
 
206 206
 function index()
207 207
 {
@@ -260,26 +260,26 @@  discard block
 block discarded – undo
260 260
     </script>
261 261
 
262 262
     <?php
263
-    $form = _MA_PEDIGREE_BGCOLOR . '<br><br>';
263
+    $form = _MA_PEDIGREE_BGCOLOR.'<br><br>';
264 264
     $form .= '<FORM NAME="myForm" action=\'tools.php?op=savecolours\' method=\'POST\'>
265 265
 <table>
266 266
 
267 267
 <!--
268
-    <tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td><INPUT TYPE="text" id="text" name="text" value="' . $text . '" size="11" maxlength="7">
268
+    <tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td><INPUT TYPE="text" id="text" name="text" value="'.$text.'" size="11" maxlength="7">
269 269
     <a href="TCP.popup(document.forms[\'myForm\'].elements[\'text\'])">
270 270
     <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr>
271 271
 
272 272
 
273
-    <tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td><INPUT TYPE="text" id="actlink" name="actlink" value="' . $actlink . '" size="11" maxlength="7">
273
+    <tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td><INPUT TYPE="text" id="actlink" name="actlink" value="'.$actlink.'" size="11" maxlength="7">
274 274
     <a href="TCP.popup(document.forms[\'myForm\'].elements[\'actlink\'])">
275 275
     <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr>
276 276
 
277 277
 
278
-    <tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td><INPUT TYPE="text" id="even" name="even" value="' . $even . '" size="11" maxlength="7">
278
+    <tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td><INPUT TYPE="text" id="even" name="even" value="'.$even.'" size="11" maxlength="7">
279 279
     <a href="TCP.popup(document.forms[\'myForm\'].elements[\'even\'])">
280 280
     <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr>
281 281
 
282
-    <tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td><INPUT TYPE="text" id="body" name="body" value="' . $body . '" size="11" maxlength="7">
282
+    <tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td><INPUT TYPE="text" id="body" name="body" value="'.$body.'" size="11" maxlength="7">
283 283
     <a href="TCP.popup(document.forms[\'myForm\'].elements[\'body\'])">
284 284
     <img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="assets/images/sel.gif"></a></td></tr>
285 285
 
@@ -287,36 +287,36 @@  discard block
 block discarded – undo
287 287
 
288 288
 <!--
289 289
 
290
-    <tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td>#<input type="text" id="picker" name="text" value="' . $text . '" size="11" maxlength="7">
290
+    <tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td>#<input type="text" id="picker" name="text" value="'.$text.'" size="11" maxlength="7">
291 291
     </td></tr>
292 292
 
293
-    <tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td>#<input type="text" id="picker" name="actlink" value="' . $actlink . '" size="11" maxlength="7">
293
+    <tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td>#<input type="text" id="picker" name="actlink" value="'.$actlink.'" size="11" maxlength="7">
294 294
     </td></tr>
295 295
 
296
-    <tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td>#<input type="text" id="picker" name="even" value="' . $even . '" size="11" maxlength="7">
296
+    <tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td>#<input type="text" id="picker" name="even" value="'.$even.'" size="11" maxlength="7">
297 297
     </td></tr>
298 298
 
299
-        <tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td>#<input type="text" id="picker" name="body" value="' . $body . '" size="11" maxlength="7">
299
+        <tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td>#<input type="text" id="picker" name="body" value="'.$body.'" size="11" maxlength="7">
300 300
     </td></tr>
301 301
 
302 302
 -->
303 303
 
304
-<tr><td>' . _MA_PEDIGREE_TXT_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="text" maxlength="7" size="7" id="colorpickerField1" value="' . $text . '">
304
+<tr><td>' . _MA_PEDIGREE_TXT_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="text" maxlength="7" size="7" id="colorpickerField1" value="'.$text.'">
305 305
 </td></tr>
306 306
 
307 307
 
308
-<tr><td>' . _MA_PEDIGREE_LINK_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="actlink" maxlength="7" size="7" id="colorpickerField1" value="' . $actlink . '">
308
+<tr><td>' . _MA_PEDIGREE_LINK_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="actlink" maxlength="7" size="7" id="colorpickerField1" value="'.$actlink.'">
309 309
 </td></tr>
310 310
 
311 311
 
312
-<tr><td>' . _MA_PEDIGREE_BACK1_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="even" maxlength="7" size="7" id="colorpickerField1" value="' . $even . '">
312
+<tr><td>' . _MA_PEDIGREE_BACK1_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="even" maxlength="7" size="7" id="colorpickerField1" value="'.$even.'">
313 313
 </td></tr>
314 314
 
315 315
 
316
-<tr><td>' . _MA_PEDIGREE_BACK2_COLOR . '</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="body" maxlength="7" size="7" id="colorpickerField1" value="' . $body . '">
316
+<tr><td>' . _MA_PEDIGREE_BACK2_COLOR.'</td><td><input class="color {hash:true,caps:false}" onMouseOver="changeTextColor(\'back4\', this.value)" type="text" name="body" maxlength="7" size="7" id="colorpickerField1" value="'.$body.'">
317 317
 </td></tr>
318 318
 
319
-    <tr><td><INPUT TYPE="submit" value="' . _MA_PEDIGREE_SUBMIT_BUTTON . '"></td><td>&nbsp;</td></tr>
319
+    <tr><td><INPUT TYPE="submit" value="' . _MA_PEDIGREE_SUBMIT_BUTTON.'"></td><td>&nbsp;</td></tr>
320 320
 
321 321
     </table>
322 322
 
@@ -338,8 +338,8 @@  discard block
 block discarded – undo
338 338
 {
339 339
     $color = new \XoopsModules\Pedigree\ImageColor();
340 340
     //create darker link hover colour
341
-    $actLink = Request::getString('actlink', '', 'POST');  //active link color in hex
342
-    $even    = Request::getString('even', '', 'POST');     // even color in hex
341
+    $actLink = Request::getString('actlink', '', 'POST'); //active link color in hex
342
+    $even    = Request::getString('even', '', 'POST'); // even color in hex
343 343
     $text    = Request::getString('text', '', 'POST');
344 344
     $body    = Request::getString('body', '', 'POST');
345 345
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     $col = "{$actLink};{$even};#{$female};{$text};#{$dark};#{$head};{$body};{$actLink}";
359 359
 
360 360
     //  $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '{$col}' WHERE conf_name = 'colourscheme'";
361
-    $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $GLOBALS['xoopsDB']->escape($col) . "' WHERE conf_name = 'colourscheme'";
361
+    $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '".$GLOBALS['xoopsDB']->escape($col)."' WHERE conf_name = 'colourscheme'";
362 362
     $GLOBALS['xoopsDB']->query($query);
363 363
     redirect_header('tools.php?op=colours', 1, 'Your settings have been saved.');
364 364
 }
@@ -373,12 +373,12 @@  discard block
 block discarded – undo
373 373
 {
374 374
     global $form;
375 375
     $form .= _MA_PEDIGREE_FIELD_EXPLAIN4;
376
-    $sql     = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
376
+    $sql     = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '1' ORDER BY `order`";
377 377
     $result  = $GLOBALS['xoopsDB']->query($sql);
378 378
     $numrows = $GLOBALS['xoopsDB']->getRowsNum($result);
379 379
     $count   = 0;
380 380
     $form .= _MA_PEDIGREE_FIELD_FORM1;
381
-    $form    .= "<tr ><td colspan='7'><hr></td></tr>";
381
+    $form .= "<tr ><td colspan='7'><hr></td></tr>";
382 382
     $mark = "<td><span style='font-weight: bold;'>X</span></td>\n";
383 383
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
384 384
         $form .= "<tr>\n";
@@ -390,16 +390,16 @@  discard block
 block discarded – undo
390 390
         }
391 391
 
392 392
         if (0 == $count) { //first row
393
-            $form .= "<td style='width: 15px;'>&nbsp;</td><td style='width: 15px;'><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>" . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n";
393
+            $form .= "<td style='width: 15px;'>&nbsp;</td><td style='width: 15px;'><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>"."<img src='assets/images/down.gif' alt='move field down'></a></td>\n";
394 394
         } elseif ($count == $numrows - 1) { //last row
395
-            $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>" . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n" . "<td>&nbsp;</td>\n";
395
+            $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>"."<img src='assets/images/up.gif' alt='move field up'></a></td>\n"."<td>&nbsp;</td>\n";
396 396
         } else { //other rows
397 397
             $form .= "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=up'>"
398 398
                      . "<img src='assets/images/up.gif' alt='move field up'></a></td>\n"
399 399
                      . "<td><a href='tools.php?op=fieldmove&field={$row['id']}&move=down'>\n"
400 400
                      . "<img src='assets/images/down.gif' alt='move field down'></a></td>\n";
401 401
         }
402
-        $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>" . "<img src='images/delete.png' alt='delete field'></a>&nbsp;" . "<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n";
402
+        $form .= "<td><a href='tools.php?op=deluserfield&id={$row['id']}'>"."<img src='images/delete.png' alt='delete field'></a>&nbsp;"."<a href='tools.php?op=userfields&field={$row['id']}'>{$row['fieldName']}</a></td>\n";
403 403
         //can the filed be shown in a list
404 404
         if (1 == $row['ViewInList']) {
405 405
             $form .= $mark;
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         }
415 415
         //has lookuptable ?
416 416
         if (1 == $row['LookupTable']) {
417
-            $form .= "<td><a href='tools.php?op=editlookup&id={$row['id']}'>" . _EDIT . "</a></td>\n";
417
+            $form .= "<td><a href='tools.php?op=editlookup&id={$row['id']}'>"._EDIT."</a></td>\n";
418 418
         } else {
419 419
             $form .= "<td>&nbsp;</td>\n";
420 420
         }
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         ++$count;
424 424
     }
425 425
     $form .= "</table>\n";
426
-    $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '0' ORDER BY 'id'";
426
+    $sql    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '0' ORDER BY 'id'";
427 427
     $result = $GLOBALS['xoopsDB']->query($sql);
428 428
     if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) {
429 429
         $form .= _MA_PEDIGREE_FIELD_EXPLAIN5;
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 function togglelocked($id)
446 446
 {
447 447
     //find current status
448
-    $sql    = 'SELECT locked FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE id = '{$id}'";
448
+    $sql    = 'SELECT locked FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE id = '{$id}'";
449 449
     $result = $GLOBALS['xoopsDB']->query($sql);
450 450
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
451 451
         if (0 == $row['locked']) { //not locked
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 function lock($id)
466 466
 {
467 467
     $id  = (int)$id;
468
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET locked = '1' WHERE id = '{$id}'";
468
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET locked = '1' WHERE id = '{$id}'";
469 469
     $GLOBALS['xoopsDB']->queryF($sql);
470 470
 }
471 471
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 function unlock($id)
476 476
 {
477 477
     $id  = (int)$id;
478
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET locked = '0' WHERE id = '{$id}'";
478
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET locked = '0' WHERE id = '{$id}'";
479 479
     $GLOBALS['xoopsDB']->queryF($sql);
480 480
 }
481 481
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 function fieldmove($field, $move)
492 492
 {
493 493
     //find next id
494
-    $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
494
+    $sql    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." WHERE isActive = '1' ORDER BY `order`";
495 495
     $result = $GLOBALS['xoopsDB']->query($sql);
496 496
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
497 497
         $valorder[] = $row['order'];
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
         $nextorder = $valorder[$x - 1];
514 514
     }
515 515
     //move value with ID=nextid to original location
516
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '127' WHERE `order` = '{$nextorder}'";
516
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '127' WHERE `order` = '{$nextorder}'";
517 517
     $GLOBALS['xoopsDB']->queryF($sql);
518
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '{$nextorder}' WHERE `order` = '{$currentorder}'";
518
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '{$nextorder}' WHERE `order` = '{$currentorder}'";
519 519
     $GLOBALS['xoopsDB']->queryF($sql);
520 520
     //move current value into nextvalue's spot
521
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET `order` = '{$currentorder}' WHERE `order` = '127'";
521
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET `order` = '{$currentorder}' WHERE `order` = '127'";
522 522
     $GLOBALS['xoopsDB']->queryF($sql);
523 523
     listuserfields();
524 524
 }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 function deluserfield($id)
532 532
 {
533 533
     $id  = (int)$id;
534
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET isActive = '0' WHERE id = {$id}";
534
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET isActive = '0' WHERE id = {$id}";
535 535
     $GLOBALS['xoopsDB']->queryF($sql);
536 536
     listuserfields();
537 537
 }
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 function restoreuserfield($id)
546 546
 {
547 547
     $id  = (int)$id;
548
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " SET isActive = '1' WHERE id = {$id}";
548
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_fields')." SET isActive = '1' WHERE id = {$id}";
549 549
     $GLOBALS['xoopsDB']->queryF($sql);
550 550
     listuserfields();
551 551
 }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 function editlookup($field)
559 559
 {
560 560
     $form    = _MA_PEDIGREE_LOOKUPFIELD;
561
-    $sql     = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY `order`';
561
+    $sql     = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY `order`';
562 562
     $result  = $GLOBALS['xoopsDB']->query($sql);
563 563
     $numrows = $GLOBALS['xoopsDB']->getRowsNum($result);
564 564
     $count   = 0;
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
         $form .= "</tr>\n";
599 599
         ++$count;
600 600
     }
601
-    $form .= "</table>\n" . "<form method='post' action='tools.php?op=addlookupvalue&field={$field}'>\n" . "<input type='text' name='value' style='width: 140px;'>&nbsp;\n" . "<input type='submit' value='Add value'>\n" . _MA_PEDIGREE_DELVALUE . "\n";
601
+    $form .= "</table>\n"."<form method='post' action='tools.php?op=addlookupvalue&field={$field}'>\n"."<input type='text' name='value' style='width: 140px;'>&nbsp;\n"."<input type='submit' value='Add value'>\n"._MA_PEDIGREE_DELVALUE."\n";
602 602
     //    $form .= '<br><br><input type="submit" name="reset" value=Exit>&nbsp;';
603 603
     $GLOBALS['xoopsTpl']->assign('form', $form);
604 604
 }
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
 function lookupmove($field, $id, $move)
612 612
 {
613 613
     //find next id
614
-    $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY `order`';
614
+    $sql    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY `order`';
615 615
     $result = $GLOBALS['xoopsDB']->query($sql);
616 616
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
617 617
         $values[] = ['id' => $row['id'], 'content' => $row['value'], 'orderof' => $row['order']];
@@ -637,9 +637,9 @@  discard block
 block discarded – undo
637 637
         $nextid    = $values[$arraylocation - 1]['id'];
638 638
         $nextorder = $values[$arraylocation - 1]['orderof'];
639 639
     }
640
-    $sql = 'UPDATE `draaf_pedigree_lookup' . $field . "` SET `order` = '" . $nextorder . "' WHERE `id` = '" . $id . "'";
640
+    $sql = 'UPDATE `draaf_pedigree_lookup'.$field."` SET `order` = '".$nextorder."' WHERE `id` = '".$id."'";
641 641
     $GLOBALS['xoopsDB']->queryF($sql);
642
-    $sql = 'UPDATE `draaf_pedigree_lookup' . $field . "` SET `order` = '" . $currentorder . "' WHERE `id` = '" . $nextid . "'";
642
+    $sql = 'UPDATE `draaf_pedigree_lookup'.$field."` SET `order` = '".$currentorder."' WHERE `id` = '".$nextid."'";
643 643
     $GLOBALS['xoopsDB']->queryF($sql);
644 644
     editlookup($field);
645 645
 }
@@ -654,10 +654,10 @@  discard block
 block discarded – undo
654 654
  */
655 655
 function editlookupvalue($field, $id)
656 656
 {
657
-    $sql    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' WHERE id =' . $id;
657
+    $sql    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' WHERE id ='.$id;
658 658
     $result = $GLOBALS['xoopsDB']->query($sql);
659 659
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
660
-        $form = "<form method='post' action='tools.php?op=savelookupvalue&field={$field}&id={$id}'>" . "<input type='text' name='value' value='{$row['value']}' style='width: 140px;'>&nbsp;" . "<input type='submit' value='Save value'>\n";
660
+        $form = "<form method='post' action='tools.php?op=savelookupvalue&field={$field}&id={$id}'>"."<input type='text' name='value' value='{$row['value']}' style='width: 140px;'>&nbsp;"."<input type='submit' value='Save value'>\n";
661 661
     }
662 662
     $GLOBALS['xoopsTpl']->assign('form', $form);
663 663
 }
@@ -671,9 +671,9 @@  discard block
 block discarded – undo
671 671
  */
672 672
 function savelookupvalue($field, $id)
673 673
 {
674
-    $id    = (int)$id;  //sanitize id
674
+    $id    = (int)$id; //sanitize id
675 675
     $value = Request::getString('value', '', 'POST');
676
-    $SQL   = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . " SET value = '{$value}' WHERE id = {$id}";
676
+    $SQL   = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field)." SET value = '{$value}' WHERE id = {$id}";
677 677
     $GLOBALS['xoopsDB']->queryF($SQL);
678 678
     redirect_header("tools.php?op=editlookup&id={$field}", 2, 'The value has been saved.');
679 679
 }
@@ -692,16 +692,16 @@  discard block
 block discarded – undo
692 692
     //    $default     = $fieldObject->defaultvalue;
693 693
     $default = $GLOBALS['xoopsDB']->escape($fieldObject->defaultvalue);
694 694
     if ($default == $id) {
695
-        redirect_header('tools.php?op=editlookup&id=' . $field, 3, _MA_PEDIGREE_NO_DELETE . $fieldObject->fieldname);
695
+        redirect_header('tools.php?op=editlookup&id='.$field, 3, _MA_PEDIGREE_NO_DELETE.$fieldObject->fieldname);
696 696
     }
697
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' WHERE id = ' . $id;
697
+    $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' WHERE id = '.$id;
698 698
     $GLOBALS['xoopsDB']->queryF($sql);
699 699
     //change current values to default for deleted value
700
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'";
700
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'";
701 701
     $GLOBALS['xoopsDB']->queryF($sql);
702
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'";
702
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_temp').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'";
703 703
     $GLOBALS['xoopsDB']->queryF($sql);
704
-    $sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' SET user' . $field . " = '" . $default . "' WHERE user" . $field . " = '" . $id . "'";
704
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' SET user'.$field." = '".$default."' WHERE user".$field." = '".$id."'";
705 705
     $GLOBALS['xoopsDB']->queryF($sql);
706 706
     editlookup($field);
707 707
 }
@@ -711,15 +711,15 @@  discard block
 block discarded – undo
711 711
  */
712 712
 function addlookupvalue($field)
713 713
 {
714
-    $SQL    = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . ' ORDER BY id DESC LIMIT 1';
714
+    $SQL    = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field).' ORDER BY id DESC LIMIT 1';
715 715
     $result = $GLOBALS['xoopsDB']->query($SQL);
716 716
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
717 717
         $count = $row['id'];
718 718
         ++$count;
719
-        $sql = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $field) . " VALUES ('" . $count . "', '" . $_POST['value'] . "', '" . $count . "')";
719
+        $sql = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$field)." VALUES ('".$count."', '".$_POST['value']."', '".$count."')";
720 720
         $GLOBALS['xoopsDB']->queryF($sql);
721 721
     }
722
-    redirect_header('tools.php?op=editlookup&id=' . $field, 2, 'The value has been added.');
722
+    redirect_header('tools.php?op=editlookup&id='.$field, 2, 'The value has been added.');
723 723
 }
724 724
 
725 725
 /**
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 function userfields($field = 0)
729 729
 {
730 730
     global $field;
731
-    require_once __DIR__ . '/include/checkoutwizard.php';
731
+    require_once __DIR__.'/include/checkoutwizard.php';
732 732
 
733 733
     $wizard = new CheckoutWizard();
734 734
     $action = $wizard->coalesce($_GET['action']);
@@ -745,29 +745,29 @@  discard block
 block discarded – undo
745 745
         } else {
746 746
             $form = _MA_PEDIGREE_FIELDPROP_ELSE;
747 747
         }
748
-        $form .= "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?op=userfields&action=' . $wizard->resetAction() . "'>";
749
-        $form .= "<input type='submit' value='" . _MA_PEDIGREE_FINISH_BUTTON . "'></form>";
748
+        $form .= "<form method='post' action='".$_SERVER['PHP_SELF'].'?op=userfields&action='.$wizard->resetAction()."'>";
749
+        $form .= "<input type='submit' value='"._MA_PEDIGREE_FINISH_BUTTON."'></form>";
750 750
     } else {
751
-        $form = "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?op=userfields&action=' . $wizard->getStepName() . "'>";
751
+        $form = "<form method='post' action='".$_SERVER['PHP_SELF'].'?op=userfields&action='.$wizard->getStepName()."'>";
752 752
         if (0 == !$field) {
753 753
             $form .= "<input type='hidden' name='field' value='{$field}'>";
754 754
         }
755 755
         if (0 == !$wizard->getValue('field')) { // field allready exists (editing mode)
756
-            $form .= '<h2>' . $wizard->getStepProperty('title') . ' - ' . $wizard->getValue('name') . ' - step ' . $wizard->getStepNumber() . '</h2>';
756
+            $form .= '<h2>'.$wizard->getStepProperty('title').' - '.$wizard->getValue('name').' - step '.$wizard->getStepNumber().'</h2>';
757 757
         } else {
758
-            $form .= '<h2>' . $wizard->getStepProperty('title') . ' - step ' . $wizard->getStepNumber() . '</h2>';
758
+            $form .= '<h2>'.$wizard->getStepProperty('title').' - step '.$wizard->getStepNumber().'</h2>';
759 759
         }
760 760
 
761 761
         if ('fieldname' === $wizard->getStepName()) {
762 762
             $form .= _MA_PEDIGREE_FIELD_FORM2;
763
-            $form .= "<input type='text' name='name' value='" . htmlspecialchars($wizard->getValue('name'), ENT_QUOTES | ENT_HTML5) . "'>";
763
+            $form .= "<input type='text' name='name' value='".htmlspecialchars($wizard->getValue('name'), ENT_QUOTES | ENT_HTML5)."'>";
764 764
             $form .= "</td><td style='width: 25%;'>";
765 765
             if ($wizard->isError('name')) {
766 766
                 $form .= $wizard->getError('name');
767 767
             }
768 768
             $form .= '</td></tr>';
769 769
             $form .= _MA_PEDIGREE_FIELD_FORM3;
770
-            $form .= "<textarea name='explain' rows='5' cols='15'>" . htmlspecialchars($wizard->getValue('explain'), ENT_QUOTES | ENT_HTML5) . '</textarea>';
770
+            $form .= "<textarea name='explain' rows='5' cols='15'>".htmlspecialchars($wizard->getValue('explain'), ENT_QUOTES | ENT_HTML5).'</textarea>';
771 771
             $form .= "</td><td style='width: 25%;'>";
772 772
             if ($wizard->isError('explain')) {
773 773
                 $form .= $wizard->getError('explain');
@@ -798,10 +798,10 @@  discard block
 block discarded – undo
798 798
             $form .= "<input type='hidden' name='fc' value='{$i}'>";
799 799
             $form .= '<table>';
800 800
             for ($x = 1; $x < $i; ++$x) {
801
-                $form .= "<tr><td>Value : ({$x})</td><td>" . htmlspecialchars($wizard->getValue('lookup' . $x), ENT_QUOTES | ENT_HTML5) . '</td></tr>';
801
+                $form .= "<tr><td>Value : ({$x})</td><td>".htmlspecialchars($wizard->getValue('lookup'.$x), ENT_QUOTES | ENT_HTML5).'</td></tr>';
802 802
             }
803 803
             $form .= "<tr><td>Value : ({$i})</td><td>";
804
-            $form .= "<input type='text' name='lookup{$i}' value='" . htmlspecialchars($wizard->getValue('lookup' . $i), ENT_QUOTES | ENT_HTML5) . "'>";
804
+            $form .= "<input type='text' name='lookup{$i}' value='".htmlspecialchars($wizard->getValue('lookup'.$i), ENT_QUOTES | ENT_HTML5)."'>";
805 805
             $form .= "<input type='hidden' name='id{$i}' value='{$i}'>";
806 806
             if ($wizard->isError('lookup')) {
807 807
                 $form .= $wizard->getError('lookup');
@@ -817,25 +817,25 @@  discard block
 block discarded – undo
817 817
                     if ('hassearch' === $wizard->getValue('hassearch')) {
818 818
                         $form .= ' checked =_MA_PEDIGREE_CHECKED ';
819 819
                     }
820
-                    $form .= '>' . _MA_PEDIGREE_FIELDSEARCH . '<br>';
820
+                    $form .= '>'._MA_PEDIGREE_FIELDSEARCH.'<br>';
821 821
                 } else {
822
-                    $form .= "<input type='checkbox' name='hassearch' disabled='true' value='hassearch'>" . _MA_PEDIGREE_FIELDSEARCH . '<br>';
822
+                    $form .= "<input type='checkbox' name='hassearch' disabled='true' value='hassearch'>"._MA_PEDIGREE_FIELDSEARCH.'<br>';
823 823
                 }
824 824
                 //viewinpedigree
825 825
                 $form .= "<input type='checkbox' name='viewinpedigree' value='viewinpedigree'";
826 826
                 if ('viewinpedigree' === $wizard->getValue('viewinpedigree')) {
827 827
                     $form .= ' checked =_MA_PEDIGREE_CHECKED ';
828 828
                 }
829
-                $form .= '>' . _MA_PEDIGREE_SHOWFIELD . '<br>';
829
+                $form .= '>'._MA_PEDIGREE_SHOWFIELD.'<br>';
830 830
                 //viewinadvanced
831 831
                 if ('radiobutton' === $fieldtype || 'selectbox' === $fieldtype) {
832 832
                     $form .= "<input type='checkbox' name='viewinadvanced' value='viewinadvanced'";
833 833
                     if ('viewinadvanced' === $wizard->getValue('viewinadvanced')) {
834 834
                         $form .= ' checked=checked';
835 835
                     }
836
-                    $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADVANCE . '<br>';
836
+                    $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADVANCE.'<br>';
837 837
                 } else {
838
-                    $form .= "<input type='checkbox' name='viewinadvanced' disabled='true' value='viewinadvanced'>" . _MA_PEDIGREE_SHOWFIELD_ADVANCE . '<br>';
838
+                    $form .= "<input type='checkbox' name='viewinadvanced' disabled='true' value='viewinadvanced'>"._MA_PEDIGREE_SHOWFIELD_ADVANCE.'<br>';
839 839
                 }
840 840
                 //viewinpie
841 841
                 if ('radiobutton' === $fieldtype || 'selectbox' === $fieldtype) {
@@ -843,9 +843,9 @@  discard block
 block discarded – undo
843 843
                     if ('viewinpie' === $wizard->getValue('viewinpie')) {
844 844
                         $form .= ' checked =_MA_PEDIGREE_CHECKED ';
845 845
                     }
846
-                    $form .= '>' . _MA_PEDIGREE_SHOWFIELD_PIECHART . '<br>';
846
+                    $form .= '>'._MA_PEDIGREE_SHOWFIELD_PIECHART.'<br>';
847 847
                 } else {
848
-                    $form .= "<input type='checkbox' name='viewinpie' disabled='true' value='viewinpie'>" . _MA_PEDIGREE_SHOWFIELD_PIECHART . '<br>';
848
+                    $form .= "<input type='checkbox' name='viewinpie' disabled='true' value='viewinpie'>"._MA_PEDIGREE_SHOWFIELD_PIECHART.'<br>';
849 849
                 }
850 850
                 //viewinlist
851 851
                 if (in_array($fieldtype, ['textbox', 'dateselect', 'urlfield', 'radiobutton', 'selectbox'])) {
@@ -853,9 +853,9 @@  discard block
 block discarded – undo
853 853
                     if ('viewinlist' === $wizard->getValue('viewinlist')) {
854 854
                         $form .= ' checked =_MA_PEDIGREE_CHECKED ';
855 855
                     }
856
-                    $form .= '>' . _MA_PEDIGREE_SHOWFIELD_RESULT . '<br>';
856
+                    $form .= '>'._MA_PEDIGREE_SHOWFIELD_RESULT.'<br>';
857 857
                 } else {
858
-                    $form .= "<input type='checkbox' name='viewinlist' disabled='true' value='viewinlist'>" . _MA_PEDIGREE_SHOWFIELD_RESULT . '<br>';
858
+                    $form .= "<input type='checkbox' name='viewinlist' disabled='true' value='viewinlist'>"._MA_PEDIGREE_SHOWFIELD_RESULT.'<br>';
859 859
                 }
860 860
                 //add a litter
861 861
                 $form .= "<input type='checkbox' name='Litter' value='Litter'";
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
                     //disable if generallitter is active (you cant have both)
866 866
                     $form .= " disabled='true'";
867 867
                 }
868
-                $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADDLITTER . '<br>';
868
+                $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADDLITTER.'<br>';
869 869
 
870 870
                 //add a litter general
871 871
                 $form .= "<input type='checkbox' name='Generallitter' value='Generallitter'";
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
                     //disable if add a litter is active (you cant have both)
876 876
                     $form .= " disabled='true'";
877 877
                 }
878
-                $form .= '>' . _MA_PEDIGREE_SHOWFIELD_ADDLITTGLOBAL . '<br>';
878
+                $form .= '>'._MA_PEDIGREE_SHOWFIELD_ADDLITTGLOBAL.'<br>';
879 879
             } else {
880 880
                 if ('search' === $wizard->getStepName()) {
881 881
                     $form .= _MA_PEDIGREE_SEARCH_NAME;
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
                     }
893 893
                     $form .= '</td></tr>';
894 894
                     $form .= _MA_PEDIGREE_FIELDEXPLANSEARCH;
895
-                    $form .= "<textarea name='searchexplain' rows='5' cols='15'>" . htmlspecialchars($wizard->getValue('searchexplain'), ENT_QUOTES | ENT_HTML5) . '</textarea>';
895
+                    $form .= "<textarea name='searchexplain' rows='5' cols='15'>".htmlspecialchars($wizard->getValue('searchexplain'), ENT_QUOTES | ENT_HTML5).'</textarea>';
896 896
                     $form .= "</td><td style='width: 25%;'>";
897 897
                     if ($wizard->isError('searchexplain')) {
898 898
                         $form .= $wizard->getError('searchexplain');
@@ -906,15 +906,15 @@  discard block
 block discarded – undo
906 906
                         $form .= "Default value : <select size='1' name='defaultvalue'>";
907 907
                         $radioarray = $wizard->getValue('radioarray');
908 908
                         foreach ($radioarray as $x => $xValue) {
909
-                            $form .= "<option value='" . $radioarray[$x]['id'] . "'";
909
+                            $form .= "<option value='".$radioarray[$x]['id']."'";
910 910
                             if ($wizard->getValue('defaultvalue') == $radioarray[$x]['id']) {
911 911
                                 $form .= ' selected';
912 912
                             }
913
-                            $form .= ' >' . $radioarray[$x]['value'] . '</option>';
913
+                            $form .= ' >'.$radioarray[$x]['value'].'</option>';
914 914
                         }
915 915
                         $form .= '</select>';
916 916
                     } else {
917
-                        $form .= '' . _MA_PEDIGREE_FIELDVALUE . " <input type='text' name='defaultvalue' value='" . htmlspecialchars($wizard->getValue('defaultvalue'), ENT_QUOTES | ENT_HTML5) . "'>";
917
+                        $form .= ''._MA_PEDIGREE_FIELDVALUE." <input type='text' name='defaultvalue' value='".htmlspecialchars($wizard->getValue('defaultvalue'), ENT_QUOTES | ENT_HTML5)."'>";
918 918
                     }
919 919
                     $form .= _MA_PEDIGREE_DEFAUTVALUE_EXPLAIN;
920 920
                 } elseif ('confirm' === $wizard->getStepName()) {
@@ -926,27 +926,27 @@  discard block
 block discarded – undo
926 926
                 }
927 927
                 //            }
928 928
                 //        }
929
-                $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL4 . $wizard->getValue('name') . '</b><br>';
930
-                $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL5 . stripslashes($wizard->getValue('explain')) . '</b><br>';
931
-                $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL6 . $wizard->getValue('fieldtype') . '</b><br>';
929
+                $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL4.$wizard->getValue('name').'</b><br>';
930
+                $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL5.stripslashes($wizard->getValue('explain')).'</b><br>';
931
+                $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL6.$wizard->getValue('fieldtype').'</b><br>';
932 932
                 if ('selectbox' === $wizard->getValue('fieldtype')
933 933
                     || 'radiobutton' === $wizard->getValue('fieldtype')) {
934 934
                     $count = $wizard->getValue('fc');
935 935
                     for ($x = 1; $x < $count + 1; ++$x) {
936 936
                         $radioarray[] = [
937
-                            'id'    => $wizard->getValue('id' . $x),
938
-                            'value' => $wizard->getValue('lookup' . $x)
937
+                            'id'    => $wizard->getValue('id'.$x),
938
+                            'value' => $wizard->getValue('lookup'.$x)
939 939
                         ];
940 940
                     }
941 941
                     $val = $wizard->getValue('defaultvalue');
942
-                    $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL7 . $wizard->getValue('lookup' . $val) . '</b><br>';
942
+                    $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL7.$wizard->getValue('lookup'.$val).'</b><br>';
943 943
                 } else {
944
-                    $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL7 . $wizard->getValue('defaultvalue') . '</b><br>';
944
+                    $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL7.$wizard->getValue('defaultvalue').'</b><br>';
945 945
                 }
946 946
                 if ('hasearch' === $wizard->getValue('hassearch')) {
947
-                    $form .= _MA_PEDIGREE_FIELDSEARCH . ' : <b>  ' . _YES . '</b><br>';
948
-                    $form .= '<b>' . _MA_PEDIGREE_FIELDSEARCH . $wizard->getValue('searchname') . '</b><br>';
949
-                    $form .= '<b>' . _MA_PEDIGREE_FIELDCONTROL5 . $wizard->getValue('searhexplain') . '</b><br>';
947
+                    $form .= _MA_PEDIGREE_FIELDSEARCH.' : <b>  '._YES.'</b><br>';
948
+                    $form .= '<b>'._MA_PEDIGREE_FIELDSEARCH.$wizard->getValue('searchname').'</b><br>';
949
+                    $form .= '<b>'._MA_PEDIGREE_FIELDCONTROL5.$wizard->getValue('searhexplain').'</b><br>';
950 950
                 }
951 951
                 if ('viewinpedigree' === $wizard->getValue('viewinpedigree')) {
952 952
                     $form .= _MA_PEDIGREE_SYNTH1;
@@ -966,13 +966,13 @@  discard block
 block discarded – undo
966 966
                 if ('Generallitter' === $wizard->getValue('generallitter')) {
967 967
                     $form .= _MA_PEDIGREE_SYNTH6;
968 968
                 }
969
-                $form .= _MA_PEDIGREE_FIELDCONTROL3 . '<br><br>';
969
+                $form .= _MA_PEDIGREE_FIELDCONTROL3.'<br><br>';
970 970
             }
971 971
         }
972 972
     }
973 973
 
974 974
     if (!$wizard->isFirstStep()) {
975
-        $form .= "<p><input type='submit' name='previous' value='&lt;&lt; " . _MA_PEDIGREE_PREVIOUS_BUTTON . "'>&nbsp;";
975
+        $form .= "<p><input type='submit' name='previous' value='&lt;&lt; "._MA_PEDIGREE_PREVIOUS_BUTTON."'>&nbsp;";
976 976
     }
977 977
     $form .= "<input type='submit' name='reset' value=Exit>&nbsp;";
978 978
     $last = $wizard->isLastStep() ? _MA_PEDIGREE_FINISH_BUTTON : _MA_PEDIGREE_NEXT_BUTTON;
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
     $moduleConfig  = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
992 992
     */
993 993
     $helper = Pedigree\Helper::getInstance(false);
994
-    $form     = 'Pedigree database module<br><br><li>Programming : James Cotton<br><li>Design & Layout : Ton van der Hagen<br><li>Version : '
994
+    $form = 'Pedigree database module<br><br><li>Programming : James Cotton<br><li>Design & Layout : Ton van der Hagen<br><li>Version : '
995 995
                 . round($helper->getModule()->getVar('version') / 100, 2)
996 996
                 . ' '
997 997
                 . $helper->getModule()->getVar('module_status')
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 function userq()
1010 1010
 {
1011 1011
     $form = _MA_PEDIGREE_QUERIE_EXPLAN;
1012
-    $d    = $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModule']->dirname() . '/userqueries/');
1012
+    $d    = $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModule']->dirname().'/userqueries/');
1013 1013
 
1014 1014
     $dir = opendir($d);
1015 1015
     while (false !== ($f = readdir($dir))) {
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
  */
1026 1026
 function userqrun($file)
1027 1027
 {
1028
-    include $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModule']->dirname() . "/userqueries/{$file}");
1028
+    include $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModule']->dirname()."/userqueries/{$file}");
1029 1029
     $GLOBALS['xoopsTpl']->assign('form', $form);
1030 1030
 }
1031 1031
 
@@ -1038,13 +1038,13 @@  discard block
 block discarded – undo
1038 1038
 {
1039 1039
     $form   = _MA_PEDIGREE_ANCEST_EXPLAN;
1040 1040
     $sql    = 'SELECT d.id AS d_id, d.naam AS d_naam
1041
-            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d
1042
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' m ON m.id = d.mother
1043
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' f ON f.id = d.father
1044
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mm ON mm.id = m.mother
1045
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mf ON mf.id = m.father
1046
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fm ON fm.id = f.mother
1047
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ff ON ff.id = f.father
1041
+            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d
1042
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' m ON m.id = d.mother
1043
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' f ON f.id = d.father
1044
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mm ON mm.id = m.mother
1045
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mf ON mf.id = m.father
1046
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fm ON fm.id = f.mother
1047
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ff ON ff.id = f.father
1048 1048
             WHERE
1049 1049
             d.mother = d.id
1050 1050
             OR d.father = d.id
@@ -1076,8 +1076,8 @@  discard block
 block discarded – undo
1076 1076
 {
1077 1077
     $form   = _MA_PEDIGREE_GENDER_EXPLAN;
1078 1078
     $sql    = 'SELECT d.id AS d_id, d.naam AS d_naam, d.mother AS d_mother, m.roft AS m_roft
1079
-            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d
1080
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " m ON m.id = d.mother
1079
+            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d
1080
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." m ON m.id = d.mother
1081 1081
             WHERE
1082 1082
             d.mother = m.id
1083 1083
             AND m.roft = '0' ";
@@ -1085,15 +1085,15 @@  discard block
 block discarded – undo
1085 1085
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
1086 1086
         $form .= "<li><a href='dog.php?id={$row['d_id']}'>{$row['d_naam']}</a> [mother seems to be male]<br>";
1087 1087
     }
1088
-    $sql    = 'SELECT d.id AS d_id, d.naam AS d_naam, d.father AS d_father, f.roft AS f_roft
1089
-            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d
1090
-            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " f ON f.id = d.father
1088
+    $sql = 'SELECT d.id AS d_id, d.naam AS d_naam, d.father AS d_father, f.roft AS f_roft
1089
+            FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d
1090
+            LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree')." f ON f.id = d.father
1091 1091
             WHERE
1092 1092
             d.father = f.id
1093 1093
             AND f.roft = '1' ";
1094 1094
     $result = $GLOBALS['xoopsDB']->query($sql);
1095 1095
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
1096
-        $form .= '<li><a href="dog.php?id=' . $row['d_id'] . '">' . $row['d_naam'] . '</a> [father seems to be female]<br>';
1096
+        $form .= '<li><a href="dog.php?id='.$row['d_id'].'">'.$row['d_naam'].'</a> [father seems to be female]<br>';
1097 1097
     }
1098 1098
     $GLOBALS['xoopsTpl']->assign('form', $form);
1099 1099
 }
@@ -1118,13 +1118,13 @@  discard block
 block discarded – undo
1118 1118
 {
1119 1119
     global $helper;
1120 1120
     $form   = "Below the line are the animals which have been deleted from your database.<br><br>By clicking on the name you can reinsert them into the database.<br>By clicking on the 'X' in front of the name you can permanently delete the animal.<hr>";
1121
-    $sql    = 'SELECT id, naam  FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash');
1121
+    $sql    = 'SELECT id, naam  FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash');
1122 1122
     $result = $GLOBALS['xoopsDB']->query($sql);
1123 1123
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
1124
-        $form .= '<a href="tools.php?op=delperm&id=' . $row['id'] . '"><img src=' . $GLOBALS['pathIcon16'] . '/delete.png></a>&nbsp;<a href="tools.php?op=restore&id=' . $row['id'] . '">' . $row['naam'] . '</a><br>';
1124
+        $form .= '<a href="tools.php?op=delperm&id='.$row['id'].'"><img src='.$GLOBALS['pathIcon16'].'/delete.png></a>&nbsp;<a href="tools.php?op=restore&id='.$row['id'].'">'.$row['naam'].'</a><br>';
1125 1125
     }
1126 1126
     if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) {
1127
-        $form .= '<hr><a href="tools.php?op=delall">Click here</a> to remove all these ' . $helper->getConfig('animalTypes') . ' permenantly ';
1127
+        $form .= '<hr><a href="tools.php?op=delall">Click here</a> to remove all these '.$helper->getConfig('animalTypes').' permenantly ';
1128 1128
     }
1129 1129
     $GLOBALS['xoopsTpl']->assign('form', $form);
1130 1130
 }
@@ -1134,14 +1134,14 @@  discard block
 block discarded – undo
1134 1134
  */
1135 1135
 function delperm($id)
1136 1136
 {
1137
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . " WHERE id = {$id}";
1137
+    $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash')." WHERE id = {$id}";
1138 1138
     $GLOBALS['xoopsDB']->queryF($sql);
1139 1139
     deleted();
1140 1140
 }
1141 1141
 
1142 1142
 function delall()
1143 1143
 {
1144
-    $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash');
1144
+    $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash');
1145 1145
     $GLOBALS['xoopsDB']->queryF($sql);
1146 1146
     deleted();
1147 1147
 }
@@ -1152,18 +1152,18 @@  discard block
 block discarded – undo
1152 1152
 function restore($id)
1153 1153
 {
1154 1154
     $queryvalues = '';
1155
-    $sql         = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' WHERE id = ' . $id;
1155
+    $sql         = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' WHERE id = '.$id;
1156 1156
     $result      = $GLOBALS['xoopsDB']->query($sql);
1157 1157
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
1158 1158
         foreach ($row as $key => $values) {
1159
-            $queryvalues .= "'" . $values . "',";
1159
+            $queryvalues .= "'".$values."',";
1160 1160
         }
1161 1161
         $outgoing = substr_replace($queryvalues, '', -1);
1162
-        $query    = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' VALUES (' . $outgoing . ')';
1162
+        $query    = 'INSERT INTO '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' VALUES ('.$outgoing.')';
1163 1163
         $GLOBALS['xoopsDB']->queryF($query);
1164
-        $delquery = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_trash') . ' WHERE id = ' . $id;
1164
+        $delquery = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_trash').' WHERE id = '.$id;
1165 1165
         $GLOBALS['xoopsDB']->queryF($delquery);
1166
-        $form = '<li><a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a> has been restored into the database.<hr>';
1166
+        $form = '<li><a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a> has been restored into the database.<hr>';
1167 1167
     }
1168 1168
     if (isset($form)) {
1169 1169
         $GLOBALS['xoopsTpl']->assign('form', $form);
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
 {
1175 1175
     $helper = Pedigree\Helper::getInstance();
1176 1176
 
1177
-    include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
1177
+    include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
1178 1178
     $form = new \XoopsThemeForm(_MA_PEDIGREE_BLOCK_SETTING, 'settings', 'tools.php?op=settingssave', 'POST', 1);
1179 1179
     $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
1180 1180
     $select  = new \XoopsFormSelect(_MA_PEDIGREE_RESULT, 'perpage', $value = $helper->getConfig('perpage'), $size = 1, $multiple = false);
@@ -1214,7 +1214,7 @@  discard block
 block discarded – undo
1214 1214
     $radiolit->addOption(0, $name = _MA_PEDIGREE_NO);
1215 1215
     $form->addElement($radiolit);
1216 1216
     $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_USE_LITTER_EXPLAIN));
1217
-    $radioch = new \XoopsFormRadio(PED_SHOW_KITT_A . $helper->getConfig('children') . _MA_PEDIGREE_SHOW_KITT_B, 'pups', $value = $helper->getConfig('pups'));
1217
+    $radioch = new \XoopsFormRadio(PED_SHOW_KITT_A.$helper->getConfig('children')._MA_PEDIGREE_SHOW_KITT_B, 'pups', $value = $helper->getConfig('pups'));
1218 1218
     $radioch->addOption(1, $name = _MA_PEDIGREE_YES);
1219 1219
     $radioch->addOption(0, $name = _MA_PEDIGREE_NO);
1220 1220
     $form->addElement($radioch);
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
     foreach ($_POST as $key => $values) {
1240 1240
         if (in_array($key, $settings)) {
1241 1241
             //            $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $values . "' WHERE conf_name = '" . $key . "'";
1242
-            $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '" . $GLOBALS['xoopsDB']->escape($values) . "' WHERE conf_name = '" . $GLOBALS['xoopsDB']->escape($key) . "'";
1242
+            $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '".$GLOBALS['xoopsDB']->escape($values)."' WHERE conf_name = '".$GLOBALS['xoopsDB']->escape($key)."'";
1243 1243
             $GLOBALS['xoopsDB']->query($query);
1244 1244
         }
1245 1245
     }
@@ -1249,28 +1249,28 @@  discard block
 block discarded – undo
1249 1249
 function lang()
1250 1250
 {
1251 1251
     global $helper;
1252
-    include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
1252
+    include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
1253 1253
     $form = new \XoopsThemeForm(_MA_PEDIGREE_BLOCK_NAME, 'language', 'tools.php?op=langsave', 'post', true);
1254 1254
     $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
1255 1255
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_TYPE_AN, 'animalType', $size = 50, $maxsize = 255, $value = $helper->getConfig('animalType')));
1256
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN . $helper->getConfig('animalType') . _MA_PEDIGREE_SEARCH_FORM . $helper->getConfig('animalType') . '</b>.'));
1256
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN.$helper->getConfig('animalType')._MA_PEDIGREE_SEARCH_FORM.$helper->getConfig('animalType').'</b>.'));
1257 1257
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_TYPE_AN, 'animalTypes', $size = 50, $maxsize = 255, $value = $value = $helper->getConfig('animalTypes')));
1258
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN2 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_FIELD_EXPLAIN3));
1258
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FIELD_EXPLAIN2.$helper->getConfig('animalTypes')._MA_PEDIGREE_FIELD_EXPLAIN3));
1259 1259
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_MALE, 'male', $size = 50, $maxsize = 255, $value = $helper->getConfig('male')));
1260 1260
     $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MALE_EXPLAIN));
1261 1261
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_FEMALE, 'female', $size = 50, $maxsize = 255, $value = $helper->getConfig('female')));
1262 1262
     $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FEMALE_EXPLAIN));
1263 1263
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_CHILDREN, 'children', $size = 50, $maxsize = 255, $value = $helper->getConfig('children')));
1264
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_KITTEN_EXPLAIN1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_KITTEN_EXPLAIN2));
1264
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_KITTEN_EXPLAIN1.$helper->getConfig('animalTypes')._MA_PEDIGREE_KITTEN_EXPLAIN2));
1265 1265
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_MOTHER, 'mother', $size = 50, $maxsize = 255, $value = $helper->getConfig('mother')));
1266
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MOTHER1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_MOTHER2));
1266
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_MOTHER1.$helper->getConfig('animalTypes')._MA_PEDIGREE_MOTHER2));
1267 1267
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_FATHER, 'father', $size = 50, $maxsize = 255, $value = $helper->getConfig('father')));
1268
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FATHER1 . $helper->getConfig('animalTypes') . _MA_PEDIGREE_FATHER2));
1268
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_FATHER1.$helper->getConfig('animalTypes')._MA_PEDIGREE_FATHER2));
1269 1269
     $form->addElement(new \XoopsFormText(_MA_PEDIGREE_LITTER, 'litter', $size = 50, $maxsize = 255, $value = $helper->getConfig('litter')));
1270 1270
     $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_LITTER1));
1271 1271
     $form->addElement(new \XoopsFormTextArea(_MA_PEDIGREE_WELC_TEXT, 'welcome', $value = $helper->getConfig('welcome'), $rows = 15, $cols = 50));
1272 1272
 
1273
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_WELC_TXT_EXPLAIN . $helper->getConfig('animalType') . '<br>[animalTypes] = ' . $helper->getConfig('animalTypes') . _MA_PEDIGREE_WELC_TXT_EXPLAIN2));
1273
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_EXPLAIN, _MA_PEDIGREE_WELC_TXT_EXPLAIN.$helper->getConfig('animalType').'<br>[animalTypes] = '.$helper->getConfig('animalTypes')._MA_PEDIGREE_WELC_TXT_EXPLAIN2));
1274 1274
     $form->addElement(new \XoopsFormButton('', 'button_id', 'Submit', 'submit'));
1275 1275
     $GLOBALS['xoopsTpl']->assign('form', $form->render());
1276 1276
 }
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
     ];
1297 1297
     foreach ($_POST as $key => $values) {
1298 1298
         if (in_array($key, $settings)) {
1299
-            $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('config') . " SET conf_value = '{$values}' WHERE conf_name = '{$key}'";
1299
+            $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('config')." SET conf_value = '{$values}' WHERE conf_name = '{$key}'";
1300 1300
             $GLOBALS['xoopsDB']->query($query);
1301 1301
         }
1302 1302
     }
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,12 +87,12 @@
 block discarded – undo
87 87
 
88 88
 //add data to smarty template
89 89
 $GLOBALS['xoopsTpl']->assign([
90
-                                 'sselect'    => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]),
91
-                                 'explain'     => _MA_PEDIGREE_EXPLAIN,
92
-                                 'sname'       => _MA_PEDIGREE_SEARCHNAME,
93
-                                 'snameex'    => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]),
94
-                                 'usersearch' => isset($usersearch) ? $usersearch : ''
95
-                             ]);
90
+                                    'sselect'    => strtr(_MA_PEDIGREE_SELECT, ['[animalType]' => $moduleConfig['animalType']]),
91
+                                    'explain'     => _MA_PEDIGREE_EXPLAIN,
92
+                                    'sname'       => _MA_PEDIGREE_SEARCHNAME,
93
+                                    'snameex'    => strtr(_MA_PEDIGREE_SEARCHNAME_EX, ['[animalTypes]' => $moduleConfig['animalTypes']]),
94
+                                    'usersearch' => isset($usersearch) ? $usersearch : ''
95
+                                ]);
96 96
 $GLOBALS['xoopsTpl']->assign('showwelcome', $moduleConfig['showwelcome']);
97 97
 //$GLOBALS['xoopsTpl']->assign('welcome', $GLOBALS['myts']->displayTarea($moduleConfig['welcome']));
98 98
 //$word = $myts->displayTarea(strtr($helper->getConfig('welcome'), array('[numanimals]' => $numdogs, '[animalType]' => $helper->getConfig('animalType'), '[animalTypes]' => $helper->getConfig('animalTypes'))));
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,35 +3,35 @@  discard block
 block discarded – undo
3 3
 
4 4
 use XoopsModules\Pedigree;
5 5
 
6
-require_once __DIR__ . '/header.php';
6
+require_once __DIR__.'/header.php';
7 7
 
8 8
 $moduleDirName = basename(__DIR__);
9 9
 xoops_loadLanguage('main', $moduleDirName);
10 10
 
11 11
 // Include any common code for this module.
12
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
13
-require_once __DIR__ . '/welcome.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
13
+require_once __DIR__.'/welcome.php';
14 14
 
15 15
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_index.tpl';
16 16
 
17 17
 include $GLOBALS['xoops']->path('/header.php');
18 18
 
19 19
 //load javascript
20
-$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
20
+$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js');
21 21
 //$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.ThickBox/thickbox-compressed.js');
22 22
 
23
-$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.magnific-popup.min.js');
24
-$xoTheme->addScript(PEDIGREE_URL . '/assets/js/colpick.js');
23
+$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.magnific-popup.min.js');
24
+$xoTheme->addScript(PEDIGREE_URL.'/assets/js/colpick.js');
25 25
 
26 26
 //load CSS style sheets
27
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/colpick.css');
28
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/magnific-popup.css');
29
-$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/style.css');
27
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/colpick.css');
28
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/magnific-popup.css');
29
+$xoTheme->addStylesheet(PEDIGREE_URL.'/assets/css/style.css');
30 30
 
31 31
 //$xoTheme->addStylesheet(PEDIGREE_URL . '/assets/css/jquery.ThickBox/thickbox.css');
32 32
 //$xoTheme->addStylesheet(PEDIGREE_URL . '/module.css');
33 33
 
34
-$GLOBALS['xoopsTpl']->assign('pedigree_url', PEDIGREE_URL . '/');
34
+$GLOBALS['xoopsTpl']->assign('pedigree_url', PEDIGREE_URL.'/');
35 35
 
36 36
 // Breadcrumb
37 37
 $breadcrumb = new Pedigree\Breadcrumb();
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
     if ($userField->isActive() && $userField->hasSearch()) {
59 59
         $fieldType   = $userField->getSetting('FieldType');
60 60
         $fieldObject = new $fieldType($userField, $animal);
61
-        $function    = 'user' . $iValue . $fieldObject->getSearchString();
61
+        $function    = 'user'.$iValue.$fieldObject->getSearchString();
62 62
         //echo $function."<br>";
63 63
         $usersearch[] = [
64 64
             'title'       => $userField->getSetting('SearchName'),
65
-            'searchid'    => 'user' . $iValue,
65
+            'searchid'    => 'user'.$iValue,
66 66
             'function'    => $function,
67 67
             'explanation' => $userField->getSetting('SearchExplanation'),
68 68
             'searchfield' => $fieldObject->searchfield()
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 //$catarray['letters']          = Pedigree\Utility::lettersChoice();
74
-$letter              = '';
74
+$letter = '';
75 75
 $myObject     = Pedigree\Helper::getInstance();
76 76
 $activeObject = 'Tree';
77 77
 $name         = 'naam';
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 $link2        = '%25';
80 80
 
81 81
 $criteria = $myObject->getHandler('Tree')->getActiveCriteria();
82
-$criteria->setGroupby('UPPER(LEFT(' . $name . ',1))');
82
+$criteria->setGroupby('UPPER(LEFT('.$name.',1))');
83 83
 $catarray['letters'] = Pedigree\Utility::lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2);
84 84
 //$catarray['toolbar']          = pedigree_toolbar();
85 85
 $xoopsTpl->assign('catarray', $catarray);
Please login to merge, or discard this patch.
dog.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@  discard block
 block discarded – undo
5 5
 use XoopsModules\Pedigree;
6 6
 
7 7
 //require_once  dirname(dirname(__DIR__)) . '/mainfile.php';
8
-require_once __DIR__ . '/header.php';
8
+require_once __DIR__.'/header.php';
9 9
 $moduleDirName = basename(__DIR__);
10 10
 xoops_loadLanguage('main', $moduleDirName);
11 11
 // Include any common code for this module.
12
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
13 13
 
14 14
 // Get all HTTP post or get parameters into global variables that are prefixed with "param_"
15 15
 //import_request_variables("gp", "param_");
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 extract($_POST, EXTR_PREFIX_ALL, 'param');
18 18
 
19 19
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_dog.tpl';
20
-include XOOPS_ROOT_PATH . '/header.php';
20
+include XOOPS_ROOT_PATH.'/header.php';
21 21
 
22 22
 global $xoopsUser, $xoopsTpl, $xoopsDB, $xoopsModuleConfig, $xoopsModule;
23 23
 global $numofcolumns, $numMatch, $pages, $columns, $dogs;
@@ -43,78 +43,78 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 if (isset($_GET['delpicture']) && 'true' === $_GET['delpicture']) {
46
-    $delpicsql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " SET foto = '' WHERE id = '" . $id . "'";
46
+    $delpicsql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." SET foto = '' WHERE id = '".$id."'";
47 47
     $GLOBALS['xoopsDB']->query($delpicsql);
48 48
 }
49 49
 //query
50
-$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $id;
50
+$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$id;
51 51
 $result      = $GLOBALS['xoopsDB']->query($queryString);
52 52
 
53 53
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
54 54
     //name
55 55
     $naam = stripslashes($row['naam']);
56
-    $xoopsTpl->assign('xoops_pagetitle', $naam . ' -- detailed information');
56
+    $xoopsTpl->assign('xoops_pagetitle', $naam.' -- detailed information');
57 57
     //owner
58 58
     if ('0' != $row['id_owner']) {
59
-        $queryeig = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_owner'];
59
+        $queryeig = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_owner'];
60 60
         $reseig   = $GLOBALS['xoopsDB']->query($queryeig);
61 61
         while (false !== ($roweig = $GLOBALS['xoopsDB']->fetchArray($reseig))) {
62
-            $eig = '<a href="owner.php?ownid=' . $roweig['id'] . '">' . $roweig['firstname'] . ' ' . $roweig['lastname'] . '</a>';
62
+            $eig = '<a href="owner.php?ownid='.$roweig['id'].'">'.$roweig['firstname'].' '.$roweig['lastname'].'</a>';
63 63
         }
64 64
     } else {
65
-        $eig = '<a href="update.php?id=' . $row['id'] . '&fld=ow">' . _MA_PEDIGREE_UNKNOWN . '</a>';
65
+        $eig = '<a href="update.php?id='.$row['id'].'&fld=ow">'._MA_PEDIGREE_UNKNOWN.'</a>';
66 66
     }
67 67
     //breeder
68 68
     if ('0' != $row['id_breeder']) {
69
-        $queryfok = 'SELECT id, lastname, firstname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $row['id_breeder'];
69
+        $queryfok = 'SELECT id, lastname, firstname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$row['id_breeder'];
70 70
         $resfok   = $GLOBALS['xoopsDB']->query($queryfok);
71 71
         while (false !== ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok))) {
72
-            $fok = '<a href="owner.php?ownid=' . $rowfok['id'] . '">' . $rowfok['firstname'] . ' ' . $rowfok['lastname'] . '</a>';
72
+            $fok = '<a href="owner.php?ownid='.$rowfok['id'].'">'.$rowfok['firstname'].' '.$rowfok['lastname'].'</a>';
73 73
         }
74 74
     } else {
75
-        $fok = '<a href="update.php?id=' . $row['id'] . '&fld=br">' . _MA_PEDIGREE_UNKNOWN . '</a>';
75
+        $fok = '<a href="update.php?id='.$row['id'].'&fld=br">'._MA_PEDIGREE_UNKNOWN.'</a>';
76 76
     }
77 77
     //gender
78 78
     if (0 == $row['roft']) {
79
-        $gender = '<img src="assets/images/male.gif"> ' . strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]);
79
+        $gender = '<img src="assets/images/male.gif"> '.strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]);
80 80
     } else {
81
-        $gender = '<img src="assets/images/female.gif"> ' . strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']]);
81
+        $gender = '<img src="assets/images/female.gif"> '.strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']]);
82 82
     }
83 83
     //Sire
84 84
     if (0 != $row['father']) {
85
-        $querysire = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['father'];
85
+        $querysire = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['father'];
86 86
         $ressire   = $GLOBALS['xoopsDB']->query($querysire);
87 87
         while (false !== ($rowsire = $GLOBALS['xoopsDB']->fetchArray($ressire))) {
88
-            $sire = '<img src="assets/images/male.gif"><a href="dog.php?id=' . $row['father'] . '">' . stripslashes($rowsire['naam']) . '</a>';
88
+            $sire = '<img src="assets/images/male.gif"><a href="dog.php?id='.$row['father'].'">'.stripslashes($rowsire['naam']).'</a>';
89 89
         }
90 90
     } else {
91
-        $sire = '<img src="assets/images/male.gif"><a href="seldog.php?curval=' . $row['id'] . '&gend=0&letter=A">' . _MA_PEDIGREE_UNKNOWN . '</a>';
91
+        $sire = '<img src="assets/images/male.gif"><a href="seldog.php?curval='.$row['id'].'&gend=0&letter=A">'._MA_PEDIGREE_UNKNOWN.'</a>';
92 92
     }
93 93
     //Dam
94 94
     if (0 != $row['mother']) {
95
-        $querydam = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $row['mother'];
95
+        $querydam = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$row['mother'];
96 96
         $resdam   = $GLOBALS['xoopsDB']->query($querydam);
97 97
         while (false !== ($rowdam = $GLOBALS['xoopsDB']->fetchArray($resdam))) {
98
-            $dam = '<img src="assets/images/female.gif"><a href="dog.php?id=' . $row['mother'] . '">' . stripslashes($rowdam['naam']) . '</a>';
98
+            $dam = '<img src="assets/images/female.gif"><a href="dog.php?id='.$row['mother'].'">'.stripslashes($rowdam['naam']).'</a>';
99 99
         }
100 100
     } else {
101
-        $dam = '<img src="assets/images/female.gif"><a href="seldog.php?curval=' . $row['id'] . '&gend=1&letter=A">' . _MA_PEDIGREE_UNKNOWN . '</a>';
101
+        $dam = '<img src="assets/images/female.gif"><a href="seldog.php?curval='.$row['id'].'&gend=1&letter=A">'._MA_PEDIGREE_UNKNOWN.'</a>';
102 102
     }
103 103
     //picture
104 104
     if ('' != $row['foto']) {
105
-        $picture = '<img src=' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $row['foto'] . '_400.jpeg>';
105
+        $picture = '<img src='.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$row['foto'].'_400.jpeg>';
106 106
     } else {
107
-        $picture = '<a href="update.php?id=' . $row['id'] . '&fld=pc">' . _MA_PEDIGREE_UNKNOWN . '</a>';
107
+        $picture = '<a href="update.php?id='.$row['id'].'&fld=pc">'._MA_PEDIGREE_UNKNOWN.'</a>';
108 108
     }
109 109
     //inbred precentage
110 110
     if ('' == $row['coi']) {
111 111
         if (0 != $row['father'] && 0 != $row['mother']) {
112
-            $inbred = '<a href="coi.php?s=' . $row['father'] . '&d=' . $row['mother'] . '&dogid=' . $row['id'] . '&detail=1">' . strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]) . '</a>';
112
+            $inbred = '<a href="coi.php?s='.$row['father'].'&d='.$row['mother'].'&dogid='.$row['id'].'&detail=1">'.strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]).'</a>';
113 113
         } else {
114 114
             $inbred = _MA_PEDIGREE_COI_MORE;
115 115
         }
116 116
     } else {
117
-        $inbred = '<a href="coi.php?s=' . $row['father'] . '&d=' . $row['mother'] . '&dogid=' . $row['id'] . '&detail=1" title="' . strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]) . '">' . $row['coi'] . ' %</a>';
117
+        $inbred = '<a href="coi.php?s='.$row['father'].'&d='.$row['mother'].'&dogid='.$row['id'].'&detail=1" title="'.strtr(_MA_PEDIGREE_COI_WAIT, ['[animalType]' => $moduleConfig['animalType']]).'">'.$row['coi'].' %</a>';
118 118
     }
119 119
     //brothers and sisters
120 120
     $bas = Pedigree\Utility::bas($id, $row['father'], $row['mother']);
@@ -137,46 +137,46 @@  discard block
 block discarded – undo
137 137
     //name
138 138
     $items[] = [
139 139
         'header' => _MA_PEDIGREE_FLD_NAME,
140
-        'data'   => '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $naam . '</a> (click to view pedigree)',
141
-        'edit'   => '<a href="update.php?id=' . $row['id'] . "&fld=nm\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
140
+        'data'   => '<a href="pedigree.php?pedid='.$row['id'].'">'.$naam.'</a> (click to view pedigree)',
141
+        'edit'   => '<a href="update.php?id='.$row['id']."&fld=nm\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
142 142
     ];
143 143
     if ('1' == $moduleConfig['ownerbreeder']) {
144 144
         //owner
145 145
         $items[] = [
146 146
             'header' => _MA_PEDIGREE_FLD_OWNE,
147 147
             'data'   => $eig,
148
-            'edit'   => '<a href="update.php?id=' . $row['id'] . "&fld=ow\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
148
+            'edit'   => '<a href="update.php?id='.$row['id']."&fld=ow\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
149 149
         ];
150 150
         //breeder
151 151
         $items[] = [
152 152
             'header' => _MA_PEDIGREE_FLD_BREE,
153 153
             'data'   => $fok,
154
-            'edit'   => '<a href="update.php?id=' . $row['id'] . "&fld=br\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
154
+            'edit'   => '<a href="update.php?id='.$row['id']."&fld=br\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
155 155
         ];
156 156
     }
157 157
     //gender
158 158
     $items[] = [
159 159
         'header' => _MA_PEDIGREE_FLD_GEND,
160 160
         'data'   => $gender,
161
-        'edit'   => '<a href="update.php?id=' . $row['id'] . "&fld=sx\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
161
+        'edit'   => '<a href="update.php?id='.$row['id']."&fld=sx\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
162 162
     ];
163 163
     //sire
164 164
     $items[] = [
165 165
         'header' => strtr(_MA_PEDIGREE_FLD_FATH, ['[father]' => $moduleConfig['father']]),
166 166
         'data'   => $sire,
167
-        'edit'   => '<a href="seldog.php?curval=' . $row['id'] . "&gend=0&letter=A\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
167
+        'edit'   => '<a href="seldog.php?curval='.$row['id']."&gend=0&letter=A\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
168 168
     ];
169 169
     //dam
170 170
     $items[] = [
171 171
         'header' => strtr(_MA_PEDIGREE_FLD_MOTH, ['[mother]' => $moduleConfig['mother']]),
172 172
         'data'   => $dam,
173
-        'edit'   => '<a href="seldog.php?curval=' . $row['id'] . "&gend=1&letter=A\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
173
+        'edit'   => '<a href="seldog.php?curval='.$row['id']."&gend=1&letter=A\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
174 174
     ];
175 175
     //picture
176 176
     $items[] = [
177 177
         'header' => _MA_PEDIGREE_FLD_PICT,
178 178
         'data'   => $picture,
179
-        'edit'   => '<a href="update.php?id=' . $row['id'] . "&fld=pc\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a><a href=\"dog.php?id=" . $row['id'] . "&delpicture=true\"><img src=' " . $pathIcon16 . "/delete.png' border='0' alt=_DELETE title=_DELETE></a>"
179
+        'edit'   => '<a href="update.php?id='.$row['id']."&fld=pc\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a><a href=\"dog.php?id=".$row['id']."&delpicture=true\"><img src=' ".$pathIcon16."/delete.png' border='0' alt=_DELETE title=_DELETE></a>"
180 180
     ];
181 181
 
182 182
     //userdefined fields
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                 $items[] = [
203 203
                     'header' => $userField->getSetting('FieldName'),
204 204
                     'data'   => $fieldObject->showValue(),
205
-                    'edit'   => '<a href="update.php?id=' . $row['id'] . '&fld=' . $iValue . "\"><img src=' " . $pathIcon16 . "/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
205
+                    'edit'   => '<a href="update.php?id='.$row['id'].'&fld='.$iValue."\"><img src=' ".$pathIcon16."/edit.png' border='0' alt=_EDIT title=_EDIT></a>"
206 206
                 ];
207 207
             }
208 208
         }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     if ('1' == $moduleConfig['proversion']) {
256 256
         $items[] = [
257 257
             'header' => 'Inbred Pedigree',
258
-            'data'   => '<a href="mpedigree.php?pedid=' . $row['id'] . '">Inbreeding pedigree</a>',
258
+            'data'   => '<a href="mpedigree.php?pedid='.$row['id'].'">Inbreeding pedigree</a>',
259 259
             'edit'   => ''
260 260
         ];
261 261
     }
@@ -268,13 +268,13 @@  discard block
 block discarded – undo
268 268
 $xoopsTpl->assign('dogs', $dogs);
269 269
 $xoopsTpl->assign('columns', $columns);
270 270
 $xoopsTpl->assign('numofcolumns', $numofcolumns);
271
-$xoopsTpl->assign('nummatch', $numMatch . ' Animals found.');
271
+$xoopsTpl->assign('nummatch', $numMatch.' Animals found.');
272 272
 
273 273
 //bas
274 274
 $xoopsTpl->assign('dogs1', $dogs1);
275 275
 $xoopsTpl->assign('columns1', $columns1);
276 276
 $xoopsTpl->assign('numofcolumns1', $numofcolumns1);
277
-$xoopsTpl->assign('nummatch1', $nummatch1 . ' Animals found.');
277
+$xoopsTpl->assign('nummatch1', $nummatch1.' Animals found.');
278 278
 
279 279
 //both pups and bas
280 280
 $xoopsTpl->assign('width', 100 / $numofcolumns);
@@ -293,5 +293,5 @@  discard block
 block discarded – undo
293 293
 $xoopsTpl->assign('delete', _DELETE);
294 294
 
295 295
 //comments and footer
296
-include XOOPS_ROOT_PATH . '/include/comment_view.php';
297
-include XOOPS_ROOT_PATH . '/footer.php';
296
+include XOOPS_ROOT_PATH.'/include/comment_view.php';
297
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
phpthumb/phpThumb.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             $phpThumb->ErrorImage('ERROR: "' . $SourceFilename . '" cannot be read');
264 264
         }
265 265
     }
266
-   if (\Xmf\Request::hasVar('HTTP_REFERER', 'SERVER')) {
266
+    if (\Xmf\Request::hasVar('HTTP_REFERER', 'SERVER')) {
267 267
         $phpThumb->ErrorImage('&md5s=' . $md5s);
268 268
     } else {
269 269
         die('&md5s=' . $md5s);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
                 $phpThumb->ErrorImage('Headers already sent (' . basename(__FILE__) . ' line ' . __LINE__ . ')');
585 585
                 exit;
586 586
             }
587
-           if (\Xmf\Request::hasVar('phpThumbDebug', 'GET')) {
587
+            if (\Xmf\Request::hasVar('phpThumbDebug', 'GET')) {
588 588
                 $phpThumb->DebugTimingMessage('skipped direct $SourceFilename passthru', __FILE__, __LINE__);
589 589
                 $phpThumb->DebugMessage('Would have passed "' . $SourceFilename . '" through directly, but skipping due to phpThumbDebug', __FILE__, __LINE__);
590 590
                 break;
Please login to merge, or discard this patch.
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
         return false;
34 34
     }
35 35
     global $phpThumb;
36
-    $downloadfilename = phpthumb_functions::SanitizeFilename(!empty($_GET['sia']) ? $_GET['sia'] : (!empty($_GET['down']) ? $_GET['down'] : 'phpThumb_generated_thumbnail.' . (!empty($_GET['f']) ? $_GET['f'] : 'jpg')));
36
+    $downloadfilename = phpthumb_functions::SanitizeFilename(!empty($_GET['sia']) ? $_GET['sia'] : (!empty($_GET['down']) ? $_GET['down'] : 'phpThumb_generated_thumbnail.'.(!empty($_GET['f']) ? $_GET['f'] : 'jpg')));
37 37
     if (!empty($downloadfilename)) {
38
-        $phpThumb->DebugMessage('SendSaveAsFileHeaderIfNeeded() sending header: Content-Disposition: ' . (!empty($_GET['down']) ? 'attachment' : 'inline') . '; filename="' . $downloadfilename . '"', __FILE__, __LINE__);
39
-        header('Content-Disposition: ' . (!empty($_GET['down']) ? 'attachment' : 'inline') . '; filename="' . $downloadfilename . '"');
38
+        $phpThumb->DebugMessage('SendSaveAsFileHeaderIfNeeded() sending header: Content-Disposition: '.(!empty($_GET['down']) ? 'attachment' : 'inline').'; filename="'.$downloadfilename.'"', __FILE__, __LINE__);
39
+        header('Content-Disposition: '.(!empty($_GET['down']) ? 'attachment' : 'inline').'; filename="'.$downloadfilename.'"');
40 40
     }
41 41
 
42 42
     return true;
@@ -72,43 +72,43 @@  discard block
 block discarded – undo
72 72
     } elseif ($phpThumb->phpThumbDebug) {
73 73
         $phpThumb->DebugTimingMessage('skipped using cached image', __FILE__, __LINE__);
74 74
         $phpThumb->DebugMessage('Would have used cached file, but skipping due to phpThumbDebug', __FILE__, __LINE__);
75
-        $phpThumb->DebugMessage('* Would have sent headers (1): Last-Modified: ' . gmdate('D, d M Y H:i:s', $nModified) . ' GMT', __FILE__, __LINE__);
75
+        $phpThumb->DebugMessage('* Would have sent headers (1): Last-Modified: '.gmdate('D, d M Y H:i:s', $nModified).' GMT', __FILE__, __LINE__);
76 76
         if ($getimagesize = @getimagesize($phpThumb->cache_filename)) {
77
-            $phpThumb->DebugMessage('* Would have sent headers (2): Content-Type: ' . phpthumb_functions::ImageTypeToMIMEtype($getimagesize[2]), __FILE__, __LINE__);
77
+            $phpThumb->DebugMessage('* Would have sent headers (2): Content-Type: '.phpthumb_functions::ImageTypeToMIMEtype($getimagesize[2]), __FILE__, __LINE__);
78 78
         }
79
-        if (preg_match('#^' . preg_quote($nice_docroot) . '(.*)$#', $nice_cachefile, $matches)) {
80
-            $phpThumb->DebugMessage('* Would have sent headers (3): Location: ' . dirname($matches[1]) . '/' . urlencode(basename($matches[1])), __FILE__, __LINE__);
79
+        if (preg_match('#^'.preg_quote($nice_docroot).'(.*)$#', $nice_cachefile, $matches)) {
80
+            $phpThumb->DebugMessage('* Would have sent headers (3): Location: '.dirname($matches[1]).'/'.urlencode(basename($matches[1])), __FILE__, __LINE__);
81 81
         } else {
82
-            $phpThumb->DebugMessage('* Would have sent data: readfile(' . $phpThumb->cache_filename . ')', __FILE__, __LINE__);
82
+            $phpThumb->DebugMessage('* Would have sent data: readfile('.$phpThumb->cache_filename.')', __FILE__, __LINE__);
83 83
         }
84 84
     } else {
85 85
         if (headers_sent()) {
86
-            $phpThumb->ErrorImage('Headers already sent (' . basename(__FILE__) . ' line ' . __LINE__ . ')');
86
+            $phpThumb->ErrorImage('Headers already sent ('.basename(__FILE__).' line '.__LINE__.')');
87 87
             exit;
88 88
         }
89 89
         SendSaveAsFileHeaderIfNeeded();
90 90
 
91 91
         header('Cache-Control: private');
92 92
         header('Pragma: private');
93
-        header('Cache-Control: max-age=' . $phpThumb->getParameter('config_cache_maxage'));
94
-        header('Expires: ' . date(DATE_RFC1123, time() + $phpThumb->getParameter('config_cache_maxage')));
93
+        header('Cache-Control: max-age='.$phpThumb->getParameter('config_cache_maxage'));
94
+        header('Expires: '.date(DATE_RFC1123, time() + $phpThumb->getParameter('config_cache_maxage')));
95 95
         if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) && ($nModified == strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']))
96 96
             && !empty($_SERVER['SERVER_PROTOCOL'])) {
97
-            header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $nModified) . ' GMT');
98
-            header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
97
+            header('Last-Modified: '.gmdate('D, d M Y H:i:s', $nModified).' GMT');
98
+            header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified');
99 99
             exit;
100 100
         }
101
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $nModified) . ' GMT');
102
-        header('ETag: "' . md5_file($phpThumb->cache_filename) . '"');
101
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s', $nModified).' GMT');
102
+        header('ETag: "'.md5_file($phpThumb->cache_filename).'"');
103 103
         if ($getimagesize = @getimagesize($phpThumb->cache_filename)) {
104
-            header('Content-Type: ' . phpthumb_functions::ImageTypeToMIMEtype($getimagesize[2]));
104
+            header('Content-Type: '.phpthumb_functions::ImageTypeToMIMEtype($getimagesize[2]));
105 105
         } elseif (preg_match('#\\.ico$#i', $phpThumb->cache_filename)) {
106 106
             header('Content-Type: image/x-icon');
107 107
         }
108
-        header('Content-Length: ' . filesize($phpThumb->cache_filename));
108
+        header('Content-Length: '.filesize($phpThumb->cache_filename));
109 109
         if (empty($phpThumb->config_cache_force_passthru)
110
-            && preg_match('#^' . preg_quote($nice_docroot) . '(.*)$#', $nice_cachefile, $matches)) {
111
-            header('Location: ' . dirname($matches[1]) . '/' . urlencode(basename($matches[1])));
110
+            && preg_match('#^'.preg_quote($nice_docroot).'(.*)$#', $nice_cachefile, $matches)) {
111
+            header('Location: '.dirname($matches[1]).'/'.urlencode(basename($matches[1])));
112 112
         } else {
113 113
             @readfile($phpThumb->cache_filename);
114 114
         }
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 
121 121
 // instantiate a new phpThumb() object
122 122
 ob_start();
123
-if (!require_once __DIR__ . '/phpthumb.class.php') {
123
+if (!require_once __DIR__.'/phpthumb.class.php') {
124 124
     ob_end_flush();
125
-    die('failed to include_once("' . realpath(__DIR__ . '/phpthumb.class.php') . '")');
125
+    die('failed to include_once("'.realpath(__DIR__.'/phpthumb.class.php').'")');
126 126
 }
127 127
 ob_end_clean();
128 128
 $phpThumb = new phpThumb();
@@ -130,36 +130,36 @@  discard block
 block discarded – undo
130 130
 $phpThumb->setParameter('config_error_die_on_error', true);
131 131
 
132 132
 if (!phpthumb_functions::FunctionIsDisabled('set_time_limit')) {
133
-    set_time_limit(60);  // shouldn't take nearly this long in most cases, but with many filters and/or a slow server...
133
+    set_time_limit(60); // shouldn't take nearly this long in most cases, but with many filters and/or a slow server...
134 134
 }
135 135
 
136 136
 // phpThumbDebug[0] used to be here, but may reveal too much
137 137
 // info when high_security_mode should be enabled (not set yet)
138 138
 
139
-if (file_exists(__DIR__ . '/phpThumb.config.php')) {
139
+if (file_exists(__DIR__.'/phpThumb.config.php')) {
140 140
     ob_start();
141
-    if (require_once __DIR__ . '/phpThumb.config.php') {
141
+    if (require_once __DIR__.'/phpThumb.config.php') {
142 142
         // great
143 143
     } else {
144 144
         ob_end_flush();
145 145
         $phpThumb->config_disable_debug = false; // otherwise error message won't print
146
-        $phpThumb->ErrorImage('failed to include_once(' . __DIR__ . '/phpThumb.config.php) - realpath="' . realpath(__DIR__ . '/phpThumb.config.php') . '"');
146
+        $phpThumb->ErrorImage('failed to include_once('.__DIR__.'/phpThumb.config.php) - realpath="'.realpath(__DIR__.'/phpThumb.config.php').'"');
147 147
     }
148 148
     ob_end_clean();
149
-} elseif (file_exists(__DIR__ . '/phpThumb.config.php.default')) {
149
+} elseif (file_exists(__DIR__.'/phpThumb.config.php.default')) {
150 150
     $phpThumb->config_disable_debug = false; // otherwise error message won't print
151 151
     $phpThumb->ErrorImage('Please rename "phpThumb.config.php.default" to "phpThumb.config.php"');
152 152
 } else {
153 153
     $phpThumb->config_disable_debug = false; // otherwise error message won't print
154
-    $phpThumb->ErrorImage('failed to include_once(' . __DIR__ . '/phpThumb.config.php) - realpath="' . realpath(__DIR__ . '/phpThumb.config.php') . '"');
154
+    $phpThumb->ErrorImage('failed to include_once('.__DIR__.'/phpThumb.config.php) - realpath="'.realpath(__DIR__.'/phpThumb.config.php').'"');
155 155
 }
156 156
 
157 157
 if (!empty($PHPTHUMB_CONFIG)) {
158 158
     foreach ($PHPTHUMB_CONFIG as $key => $value) {
159
-        $keyname = 'config_' . $key;
159
+        $keyname = 'config_'.$key;
160 160
         $phpThumb->setParameter($keyname, $value);
161 161
         if (!preg_match('#(password|mysql)#i', $key)) {
162
-            $phpThumb->DebugMessage('setParameter(' . $keyname . ', ' . $phpThumb->phpThumbDebugVarDump($value) . ')', __FILE__, __LINE__);
162
+            $phpThumb->DebugMessage('setParameter('.$keyname.', '.$phpThumb->phpThumbDebugVarDump($value).')', __FILE__, __LINE__);
163 163
         }
164 164
     }
165 165
     if (!$phpThumb->config_disable_debug) {
@@ -176,10 +176,10 @@  discard block
 block discarded – undo
176 176
     $_SERVER['PHP_SELF'] = str_replace($_SERVER['PATH_INFO'], '', @$_SERVER['PHP_SELF']);
177 177
 
178 178
     $args = explode(';', substr($_SERVER['PATH_INFO'], 1));
179
-    $phpThumb->DebugMessage('PATH_INFO.$args set to (' . implode(')(', $args) . ')', __FILE__, __LINE__);
179
+    $phpThumb->DebugMessage('PATH_INFO.$args set to ('.implode(')(', $args).')', __FILE__, __LINE__);
180 180
     if (!empty($args)) {
181 181
         $_GET['src'] = @$args[count($args) - 1];
182
-        $phpThumb->DebugMessage('PATH_INFO."src" = "' . $_GET['src'] . '"', __FILE__, __LINE__);
182
+        $phpThumb->DebugMessage('PATH_INFO."src" = "'.$_GET['src'].'"', __FILE__, __LINE__);
183 183
         if (preg_match('#^new\=([a-z0-9]+)#i', $_GET['src'], $matches)) {
184 184
             unset($_GET['src']);
185 185
             $_GET['new'] = $matches[1];
@@ -188,17 +188,17 @@  discard block
 block discarded – undo
188 188
     if (preg_match('#^([0-9]*)x?([0-9]*)$#i', @$args[count($args) - 2], $matches)) {
189 189
         $_GET['w'] = $matches[1];
190 190
         $_GET['h'] = $matches[2];
191
-        $phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "' . $_GET['w'] . '"x"' . $_GET['h'] . '"', __FILE__, __LINE__);
191
+        $phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "'.$_GET['w'].'"x"'.$_GET['h'].'"', __FILE__, __LINE__);
192 192
     }
193 193
     for ($i = 0; $i < count($args) - 2; $i++) {
194 194
         @list($key, $value) = explode('=', @$args[$i]);
195 195
         if ('[]' === substr($key, -2)) {
196 196
             $array_key_name          = substr($key, 0, -2);
197 197
             $_GET[$array_key_name][] = $value;
198
-            $phpThumb->DebugMessage('PATH_INFO."' . $array_key_name . '[]" = "' . $value . '"', __FILE__, __LINE__);
198
+            $phpThumb->DebugMessage('PATH_INFO."'.$array_key_name.'[]" = "'.$value.'"', __FILE__, __LINE__);
199 199
         } else {
200 200
             $_GET[$key] = $value;
201
-            $phpThumb->DebugMessage('PATH_INFO."' . $key . '" = "' . $value . '"', __FILE__, __LINE__);
201
+            $phpThumb->DebugMessage('PATH_INFO."'.$key.'" = "'.$value.'"', __FILE__, __LINE__);
202 202
         }
203 203
     }
204 204
 }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     } elseif (phpthumb_functions::PasswordStrength($phpThumb->config_high_security_password) < 20) {
211 211
         $phpThumb->config_disable_debug = false; // otherwise error message won't print
212 212
         $phpThumb->ErrorImage('ERROR: $PHPTHUMB_CONFIG[high_security_password] is not complex enough');
213
-    } elseif ($_GET['hash'] != md5(str_replace($phpThumb->config_high_security_url_separator . 'hash=' . $_GET['hash'], '', $_SERVER['QUERY_STRING']) . $phpThumb->config_high_security_password)) {
213
+    } elseif ($_GET['hash'] != md5(str_replace($phpThumb->config_high_security_url_separator.'hash='.$_GET['hash'], '', $_SERVER['QUERY_STRING']).$phpThumb->config_high_security_password)) {
214 214
         header('HTTP/1.0 403 Forbidden');
215 215
         sleep(10); // deliberate delay to discourage password-guessing
216 216
         $phpThumb->ErrorImage('ERROR: invalid hash');
@@ -253,26 +253,26 @@  discard block
 block discarded – undo
253 253
                 $md5s = md5($rawImageData);
254 254
             }
255 255
         } else {
256
-            $phpThumb->ErrorImage('only FTP and HTTP/HTTPS protocols are allowed, "' . $protocol_matches[1] . '" is not');
256
+            $phpThumb->ErrorImage('only FTP and HTTP/HTTPS protocols are allowed, "'.$protocol_matches[1].'" is not');
257 257
         }
258 258
     } else {
259 259
         $SourceFilename = $phpThumb->ResolveFilenameToAbsolute($_GET['src']);
260 260
         if (is_readable($SourceFilename)) {
261 261
             $md5s = phpthumb_functions::md5_file_safe($SourceFilename);
262 262
         } else {
263
-            $phpThumb->ErrorImage('ERROR: "' . $SourceFilename . '" cannot be read');
263
+            $phpThumb->ErrorImage('ERROR: "'.$SourceFilename.'" cannot be read');
264 264
         }
265 265
     }
266 266
    if (\Xmf\Request::hasVar('HTTP_REFERER', 'SERVER')) {
267
-        $phpThumb->ErrorImage('&md5s=' . $md5s);
267
+        $phpThumb->ErrorImage('&md5s='.$md5s);
268 268
     } else {
269
-        die('&md5s=' . $md5s);
269
+        die('&md5s='.$md5s);
270 270
     }
271 271
 }
272 272
 
273 273
 if (!empty($_GET['src']) && empty($phpThumb->config_allow_local_http_src)
274
-    && preg_match('#^http://' . @$_SERVER['HTTP_HOST'] . '(.+)#i', $_GET['src'], $matches)) {
275
-    $phpThumb->ErrorImage('It is MUCH better to specify the "src" parameter as "' . $matches[1] . '" instead of "' . $matches[0] . '".' . "\n\n" . 'If you really must do it this way, enable "allow_local_http_src" in phpThumb.config.php');
274
+    && preg_match('#^http://'.@$_SERVER['HTTP_HOST'].'(.+)#i', $_GET['src'], $matches)) {
275
+    $phpThumb->ErrorImage('It is MUCH better to specify the "src" parameter as "'.$matches[1].'" instead of "'.$matches[0].'".'."\n\n".'If you really must do it this way, enable "allow_local_http_src" in phpThumb.config.php');
276 276
 }
277 277
 
278 278
 ////////////////////////////////////////////////////////////////
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 $parsed_url_referer = phpthumb_functions::ParseURLbetter(@$_SERVER['HTTP_REFERER']);
287 287
 if ($phpThumb->config_nooffsitelink_require_refer
288 288
     && !in_array(@$parsed_url_referer['host'], $phpThumb->config_nohotlink_valid_domains)) {
289
-    $phpThumb->ErrorImage('config_nooffsitelink_require_refer enabled and ' . (@$parsed_url_referer['host'] ? '"' . $parsed_url_referer['host'] . '" is not an allowed referer' : 'no HTTP_REFERER exists'));
289
+    $phpThumb->ErrorImage('config_nooffsitelink_require_refer enabled and '.(@$parsed_url_referer['host'] ? '"'.$parsed_url_referer['host'].'" is not an allowed referer' : 'no HTTP_REFERER exists'));
290 290
 }
291 291
 $parsed_url_src = phpthumb_functions::ParseURLbetter(@$_GET['src']);
292 292
 if ($phpThumb->config_nohotlink_enabled && $phpThumb->config_nohotlink_erase_image
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
             }
306 306
         }
307 307
         if ($found_missing_function) {
308
-            $phpThumb->ErrorImage('SQL function unavailable: ' . $found_missing_function);
308
+            $phpThumb->ErrorImage('SQL function unavailable: '.$found_missing_function);
309 309
         } else {
310 310
             $mysqli = new mysqli($phpThumb->config_mysql_hostname, $phpThumb->config_mysql_username, $phpThumb->config_mysql_password, $phpThumb->config_mysql_database);
311 311
             if ($mysqli->connect_error) {
312
-                $phpThumb->ErrorImage('MySQLi connect error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
312
+                $phpThumb->ErrorImage('MySQLi connect error ('.$mysqli->connect_errno.') '.$mysqli->connect_error);
313 313
             } else {
314 314
                 if ($result = $mysqli->query($phpThumb->config_mysql_query)) {
315 315
                     if ($row = $result->fetch_array()) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                     }
325 325
                 } else {
326 326
                     $mysqli->close();
327
-                    $phpThumb->ErrorImage('Error in MySQL query: "' . $mysqli->error . '"');
327
+                    $phpThumb->ErrorImage('Error in MySQL query: "'.$mysqli->error.'"');
328 328
                 }
329 329
             }
330 330
             unset($_GET['id']);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             }
340 340
         }
341 341
         if ($found_missing_function) {
342
-            $phpThumb->ErrorImage('SQL function unavailable: ' . $found_missing_function);
342
+            $phpThumb->ErrorImage('SQL function unavailable: '.$found_missing_function);
343 343
         } else {
344 344
             if ($cid = @mysql_connect($phpThumb->config_mysql_hostname, $phpThumb->config_mysql_username, $phpThumb->config_mysql_password)) {
345 345
                 if (@mysqli_select_db($GLOBALS['xoopsDB']->conn, $phpThumb->config_mysql_database, $cid)) {
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
                         }
357 357
                     } else {
358 358
                         $GLOBALS['xoopsDB']->close($cid);
359
-                        $phpThumb->ErrorImage('Error in MySQL query: "' . $GLOBALS['xoopsDB']->error($cid) . '"');
359
+                        $phpThumb->ErrorImage('Error in MySQL query: "'.$GLOBALS['xoopsDB']->error($cid).'"');
360 360
                     }
361 361
                 } else {
362 362
                     $GLOBALS['xoopsDB']->close($cid);
363
-                    $phpThumb->ErrorImage('cannot select MySQL database: "' . $GLOBALS['xoopsDB']->error($cid) . '"');
363
+                    $phpThumb->ErrorImage('cannot select MySQL database: "'.$GLOBALS['xoopsDB']->error($cid).'"');
364 364
                 }
365 365
             } else {
366 366
                 $phpThumb->ErrorImage('cannot connect to MySQL server');
@@ -425,24 +425,24 @@  discard block
 block discarded – undo
425 425
 foreach ($_GET as $key => $value) {
426 426
     if (!empty($PHPTHUMB_DEFAULTS_DISABLEGETPARAMS) && ('src' !== $key)) {
427 427
         // disabled, do not set parameter
428
-        $phpThumb->DebugMessage('ignoring $_GET[' . $key . '] because of $PHPTHUMB_DEFAULTS_DISABLEGETPARAMS', __FILE__, __LINE__);
428
+        $phpThumb->DebugMessage('ignoring $_GET['.$key.'] because of $PHPTHUMB_DEFAULTS_DISABLEGETPARAMS', __FILE__, __LINE__);
429 429
     } elseif (in_array($key, $allowedGETparameters)) {
430
-        $phpThumb->DebugMessage('setParameter(' . $key . ', ' . $phpThumb->phpThumbDebugVarDump($value) . ')', __FILE__, __LINE__);
430
+        $phpThumb->DebugMessage('setParameter('.$key.', '.$phpThumb->phpThumbDebugVarDump($value).')', __FILE__, __LINE__);
431 431
         $phpThumb->setParameter($key, $value);
432 432
     } else {
433
-        $phpThumb->ErrorImage('Forbidden parameter: ' . $key);
433
+        $phpThumb->ErrorImage('Forbidden parameter: '.$key);
434 434
     }
435 435
 }
436 436
 
437 437
 if (!empty($PHPTHUMB_DEFAULTS) && is_array($PHPTHUMB_DEFAULTS)) {
438
-    $phpThumb->DebugMessage('setting $PHPTHUMB_DEFAULTS[' . implode(';', array_keys($PHPTHUMB_DEFAULTS)) . ']', __FILE__, __LINE__);
438
+    $phpThumb->DebugMessage('setting $PHPTHUMB_DEFAULTS['.implode(';', array_keys($PHPTHUMB_DEFAULTS)).']', __FILE__, __LINE__);
439 439
     foreach ($PHPTHUMB_DEFAULTS as $key => $value) {
440 440
         if (!$PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE
441 441
             || !isset($_GET[$key])) { // set parameter to default value if config is set to allow _GET to override default, OR if no value is passed via _GET for this parameter
442 442
             //$_GET[$key] = $value;
443 443
             //$phpThumb->DebugMessage('PHPTHUMB_DEFAULTS assigning ('.(is_array($value) ? print_r($value, true) : $value).') to $_GET['.$key.']', __FILE__, __LINE__);
444 444
             $phpThumb->setParameter($key, $value);
445
-            $phpThumb->DebugMessage('setParameter(' . $key . ', ' . $phpThumb->phpThumbDebugVarDump($value) . ') from $PHPTHUMB_DEFAULTS', __FILE__, __LINE__);
445
+            $phpThumb->DebugMessage('setParameter('.$key.', '.$phpThumb->phpThumbDebugVarDump($value).') from $PHPTHUMB_DEFAULTS', __FILE__, __LINE__);
446 446
         }
447 447
     }
448 448
 }
@@ -474,13 +474,13 @@  discard block
 block discarded – undo
474 474
 } elseif (preg_match('#^http\://[^\\?&]+\\.(jpe?g|gif|png)$#i', $phpThumb->src)) {
475 475
     // assume is ok to passthru if no other parameters specified
476 476
 } elseif (preg_match('#^(f|ht)tp\://#i', $phpThumb->src)) {
477
-    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because preg_match("#^(f|ht)tp\://#i", ' . $phpThumb->src . ')', __FILE__, __LINE__);
477
+    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because preg_match("#^(f|ht)tp\://#i", '.$phpThumb->src.')', __FILE__, __LINE__);
478 478
     $CanPassThroughDirectly = false;
479 479
 } elseif (!@is_readable($phpThumb->sourceFilename)) {
480
-    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because !@is_readable(' . $phpThumb->sourceFilename . ')', __FILE__, __LINE__);
480
+    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because !@is_readable('.$phpThumb->sourceFilename.')', __FILE__, __LINE__);
481 481
     $CanPassThroughDirectly = false;
482 482
 } elseif (!@is_file($phpThumb->sourceFilename)) {
483
-    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because !@is_file(' . $phpThumb->sourceFilename . ')', __FILE__, __LINE__);
483
+    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because !@is_file('.$phpThumb->sourceFilename.')', __FILE__, __LINE__);
484 484
     $CanPassThroughDirectly = false;
485 485
 }
486 486
 foreach ($_GET as $key => $value) {
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
     }
512 512
 }
513 513
 if (!empty($UnAllowedGET)) {
514
-    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because $_GET[' . implode(';', array_unique($UnAllowedGET)) . '] are set', __FILE__, __LINE__);
514
+    $phpThumb->DebugMessage('$CanPassThroughDirectly=false because $_GET['.implode(';', array_unique($UnAllowedGET)).'] are set', __FILE__, __LINE__);
515 515
 }
516 516
 
517 517
 ////////////////////////////////////////////////////////////////
@@ -522,13 +522,13 @@  discard block
 block discarded – undo
522 522
 }
523 523
 ////////////////////////////////////////////////////////////////
524 524
 
525
-$phpThumb->DebugMessage('$CanPassThroughDirectly="' . (int)$CanPassThroughDirectly . '" && $phpThumb->src="' . $phpThumb->src . '"', __FILE__, __LINE__);
525
+$phpThumb->DebugMessage('$CanPassThroughDirectly="'.(int)$CanPassThroughDirectly.'" && $phpThumb->src="'.$phpThumb->src.'"', __FILE__, __LINE__);
526 526
 while ($CanPassThroughDirectly && $phpThumb->src) {
527 527
     // no parameters set, passthru
528 528
 
529 529
     if (preg_match('#^http\://[^\\?&]+\.(jpe?g|gif|png)$#i', $phpThumb->src)) {
530
-        $phpThumb->DebugMessage('Passing HTTP source through directly as Location: redirect (' . $phpThumb->src . ')', __FILE__, __LINE__);
531
-        header('Location: ' . $phpThumb->src);
530
+        $phpThumb->DebugMessage('Passing HTTP source through directly as Location: redirect ('.$phpThumb->src.')', __FILE__, __LINE__);
531
+        header('Location: '.$phpThumb->src);
532 532
         exit;
533 533
     }
534 534
 
@@ -536,20 +536,20 @@  discard block
 block discarded – undo
536 536
 
537 537
     // security and size checks
538 538
     if ($phpThumb->getimagesizeinfo = @getimagesize($SourceFilename)) {
539
-        $phpThumb->DebugMessage('Direct passthru getimagesize() returned [w=' . $phpThumb->getimagesizeinfo[0] . ';h=' . $phpThumb->getimagesizeinfo[1] . ';t=' . $phpThumb->getimagesizeinfo[2] . ']', __FILE__, __LINE__);
539
+        $phpThumb->DebugMessage('Direct passthru getimagesize() returned [w='.$phpThumb->getimagesizeinfo[0].';h='.$phpThumb->getimagesizeinfo[1].';t='.$phpThumb->getimagesizeinfo[2].']', __FILE__, __LINE__);
540 540
 
541 541
         if (!@$_GET['w'] && !@$_GET['wp'] && !@$_GET['wl'] && !@$_GET['ws'] && !@$_GET['h'] && !@$_GET['hp']
542 542
             && !@$_GET['hl']
543 543
             && !@$_GET['hs']) {
544 544
             // no resizing needed
545
-            $phpThumb->DebugMessage('Passing "' . $SourceFilename . '" through directly, no resizing required ("' . $phpThumb->getimagesizeinfo[0] . '"x"' . $phpThumb->getimagesizeinfo[1] . '")', __FILE__, __LINE__);
545
+            $phpThumb->DebugMessage('Passing "'.$SourceFilename.'" through directly, no resizing required ("'.$phpThumb->getimagesizeinfo[0].'"x"'.$phpThumb->getimagesizeinfo[1].'")', __FILE__, __LINE__);
546 546
         } elseif (($phpThumb->getimagesizeinfo[0] <= @$_GET['w']) && ($phpThumb->getimagesizeinfo[1] <= @$_GET['h'])
547 547
                   && ((@$_GET['w'] == $phpThumb->getimagesizeinfo[0])
548 548
                       || (@$_GET['h'] == $phpThumb->getimagesizeinfo[1]))) {
549 549
             // image fits into 'w'x'h' box, and at least one dimension matches exactly, therefore no resizing needed
550
-            $phpThumb->DebugMessage('Passing "' . $SourceFilename . '" through directly, no resizing required ("' . $phpThumb->getimagesizeinfo[0] . '"x"' . $phpThumb->getimagesizeinfo[1] . '" fits inside "' . @$_GET['w'] . '"x"' . @$_GET['h'] . '")', __FILE__, __LINE__);
550
+            $phpThumb->DebugMessage('Passing "'.$SourceFilename.'" through directly, no resizing required ("'.$phpThumb->getimagesizeinfo[0].'"x"'.$phpThumb->getimagesizeinfo[1].'" fits inside "'.@$_GET['w'].'"x"'.@$_GET['h'].'")', __FILE__, __LINE__);
551 551
         } else {
552
-            $phpThumb->DebugMessage('Not passing "' . $SourceFilename . '" through directly because resizing required (from "' . $phpThumb->getimagesizeinfo[0] . '"x"' . $phpThumb->getimagesizeinfo[1] . '" to "' . @$_GET['w'] . '"x"' . @$_GET['h'] . '")', __FILE__, __LINE__);
552
+            $phpThumb->DebugMessage('Not passing "'.$SourceFilename.'" through directly because resizing required (from "'.$phpThumb->getimagesizeinfo[0].'"x"'.$phpThumb->getimagesizeinfo[1].'" to "'.@$_GET['w'].'"x"'.@$_GET['h'].'")', __FILE__, __LINE__);
553 553
             break;
554 554
         }
555 555
         switch ($phpThumb->getimagesizeinfo[2]) {
@@ -560,11 +560,11 @@  discard block
 block discarded – undo
560 560
                 break;
561 561
             default:
562 562
                 // browser probably can't handle format, remangle it to JPEG/PNG/GIF
563
-                $phpThumb->DebugMessage('Not passing "' . $SourceFilename . '" through directly because $phpThumb->getimagesizeinfo[2] = "' . $phpThumb->getimagesizeinfo[2] . '"', __FILE__, __LINE__);
563
+                $phpThumb->DebugMessage('Not passing "'.$SourceFilename.'" through directly because $phpThumb->getimagesizeinfo[2] = "'.$phpThumb->getimagesizeinfo[2].'"', __FILE__, __LINE__);
564 564
                 break 2;
565 565
         }
566 566
 
567
-        $ImageCreateFunctions   = [
567
+        $ImageCreateFunctions = [
568 568
             1 => 'imagecreatefromgif',
569 569
             2 => 'imagecreatefromjpeg',
570 570
             3 => 'imagecreatefrompng'
@@ -581,28 +581,28 @@  discard block
 block discarded – undo
581 581
             }
582 582
 
583 583
             if (headers_sent()) {
584
-                $phpThumb->ErrorImage('Headers already sent (' . basename(__FILE__) . ' line ' . __LINE__ . ')');
584
+                $phpThumb->ErrorImage('Headers already sent ('.basename(__FILE__).' line '.__LINE__.')');
585 585
                 exit;
586 586
             }
587 587
            if (\Xmf\Request::hasVar('phpThumbDebug', 'GET')) {
588 588
                 $phpThumb->DebugTimingMessage('skipped direct $SourceFilename passthru', __FILE__, __LINE__);
589
-                $phpThumb->DebugMessage('Would have passed "' . $SourceFilename . '" through directly, but skipping due to phpThumbDebug', __FILE__, __LINE__);
589
+                $phpThumb->DebugMessage('Would have passed "'.$SourceFilename.'" through directly, but skipping due to phpThumbDebug', __FILE__, __LINE__);
590 590
                 break;
591 591
             }
592 592
 
593 593
             SendSaveAsFileHeaderIfNeeded();
594
-            header('Last-Modified: ' . gmdate('D, d M Y H:i:s', @filemtime($SourceFilename)) . ' GMT');
594
+            header('Last-Modified: '.gmdate('D, d M Y H:i:s', @filemtime($SourceFilename)).' GMT');
595 595
             if ($contentType = phpthumb_functions::ImageTypeToMIMEtype(@$phpThumb->getimagesizeinfo[2])) {
596
-                header('Content-Type: ' . $contentType);
596
+                header('Content-Type: '.$contentType);
597 597
             }
598 598
             @readfile($SourceFilename);
599 599
             exit;
600 600
         } else {
601
-            $phpThumb->DebugMessage('Not passing "' . $SourceFilename . '" through directly because ($phpThumb->config_disable_onlycreateable_passthru = "' . $phpThumb->config_disable_onlycreateable_passthru . '") and ' . $theImageCreateFunction . '() failed', __FILE__, __LINE__);
601
+            $phpThumb->DebugMessage('Not passing "'.$SourceFilename.'" through directly because ($phpThumb->config_disable_onlycreateable_passthru = "'.$phpThumb->config_disable_onlycreateable_passthru.'") and '.$theImageCreateFunction.'() failed', __FILE__, __LINE__);
602 602
             break;
603 603
         }
604 604
     } else {
605
-        $phpThumb->DebugMessage('Not passing "' . $SourceFilename . '" through directly because getimagesize() failed', __FILE__, __LINE__);
605
+        $phpThumb->DebugMessage('Not passing "'.$SourceFilename.'" through directly because getimagesize() failed', __FILE__, __LINE__);
606 606
         break;
607 607
     }
608 608
     break;
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 if (@is_readable($phpThumb->cache_filename)) {
622 622
     RedirectToCachedFile();
623 623
 } else {
624
-    $phpThumb->DebugMessage('Cached file "' . $phpThumb->cache_filename . '" does not exist, processing as normal', __FILE__, __LINE__);
624
+    $phpThumb->DebugMessage('Cached file "'.$phpThumb->cache_filename.'" does not exist, processing as normal', __FILE__, __LINE__);
625 625
 }
626 626
 
627 627
 ////////////////////////////////////////////////////////////////
@@ -656,30 +656,30 @@  discard block
 block discarded – undo
656 656
         $new_background_color = phpthumb_functions::ImageHexColorAllocate($phpThumb->gdimg_source, $bghexcolor, false, $alpha);
657 657
         imagefilledrectangle($phpThumb->gdimg_source, 0, 0, $phpThumb->w, $phpThumb->h, $new_background_color);
658 658
     } else {
659
-        $phpThumb->ErrorImage('failed to create "new" image (' . $phpThumb->w . 'x' . $phpThumb->h . ')');
659
+        $phpThumb->ErrorImage('failed to create "new" image ('.$phpThumb->w.'x'.$phpThumb->h.')');
660 660
     }
661 661
 } elseif (!$phpThumb->src) {
662
-    $phpThumb->ErrorImage('Usage: ' . $_SERVER['PHP_SELF'] . '?src=/path/and/filename.jpg' . "\n" . 'read Usage comments for details');
662
+    $phpThumb->ErrorImage('Usage: '.$_SERVER['PHP_SELF'].'?src=/path/and/filename.jpg'."\n".'read Usage comments for details');
663 663
 } elseif (preg_match('#^([a-z0-9]+)://#i', $_GET['src'], $protocol_matches)) {
664 664
     if (preg_match('#^(f|ht)tps?://#i', $_GET['src'])) {
665
-        $phpThumb->DebugMessage('$phpThumb->src (' . $phpThumb->src . ') is remote image, attempting to download', __FILE__, __LINE__);
665
+        $phpThumb->DebugMessage('$phpThumb->src ('.$phpThumb->src.') is remote image, attempting to download', __FILE__, __LINE__);
666 666
         if ($phpThumb->config_http_user_agent) {
667
-            $phpThumb->DebugMessage('Setting "user_agent" to "' . $phpThumb->config_http_user_agent . '"', __FILE__, __LINE__);
667
+            $phpThumb->DebugMessage('Setting "user_agent" to "'.$phpThumb->config_http_user_agent.'"', __FILE__, __LINE__);
668 668
             ini_set('user_agent', $phpThumb->config_http_user_agent);
669 669
         }
670 670
         $cleanedupurl = phpthumb_functions::CleanUpURLencoding($phpThumb->src);
671
-        $phpThumb->DebugMessage('CleanUpURLencoding(' . $phpThumb->src . ') returned "' . $cleanedupurl . '"', __FILE__, __LINE__);
671
+        $phpThumb->DebugMessage('CleanUpURLencoding('.$phpThumb->src.') returned "'.$cleanedupurl.'"', __FILE__, __LINE__);
672 672
         $phpThumb->src = $cleanedupurl;
673 673
         unset($cleanedupurl);
674 674
         if ($rawImageData = phpthumb_functions::SafeURLread($phpThumb->src, $error, $phpThumb->config_http_fopen_timeout, $phpThumb->config_http_follow_redirect)) {
675
-            $phpThumb->DebugMessage('SafeURLread(' . $phpThumb->src . ') succeeded' . ($error ? ' with messsages: "' . $error . '"' : ''), __FILE__, __LINE__);
676
-            $phpThumb->DebugMessage('Setting source data from URL "' . $phpThumb->src . '"', __FILE__, __LINE__);
675
+            $phpThumb->DebugMessage('SafeURLread('.$phpThumb->src.') succeeded'.($error ? ' with messsages: "'.$error.'"' : ''), __FILE__, __LINE__);
676
+            $phpThumb->DebugMessage('Setting source data from URL "'.$phpThumb->src.'"', __FILE__, __LINE__);
677 677
             $phpThumb->setSourceData($rawImageData, urlencode($phpThumb->src));
678 678
         } else {
679 679
             $phpThumb->ErrorImage($error);
680 680
         }
681 681
     } else {
682
-        $phpThumb->ErrorImage('only FTP and HTTP/HTTPS protocols are allowed, "' . $protocol_matches[1] . '" is not');
682
+        $phpThumb->ErrorImage('only FTP and HTTP/HTTPS protocols are allowed, "'.$protocol_matches[1].'" is not');
683 683
     }
684 684
 }
685 685
 
@@ -714,10 +714,10 @@  discard block
 block discarded – undo
714 714
             chmod($phpThumb->cache_filename, 0644);
715 715
             RedirectToCachedFile();
716 716
         } else {
717
-            $phpThumb->DebugMessage('Failed: RenderToFile(' . $phpThumb->cache_filename . ')', __FILE__, __LINE__);
717
+            $phpThumb->DebugMessage('Failed: RenderToFile('.$phpThumb->cache_filename.')', __FILE__, __LINE__);
718 718
         }
719 719
     } else {
720
-        $phpThumb->DebugMessage('Cannot write to $phpThumb->cache_filename (' . $phpThumb->cache_filename . ') because that directory (' . dirname($phpThumb->cache_filename) . ') is not writable', __FILE__, __LINE__);
720
+        $phpThumb->DebugMessage('Cannot write to $phpThumb->cache_filename ('.$phpThumb->cache_filename.') because that directory ('.dirname($phpThumb->cache_filename).') is not writable', __FILE__, __LINE__);
721 721
     }
722 722
 }
723 723
 
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 ////////////////////////////////////////////////////////////////
731 731
 
732 732
 if (!$phpThumb->OutputThumbnail()) {
733
-    $phpThumb->ErrorImage('Error in OutputThumbnail():' . "\n" . $phpThumb->debugmessages[count($phpThumb->debugmessages) - 1]);
733
+    $phpThumb->ErrorImage('Error in OutputThumbnail():'."\n".$phpThumb->debugmessages[count($phpThumb->debugmessages) - 1]);
734 734
 }
735 735
 
736 736
 ////////////////////////////////////////////////////////////////
Please login to merge, or discard this patch.
phpthumb/phpthumb.gif.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 {
142 142
     // JPEG output that does not require cjpeg added by James Heinrich <[email protected]> - December 10, 2003
143 143
     if (('WIN' !== strtoupper(substr(PHP_OS, 0, 3))) && (file_exists('/usr/local/bin/cjpeg') || shell_exec('which cjpeg'))) {
144
-        if (gif_outputAsBmp($gif, $lpszFileName . '.bmp', $bgColor)) {
145
-            exec('cjpeg ' . $lpszFileName . '.bmp >' . $lpszFileName . ' 2>/dev/null');
146
-            @unlink($lpszFileName . '.bmp');
144
+        if (gif_outputAsBmp($gif, $lpszFileName.'.bmp', $bgColor)) {
145
+            exec('cjpeg '.$lpszFileName.'.bmp >'.$lpszFileName.' 2>/dev/null');
146
+            @unlink($lpszFileName.'.bmp');
147 147
 
148 148
             if (@file_exists($lpszFileName)) {
149 149
                 if (@filesize($lpszFileName) > 0) {
@@ -500,9 +500,9 @@  discard block
 block discarded – undo
500 500
         $ret = '';
501 501
 
502 502
         for ($i = 0; $i < $this->m_nColors; $i++) {
503
-            $ret .= chr($this->m_arColors[$i] & 0x000000FF) . // R
504
-                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
505
-                    chr(($this->m_arColors[$i] & 0x00FF0000) >> 16);  // B
503
+            $ret .= chr($this->m_arColors[$i] & 0x000000FF).// R
504
+                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8).// G
505
+                    chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B
506 506
         }
507 507
 
508 508
         return $ret;
@@ -518,9 +518,9 @@  discard block
 block discarded – undo
518 518
         $ret = '';
519 519
 
520 520
         for ($i = 0; $i < $this->m_nColors; $i++) {
521
-            $ret .= chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B
522
-                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
523
-                    chr($this->m_arColors[$i] & 0x000000FF) . // R
521
+            $ret .= chr(($this->m_arColors[$i] & 0x00FF0000) >> 16).// B
522
+                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8).// G
523
+                    chr($this->m_arColors[$i] & 0x000000FF).// R
524 524
                     "\x00";
525 525
         }
526 526
 
@@ -791,14 +791,14 @@  discard block
 block discarded – undo
791 791
                     if (!$this->m_gih->load($data, $len = 0)) {
792 792
                         return false;
793 793
                     }
794
-                    $data   = substr($data, $len);
794
+                    $data = substr($data, $len);
795 795
                     $datLen += $len;
796 796
 
797 797
                     // ALLOC BUFFER
798 798
                     if (!($this->m_data = $this->m_lzw->deCompress($data, $len = 0))) {
799 799
                         return false;
800 800
                     }
801
-                    $data   = substr($data, $len);
801
+                    $data = substr($data, $len);
802 802
                     $datLen += $len;
803 803
 
804 804
                     if ($this->m_gih->m_bInterlace) {
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
                 $lne          = substr($this->m_data, 0, $this->m_gih->m_nWidth);
914 914
                 $this->m_data = substr($this->m_data, $this->m_gih->m_nWidth);
915 915
 
916
-                $data = substr($data, 0, $y * $this->m_gih->m_nWidth) . $lne . substr($data, ($y + 1) * $this->m_gih->m_nWidth);
916
+                $data = substr($data, 0, $y * $this->m_gih->m_nWidth).$lne.substr($data, ($y + 1) * $this->m_gih->m_nWidth);
917 917
             }
918 918
         }
919 919
 
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
     {
1287 1287
         $val = (int)$val;
1288 1288
 
1289
-        return chr($val & 0xFF) . chr(($val & 0xFF00) >> 8) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF000000) >> 24);
1289
+        return chr($val & 0xFF).chr(($val & 0xFF00) >> 8).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF000000) >> 24);
1290 1290
     }
1291 1291
 
1292 1292
     ///////////////////////////////////////////////////////////////////////////
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
     {
1300 1300
         $val = (int)$val;
1301 1301
 
1302
-        return chr(($val & 0xFF000000) >> 24) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF00) >> 8) . chr($val & 0xFF);
1302
+        return chr(($val & 0xFF000000) >> 24).chr(($val & 0xFF0000) >> 16).chr(($val & 0xFF00) >> 8).chr($val & 0xFF);
1303 1303
     }
1304 1304
 
1305 1305
     ///////////////////////////////////////////////////////////////////////////
Please login to merge, or discard this patch.
phpthumb/phpThumb.config.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
 //            THIS CONFIG FILE ONLY APPLIES TO phpThumb.php //
10 10
 //                                                         ///
11 11
 //////////////////////////////////////////////////////////////
12
-require dirname(dirname(__DIR__)) . '/header.php';
12
+require dirname(dirname(__DIR__)).'/header.php';
13 13
 ob_start();
14
-if (!file_exists(__DIR__ . '/phpthumb.functions.php') || !require_once __DIR__ . '/phpthumb.functions.php') {
14
+if (!file_exists(__DIR__.'/phpthumb.functions.php') || !require_once __DIR__.'/phpthumb.functions.php') {
15 15
     ob_end_flush();
16
-    die('failed to include_once(phpthumb.functions.php) - realpath="' . realpath(__DIR__ . '/phpthumb.functions.php') . '"');
16
+    die('failed to include_once(phpthumb.functions.php) - realpath="'.realpath(__DIR__.'/phpthumb.functions.php').'"');
17 17
 }
18 18
 ob_end_clean();
19 19
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 // * Cache directory configuration (choose only one of these - leave the other lines commented-out):
33 33
 // Note: this directory must be writable (usually chmod 777 is neccesary) for caching to work.
34 34
 // If the directory is not writable no error will be generated but caching will be disabled.
35
-$PHPTHUMB_CONFIG['cache_directory'] = XOOPS_CACHE_PATH;                            // set the cache directory relative to the phpThumb() installation
35
+$PHPTHUMB_CONFIG['cache_directory'] = XOOPS_CACHE_PATH; // set the cache directory relative to the phpThumb() installation
36 36
 //$PHPTHUMB_CONFIG['cache_directory'] = $PHPTHUMB_CONFIG['document_root'].'/phpthumb/cache/'; // set the cache directory to an absolute directory for all source images
37 37
 //$PHPTHUMB_CONFIG['cache_directory'] = './cache/';                                           // set the cache directory relative to the source image - must start with '.' (will not work to cache URL- or database-sourced images, please use an absolute directory name)
38 38
 //$PHPTHUMB_CONFIG['cache_directory'] = null;                                                 // disable thumbnail caching (not recommended)
@@ -50,35 +50,35 @@  discard block
 block discarded – undo
50 50
 //   based on last-access date and/or number of files and/or total filesize.
51 51
 
52 52
 //$PHPTHUMB_CONFIG['cache_maxage'] = null;            // never delete cached thumbnails based on last-access time
53
-$PHPTHUMB_CONFIG['cache_maxage'] = 86400 * 30;        // delete cached thumbnails that haven't been accessed in more than [30 days] (value is maximum time since last access in seconds to avoid deletion)
53
+$PHPTHUMB_CONFIG['cache_maxage'] = 86400 * 30; // delete cached thumbnails that haven't been accessed in more than [30 days] (value is maximum time since last access in seconds to avoid deletion)
54 54
 
55 55
 //$PHPTHUMB_CONFIG['cache_maxsize'] = null;           // never delete cached thumbnails based on byte size of cache directory
56 56
 $PHPTHUMB_CONFIG['cache_maxsize'] = 10 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [10MB] of cached files are present (value is maximum bytesize of all cached files)
57 57
 
58 58
 //$PHPTHUMB_CONFIG['cache_maxfiles'] = null;          // never delete cached thumbnails based on number of cached files
59
-$PHPTHUMB_CONFIG['cache_maxfiles'] = 200;             // delete least-recently-accessed cached thumbnails when more than [200] cached files are present (value is maximum number of cached files to keep)
59
+$PHPTHUMB_CONFIG['cache_maxfiles'] = 200; // delete least-recently-accessed cached thumbnails when more than [200] cached files are present (value is maximum number of cached files to keep)
60 60
 
61 61
 // * Source image cache configuration
62
-$PHPTHUMB_CONFIG['cache_source_enabled']   = true;                               // if true, source images obtained via HTTP are cached to $PHPTHUMB_CONFIG['cache_source_directory']
63
-$PHPTHUMB_CONFIG['cache_source_directory'] = XOOPS_CACHE_PATH;  // set the cache directory for unprocessed source images
62
+$PHPTHUMB_CONFIG['cache_source_enabled']   = true; // if true, source images obtained via HTTP are cached to $PHPTHUMB_CONFIG['cache_source_directory']
63
+$PHPTHUMB_CONFIG['cache_source_directory'] = XOOPS_CACHE_PATH; // set the cache directory for unprocessed source images
64 64
 
65 65
 // * cache source modification date configuration
66 66
 $PHPTHUMB_CONFIG['cache_source_filemtime_ignore_local']  = false; // if true, local source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed
67
-$PHPTHUMB_CONFIG['cache_source_filemtime_ignore_remote'] = true;  // if true, remote source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed. WARNING: cached performance MUCH slower if this is set to false.
67
+$PHPTHUMB_CONFIG['cache_source_filemtime_ignore_remote'] = true; // if true, remote source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed. WARNING: cached performance MUCH slower if this is set to false.
68 68
 
69 69
 // * Simplified cache filename configuration
70 70
 // Instead of creating unique cache filenames for all parameter combinations, create "simple" cache files (eg: "pic_thumb.jpg")
71 71
 // If cache_default_only_suffix is non-empty, GETstring parameters (except 'src') are ignored and only $PHPTHUMB_DEFAULTS
72 72
 // parameters (set at the bottom of phpThumb.config.php) are used for processing.
73 73
 // The '*' character MUST be used to represent the source image name
74
-$PHPTHUMB_CONFIG['cache_default_only_suffix'] = '';           // cached in normal phpThumb manner
74
+$PHPTHUMB_CONFIG['cache_default_only_suffix'] = ''; // cached in normal phpThumb manner
75 75
 //$PHPTHUMB_CONFIG['cache_default_only_suffix'] = '*_thumb';  // cache 'pic.jpg' becomes 'pic_thumb.jpg' (or 'pic_thumb.png' if PNG output is selected, etc)
76 76
 //$PHPTHUMB_CONFIG['cache_default_only_suffix'] = 'small-*';  // cache 'pic.jpg' becomes 'small-pic.jpg' (or 'small-pic.png' if PNG output is selected, etc)
77 77
 
78
-$PHPTHUMB_CONFIG['cache_prefix'] = 'phpThumb_cache_' . (isset($_SERVER['SERVER_NAME']) ? str_replace('www.', '', $_SERVER['SERVER_NAME']) . '_' : ''); // keep cache file separate by domain
78
+$PHPTHUMB_CONFIG['cache_prefix'] = 'phpThumb_cache_'.(isset($_SERVER['SERVER_NAME']) ? str_replace('www.', '', $_SERVER['SERVER_NAME']).'_' : ''); // keep cache file separate by domain
79 79
 //$PHPTHUMB_CONFIG['cache_prefix'] = 'phpThumb_cache';                                                                                             // allow phpThumb to share 1 set of cached files even if accessed under different servername/domains on same server
80 80
 
81
-$PHPTHUMB_CONFIG['cache_force_passthru'] = true;  // if true, cached image data will always be passed to browser; if false, HTTP redirect will be used instead
81
+$PHPTHUMB_CONFIG['cache_force_passthru'] = true; // if true, cached image data will always be passed to browser; if false, HTTP redirect will be used instead
82 82
 
83 83
 // * Temp directory configuration
84 84
 // phpThumb() may need to create temp files. Usually the system temp dir is writable and can be used.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 // you should change this to a full pathname to a directory you do have write access to.
87 87
 //$PHPTHUMB_CONFIG['temp_directory'] = null;                               // attempt to auto-detect
88 88
 //$PHPTHUMB_CONFIG['temp_directory'] = '/tmp/persistent/phpthumb/cache/';  // set to absolute path
89
-$PHPTHUMB_CONFIG['temp_directory'] = $PHPTHUMB_CONFIG['cache_directory'];  // set to same as cache directory
89
+$PHPTHUMB_CONFIG['temp_directory'] = $PHPTHUMB_CONFIG['cache_directory']; // set to same as cache directory
90 90
 
91 91
 // NOTE: "max_source_pixels" only affects GD-resized thumbnails. If you have ImageMagick
92 92
 //       installed it will bypass most of these limits
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 if (phpthumb_functions::version_compare_replacement(PHP_VERSION, '4.3.2', '>=') && !defined('memory_get_usage')
105 105
     && !@ini_get('memory_limit')) {
106 106
     // memory_get_usage() will only be defined if your PHP is compiled with the --enable-memory-limit configuration option.
107
-    $PHPTHUMB_CONFIG['max_source_pixels'] = 0;         // no memory limit
107
+    $PHPTHUMB_CONFIG['max_source_pixels'] = 0; // no memory limit
108 108
 } else {
109 109
     // calculate default max_source_pixels as 1/6 of memory limit configuration
110 110
     $PHPTHUMB_CONFIG['max_source_pixels'] = round(max((int)ini_get('memory_limit'), (int)get_cfg_var('memory_limit')) * 1048576 / 6);
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 }
116 116
 
117 117
 // ImageMagick configuration
118
-$PHPTHUMB_CONFIG['prefer_imagemagick']        = true;  // If true, use ImageMagick to resize thumbnails if possible, since it is usually faster than GD functions; if false only use ImageMagick if PHP memory limit is too low.
119
-$PHPTHUMB_CONFIG['imagemagick_use_thumbnail'] = true;  // If true, use ImageMagick's "-thumbnail" resizing parameter (if available) which removes extra non-image metadata (profiles, EXIF info, etc) resulting in much smaller filesize; if false, use "-resize" paramter which retains this info
118
+$PHPTHUMB_CONFIG['prefer_imagemagick']        = true; // If true, use ImageMagick to resize thumbnails if possible, since it is usually faster than GD functions; if false only use ImageMagick if PHP memory limit is too low.
119
+$PHPTHUMB_CONFIG['imagemagick_use_thumbnail'] = true; // If true, use ImageMagick's "-thumbnail" resizing parameter (if available) which removes extra non-image metadata (profiles, EXIF info, etc) resulting in much smaller filesize; if false, use "-resize" paramter which retains this info
120 120
 if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) {
121 121
     // Windows: set absolute pathname
122 122
     $PHPTHUMB_CONFIG['imagemagick_path'] = 'C:/ImageMagick/convert.exe';
@@ -128,41 +128,41 @@  discard block
 block discarded – undo
128 128
 
129 129
 // * Default output configuration:
130 130
 $PHPTHUMB_CONFIG['output_format']    = 'png'; // default output format ('jpeg', 'png' or 'gif') - thumbnail will be output in this format (if available in your version of GD or ImageMagick). This is only used if the "f" parameter is not specified, and if the thumbnail can't be output in the input format.
131
-$PHPTHUMB_CONFIG['output_maxwidth']  = 0;      // default maximum thumbnail width.  If this is zero then default width  is the width  of the source image. This is always overridden by ?w=___ GETstring parameter
132
-$PHPTHUMB_CONFIG['output_maxheight'] = 0;      // default maximum thumbnail height. If this is zero then default height is the height of the source image. This is always overridden by ?h=___ GETstring parameter
133
-$PHPTHUMB_CONFIG['output_interlace'] = true;   // if true: interlaced output for GIF/PNG, progressive output for JPEG; if false: non-interlaced for GIF/PNG, baseline for JPEG.
131
+$PHPTHUMB_CONFIG['output_maxwidth']  = 0; // default maximum thumbnail width.  If this is zero then default width  is the width  of the source image. This is always overridden by ?w=___ GETstring parameter
132
+$PHPTHUMB_CONFIG['output_maxheight'] = 0; // default maximum thumbnail height. If this is zero then default height is the height of the source image. This is always overridden by ?h=___ GETstring parameter
133
+$PHPTHUMB_CONFIG['output_interlace'] = true; // if true: interlaced output for GIF/PNG, progressive output for JPEG; if false: non-interlaced for GIF/PNG, baseline for JPEG.
134 134
 
135 135
 // * Error message configuration
136
-$PHPTHUMB_CONFIG['error_image_width']           = 300;      // default width for error images
137
-$PHPTHUMB_CONFIG['error_image_height']          = 100;      // default height for error images
138
-$PHPTHUMB_CONFIG['error_message_image_default'] = '';       // Set this to the name of a generic error image (e.g. '/images/error.png') that you want displayed in place of any error message that may occur. This setting is overridden by the 'err' parameter, which does the same thing.
136
+$PHPTHUMB_CONFIG['error_image_width']           = 300; // default width for error images
137
+$PHPTHUMB_CONFIG['error_image_height']          = 100; // default height for error images
138
+$PHPTHUMB_CONFIG['error_message_image_default'] = ''; // Set this to the name of a generic error image (e.g. '/images/error.png') that you want displayed in place of any error message that may occur. This setting is overridden by the 'err' parameter, which does the same thing.
139 139
 $PHPTHUMB_CONFIG['error_bgcolor']               = 'CCCCFF'; // background color of error message images
140 140
 $PHPTHUMB_CONFIG['error_textcolor']             = 'FF0000'; // color of text in error messages
141
-$PHPTHUMB_CONFIG['error_fontsize']              = 1;        // size of text in error messages, from 1 (smallest) to 5 (largest)
142
-$PHPTHUMB_CONFIG['error_die_on_error']          = true;     // die with error message on any fatal error (recommended with standalone phpThumb.php)
143
-$PHPTHUMB_CONFIG['error_silent_die_on_error']   = false;    // simply die with no output of any kind on fatal errors (not recommended)
144
-$PHPTHUMB_CONFIG['error_die_on_source_failure'] = true;     // die with error message if source image cannot be processed by phpThumb() (usually because source image is corrupt in some way). If false the source image will be passed through unprocessed, if true (default) an error message will be displayed.
141
+$PHPTHUMB_CONFIG['error_fontsize']              = 1; // size of text in error messages, from 1 (smallest) to 5 (largest)
142
+$PHPTHUMB_CONFIG['error_die_on_error']          = true; // die with error message on any fatal error (recommended with standalone phpThumb.php)
143
+$PHPTHUMB_CONFIG['error_silent_die_on_error']   = false; // simply die with no output of any kind on fatal errors (not recommended)
144
+$PHPTHUMB_CONFIG['error_die_on_source_failure'] = true; // die with error message if source image cannot be processed by phpThumb() (usually because source image is corrupt in some way). If false the source image will be passed through unprocessed, if true (default) an error message will be displayed.
145 145
 
146 146
 // * Off-server Thumbnailing Configuration:
147
-$PHPTHUMB_CONFIG['nohotlink_enabled']       = false;                                    // If false will allow thumbnailing from any source domain
148
-$PHPTHUMB_CONFIG['nohotlink_valid_domains'] = [@$_SERVER['HTTP_HOST']];            // This is the list of domains for which thumbnails are allowed to be created. Note: domain only, do not include port numbers. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format "www.example.com"
149
-$PHPTHUMB_CONFIG['nohotlink_erase_image']   = true;                                     // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
147
+$PHPTHUMB_CONFIG['nohotlink_enabled']       = false; // If false will allow thumbnailing from any source domain
148
+$PHPTHUMB_CONFIG['nohotlink_valid_domains'] = [@$_SERVER['HTTP_HOST']]; // This is the list of domains for which thumbnails are allowed to be created. Note: domain only, do not include port numbers. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format "www.example.com"
149
+$PHPTHUMB_CONFIG['nohotlink_erase_image']   = true; // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
150 150
 $PHPTHUMB_CONFIG['nohotlink_text_message']  = 'Off-server thumbnailing is not allowed'; // text of error message
151 151
 
152 152
 // * Off-server Linking Configuration:
153
-$PHPTHUMB_CONFIG['nooffsitelink_enabled']       = false;                                       // If false will allow thumbnails to be linked to from any domain, if true only domains listed below in 'nooffsitelink_valid_domains' will be allowed.
154
-$PHPTHUMB_CONFIG['nooffsitelink_valid_domains'] = [@$_SERVER['HTTP_HOST']];              // This is the list of domains for which thumbnails are allowed to be created. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format 'www.example.com'
155
-$PHPTHUMB_CONFIG['nooffsitelink_require_refer'] = false;                                      // If false will allow standalone calls to phpThumb(). If true then only requests with a Request::getString('HTTP_REFERER', '', 'SERVER') value in 'nooffsitelink_valid_domains' are allowed.
156
-$PHPTHUMB_CONFIG['nooffsitelink_erase_image']   = false;                                      // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
157
-$PHPTHUMB_CONFIG['nooffsitelink_watermark_src'] = '/demo/images/watermark.png';                // webroot-relative image to overlay on hotlinked images
158
-$PHPTHUMB_CONFIG['nooffsitelink_text_message']  = 'Image taken from ' . @$_SERVER['HTTP_HOST']; // text of error message (used if [nooffsitelink_watermark_src] is not a valid image)
153
+$PHPTHUMB_CONFIG['nooffsitelink_enabled']       = false; // If false will allow thumbnails to be linked to from any domain, if true only domains listed below in 'nooffsitelink_valid_domains' will be allowed.
154
+$PHPTHUMB_CONFIG['nooffsitelink_valid_domains'] = [@$_SERVER['HTTP_HOST']]; // This is the list of domains for which thumbnails are allowed to be created. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format 'www.example.com'
155
+$PHPTHUMB_CONFIG['nooffsitelink_require_refer'] = false; // If false will allow standalone calls to phpThumb(). If true then only requests with a Request::getString('HTTP_REFERER', '', 'SERVER') value in 'nooffsitelink_valid_domains' are allowed.
156
+$PHPTHUMB_CONFIG['nooffsitelink_erase_image']   = false; // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
157
+$PHPTHUMB_CONFIG['nooffsitelink_watermark_src'] = '/demo/images/watermark.png'; // webroot-relative image to overlay on hotlinked images
158
+$PHPTHUMB_CONFIG['nooffsitelink_text_message']  = 'Image taken from '.@$_SERVER['HTTP_HOST']; // text of error message (used if [nooffsitelink_watermark_src] is not a valid image)
159 159
 
160 160
 // * Border & Background default colors
161 161
 $PHPTHUMB_CONFIG['border_hexcolor']     = '000000'; // Default border color - usual HTML-style hex color notation (overridden with 'bc' parameter)
162 162
 $PHPTHUMB_CONFIG['background_hexcolor'] = 'FFFFFF'; // Default background color when thumbnail aspect ratio does not match fixed-dimension box - usual HTML-style hex color notation (overridden with 'bg' parameter)
163 163
 
164 164
 // * Watermark configuration
165
-$PHPTHUMB_CONFIG['ttf_directory'] = __DIR__ . '/fonts'; // Base directory for TTF font files
165
+$PHPTHUMB_CONFIG['ttf_directory'] = __DIR__.'/fonts'; // Base directory for TTF font files
166 166
 //$PHPTHUMB_CONFIG['ttf_directory'] = 'c:/windows/fonts';
167 167
 
168 168
 // * MySQL configuration
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 $PHPTHUMB_CONFIG['mysql_database'] = '';
181 181
 
182 182
 // * Security configuration
183
-$PHPTHUMB_CONFIG['high_security_enabled']    = false;  // if enabled, requires 'high_security_password' set to be set and requires the use of phpThumbURL() function (at the bottom of phpThumb.config.php) to generate hashed URLs
184
-$PHPTHUMB_CONFIG['high_security_password']   = '';     // required if 'high_security_enabled' is true, and must be at complex (uppercase, lowercase, numbers, punctuation, etc -- punctuation is strongest, lowercase is weakest; see PasswordStrength() in phpThumb.php). You can use a password generator like http://silisoftware.com/tools/password-random.php to generate a strong password
185
-$PHPTHUMB_CONFIG['disable_debug']            = true;   // prevent phpThumb from displaying any information about your system. If true, phpThumbDebug and error messages will be disabled
186
-$PHPTHUMB_CONFIG['allow_src_above_docroot']  = true;  // if true, allow src to be anywhere in filesystem; if false (default) only allow src within document_root
187
-$PHPTHUMB_CONFIG['allow_src_above_phpthumb'] = true;   // if true (default), allow src to be anywhere in filesystem; if false only allow src within sub-directory of phpThumb installation
188
-$PHPTHUMB_CONFIG['allow_parameter_file']     = false;  // if true, allow use of 'file' parameter; if false (default) the 'file' parameter is disabled/ignored
189
-$PHPTHUMB_CONFIG['allow_parameter_goto']     = false;  // if true, allow use of 'goto' parameter; if false (default) the 'goto' parameter is disabled/ignored
183
+$PHPTHUMB_CONFIG['high_security_enabled']    = false; // if enabled, requires 'high_security_password' set to be set and requires the use of phpThumbURL() function (at the bottom of phpThumb.config.php) to generate hashed URLs
184
+$PHPTHUMB_CONFIG['high_security_password']   = ''; // required if 'high_security_enabled' is true, and must be at complex (uppercase, lowercase, numbers, punctuation, etc -- punctuation is strongest, lowercase is weakest; see PasswordStrength() in phpThumb.php). You can use a password generator like http://silisoftware.com/tools/password-random.php to generate a strong password
185
+$PHPTHUMB_CONFIG['disable_debug']            = true; // prevent phpThumb from displaying any information about your system. If true, phpThumbDebug and error messages will be disabled
186
+$PHPTHUMB_CONFIG['allow_src_above_docroot']  = true; // if true, allow src to be anywhere in filesystem; if false (default) only allow src within document_root
187
+$PHPTHUMB_CONFIG['allow_src_above_phpthumb'] = true; // if true (default), allow src to be anywhere in filesystem; if false only allow src within sub-directory of phpThumb installation
188
+$PHPTHUMB_CONFIG['allow_parameter_file']     = false; // if true, allow use of 'file' parameter; if false (default) the 'file' parameter is disabled/ignored
189
+$PHPTHUMB_CONFIG['allow_parameter_goto']     = false; // if true, allow use of 'goto' parameter; if false (default) the 'goto' parameter is disabled/ignored
190 190
 
191 191
 // * HTTP UserAgent configuration
192 192
 //$PHPTHUMB_CONFIG['http_user_agent'] = '';                                                                                      // PHP default: none
@@ -194,12 +194,12 @@  discard block
 block discarded – undo
194 194
 $PHPTHUMB_CONFIG['http_user_agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7'; // Windows XP, Firefox
195 195
 
196 196
 // * Compatibility settings
197
-$PHPTHUMB_CONFIG['disable_pathinfo_parsing']        = false;  // if true, $_SERVER[PATH_INFO] is not parsed. May be needed on some server configurations to allow normal behavior.
198
-$PHPTHUMB_CONFIG['disable_imagecopyresampled']      = false;  // if true, ImageCopyResampled is replaced with ImageCopyResampleBicubic. May be needed for buggy versions of PHP-GD.
199
-$PHPTHUMB_CONFIG['disable_onlycreateable_passthru'] = true;   // if true, any image that can be parsed by getimagesize() can be passed through; if false, only images that can be converted to GD by ImageCreateFrom(JPEG|GIF|PNG) functions are allowed
197
+$PHPTHUMB_CONFIG['disable_pathinfo_parsing']        = false; // if true, $_SERVER[PATH_INFO] is not parsed. May be needed on some server configurations to allow normal behavior.
198
+$PHPTHUMB_CONFIG['disable_imagecopyresampled']      = false; // if true, ImageCopyResampled is replaced with ImageCopyResampleBicubic. May be needed for buggy versions of PHP-GD.
199
+$PHPTHUMB_CONFIG['disable_onlycreateable_passthru'] = true; // if true, any image that can be parsed by getimagesize() can be passed through; if false, only images that can be converted to GD by ImageCreateFrom(JPEG|GIF|PNG) functions are allowed
200 200
 
201 201
 // * HTTP remote file opening settings
202
-$PHPTHUMB_CONFIG['http_fopen_timeout']   = 10;   // timeout (in seconds) for fopen / curl / fsockopen
202
+$PHPTHUMB_CONFIG['http_fopen_timeout']   = 10; // timeout (in seconds) for fopen / curl / fsockopen
203 203
 $PHPTHUMB_CONFIG['http_follow_redirect'] = true; // if true (default), follow "302 Found" redirects to new URL; if false, return error message
204 204
 
205 205
 // * Speed optimizations configuration
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 // START DEFAULT PARAMETERS SECTION
214 214
 // If any parameters are constant across ALL images, you can set them here
215 215
 
216
-$PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE = true;  // if true, any parameters in the URL will override the defaults set here; if false, any parameters set here cannot be overridden in the URL
216
+$PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE = true; // if true, any parameters in the URL will override the defaults set here; if false, any parameters set here cannot be overridden in the URL
217 217
 $PHPTHUMB_DEFAULTS_DISABLEGETPARAMS  = false; // if true, GETstring parameters will be ignored (except for 'src') and only below default parameters will be used; if false, both default and GETstring parameters will be used (depending on $PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE). Will be auto-set true if !empty($PHPTHUMB_CONFIG['cache_default_only_suffix'])
218 218
 
219 219
 //$PHPTHUMB_DEFAULTS['w']    = 200;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 {
237 237
     global $PHPTHUMB_CONFIG;
238 238
 
239
-    return str_replace(@$PHPTHUMB_CONFIG['document_root'], '', __DIR__) . DIRECTORY_SEPARATOR . 'phpThumb.php?' . $ParameterString . '&hash=' . md5($ParameterString . @$PHPTHUMB_CONFIG['high_security_password']);
239
+    return str_replace(@$PHPTHUMB_CONFIG['document_root'], '', __DIR__).DIRECTORY_SEPARATOR.'phpThumb.php?'.$ParameterString.'&hash='.md5($ParameterString.@$PHPTHUMB_CONFIG['high_security_password']);
240 240
 }
241 241
 
242 242
 ///////////////////////////////////////////////////////////////////////////////
Please login to merge, or discard this patch.
phpthumb/phpthumb.unsharp.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,12 +92,12 @@
 block discarded – undo
92 92
             // Move copies of the image around one pixel at the time and merge them with weight
93 93
             // according to the matrix. The same matrix is simply repeated for higher radii.
94 94
             for ($i = 0; $i < $radius; $i++) {
95
-                imagecopy($imgBlur, $img, 0, 0, 1, 0, $w - 1, $h);               // left
96
-                imagecopymerge($imgBlur, $img, 1, 0, 0, 0, $w, $h, 50);       // right
97
-                imagecopymerge($imgBlur, $img, 0, 0, 0, 0, $w, $h, 50);       // center
95
+                imagecopy($imgBlur, $img, 0, 0, 1, 0, $w - 1, $h); // left
96
+                imagecopymerge($imgBlur, $img, 1, 0, 0, 0, $w, $h, 50); // right
97
+                imagecopymerge($imgBlur, $img, 0, 0, 0, 0, $w, $h, 50); // center
98 98
                 imagecopy($imgCanvas, $imgBlur, 0, 0, 0, 0, $w, $h);
99 99
                 imagecopymerge($imgBlur, $imgCanvas, 0, 0, 0, 1, $w, $h - 1, 33.33333); // up
100
-                imagecopymerge($imgBlur, $imgCanvas, 0, 1, 0, 0, $w, $h, 25);       // down
100
+                imagecopymerge($imgBlur, $imgCanvas, 0, 1, 0, 0, $w, $h, 25); // down
101 101
             }
102 102
         }
103 103
 
Please login to merge, or discard this patch.