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.
advanced.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use XoopsModules\Pedigree;
5 5
 
6 6
 //require_once  dirname(dirname(__DIR__)) . '/mainfile.php';
7
-require_once __DIR__ . '/header.php';
7
+require_once __DIR__.'/header.php';
8 8
 $moduleDirName = basename(__DIR__);
9 9
 xoops_loadLanguage('main', $moduleDirName);
10 10
 
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_advanced.tpl';
15 15
 
16
-include XOOPS_ROOT_PATH . '/header.php';
16
+include XOOPS_ROOT_PATH.'/header.php';
17 17
 // Include any common code for this module.
18
-require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/common.php';
19
-$xoTheme->addScript(XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js');
20
-$xoTheme->addScript(PEDIGREE_URL . '/assets/js/jquery.canvasjs.min.js');
18
+require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/common.php';
19
+$xoTheme->addScript(XOOPS_URL.'/browse.php?Frameworks/jquery/jquery.js');
20
+$xoTheme->addScript(PEDIGREE_URL.'/assets/js/jquery.canvasjs.min.js');
21 21
 
22 22
 global $xoopsTpl, $xoopsDB;
23 23
 $totpl = [];
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 $title   = $colors[7];
42 42
 
43 43
 //query to count male dogs
44
-$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='0'");
44
+$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='0'");
45 45
 list($countmales) = $GLOBALS['xoopsDB']->fetchRow($result);
46 46
 
47 47
 //query to count female dogs
48
-$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='1'");
48
+$result = $GLOBALS['xoopsDB']->query('SELECT count(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='1'");
49 49
 list($countfemales) = $GLOBALS['xoopsDB']->fetchRow($result);
50 50
 
51 51
 /*
@@ -120,40 +120,40 @@  discard block
 block discarded – undo
120 120
     $xoopsTpl->assign('pro', true);
121 121
 }
122 122
 $xoopsTpl->assign('title', strtr(_MA_PEDIGREE_ADV_VTMF, ['[male]' => $moduleConfig['male'], '[female]' => $moduleConfig['female']]));
123
-$xoopsTpl->assign('topmales', '<a href="topstud.php?com=father">' . strtr(_MA_PEDIGREE_ADV_STUD, [
123
+$xoopsTpl->assign('topmales', '<a href="topstud.php?com=father">'.strtr(_MA_PEDIGREE_ADV_STUD, [
124 124
                                 '[male]'     => $moduleConfig['male'],
125 125
                                 '[children]' => $moduleConfig['children']
126
-                            ]) . '</a>');
127
-$xoopsTpl->assign('topfemales', '<a href="topstud.php?com=mother">' . strtr(_MA_PEDIGREE_ADV_BITC, [
126
+                            ]).'</a>');
127
+$xoopsTpl->assign('topfemales', '<a href="topstud.php?com=mother">'.strtr(_MA_PEDIGREE_ADV_BITC, [
128 128
                                   '[female]'   => $moduleConfig['female'],
129 129
                                   '[children]' => $moduleConfig['children']
130
-                              ]) . '</a>');
130
+                              ]).'</a>');
131 131
 $xoopsTpl->assign('tnmftitle', strtr(_MA_PEDIGREE_ADV_TNMFTIT, ['[male]' => $moduleConfig['male'], '[female]' => $moduleConfig['female']]));
132
-$xoopsTpl->assign('countmales', '<img src="assets/images/male.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCMA, [
132
+$xoopsTpl->assign('countmales', '<img src="assets/images/male.gif"> '.strtr(_MA_PEDIGREE_ADV_TCMA, [
133 133
                                   '[male]'   => $moduleConfig['male'],
134 134
                                   '[female]' => $moduleConfig['female']
135
-                              ]) . ' : <a href="result.php?f=roft&w=zero&o=naam">' . $countmales . '</a>');
136
-$xoopsTpl->assign('countfemales', '<img src="assets/images/female.gif"> ' . strtr(_MA_PEDIGREE_ADV_TCFE, [
135
+                              ]).' : <a href="result.php?f=roft&w=zero&o=naam">'.$countmales.'</a>');
136
+$xoopsTpl->assign('countfemales', '<img src="assets/images/female.gif"> '.strtr(_MA_PEDIGREE_ADV_TCFE, [
137 137
                                     '[male]'   => $moduleConfig['male'],
138 138
                                     '[female]' => $moduleConfig['female']
139
-                                ]) . ' : <a href="result.php?f=roft&w=1&o=naam">' . $countfemales) . '</a>';
139
+                                ]).' : <a href="result.php?f=roft&w=1&o=naam">'.$countfemales).'</a>';
140 140
 $xoopsTpl->assign('pienumber', '<img src="assets/images/numbers.png">');
141 141
 $xoopsTpl->assign('totpl', $totpl);
142 142
 $xoopsTpl->assign('books', $books);
143 143
 
144 144
 $xoopsTpl->assign('orptitle', _MA_PEDIGREE_ADV_ORPTIT);
145
-$xoopsTpl->assign('orpall', '<a href="result.php?f=father=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPALL, ['[animalTypes]' => $moduleConfig['animalTypes']]) . '</a>');
146
-$xoopsTpl->assign('orpdad', '<a href="result.php?f=mother!=0 and father&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPDAD, [
145
+$xoopsTpl->assign('orpall', '<a href="result.php?f=father=0 and mother&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPALL, ['[animalTypes]' => $moduleConfig['animalTypes']]).'</a>');
146
+$xoopsTpl->assign('orpdad', '<a href="result.php?f=mother!=0 and father&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPDAD, [
147 147
                               '[father]'      => $moduleConfig['father'],
148 148
                               '[animalTypes]' => $moduleConfig['animalTypes']
149
-                          ]) . '</a>');
150
-$xoopsTpl->assign('orpmum', '<a href="result.php?f=father!=0 and mother&w=zero&o=naam">' . strtr(_MA_PEDIGREE_ADV_ORPMUM, [
149
+                          ]).'</a>');
150
+$xoopsTpl->assign('orpmum', '<a href="result.php?f=father!=0 and mother&w=zero&o=naam">'.strtr(_MA_PEDIGREE_ADV_ORPMUM, [
151 151
                               '[mother]'      => $moduleConfig['mother'],
152 152
                               '[animalTypes]' => $moduleConfig['animalTypes']
153
-                          ]) . '</a>');
153
+                          ]).'</a>');
154 154
 $xoopsTpl->assign('position', _MA_PEDIGREE_M50_POS);
155 155
 $xoopsTpl->assign('numdogs', _MA_PEDIGREE_M50_NUMD);
156 156
 $xoopsTpl->assign('maledogs', $perc_mdogs);
157 157
 $xoopsTpl->assign('femaledogs', $perc_fdogs);
158 158
 //comments and footer
159
-include XOOPS_ROOT_PATH . '/footer.php';
159
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
index.php 1 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.
userqueries/remove escaped slash.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $form        = 'The following animals have been found in your database with a slah. Any escape characters have been removed.<hr>';
4
-$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE naam LIKE '%\'%'";
4
+$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE naam LIKE '%\'%'";
5 5
 $result      = $GLOBALS['xoopsDB']->query($queryString);
6 6
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
7
-    $form .= '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a><br>';
8
-    $sql  = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' SET naam = "' . stripslashes($row['naam']) . "\" WHERE id = '" . $row['id'] . "'";
7
+    $form .= '<a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a><br>';
8
+    $sql = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' SET naam = "'.stripslashes($row['naam'])."\" WHERE id = '".$row['id']."'";
9 9
     $GLOBALS['xoopsDB']->queryF($sql);
10 10
 }
Please login to merge, or discard this patch.
userqueries/animals with a picture.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $form     = 'This is an example of a userquery.<br><br>Shown below are the animals in your database that have a picture.<hr>';
4
-$sql      = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE foto != ''";
4
+$sql      = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE foto != ''";
5 5
 $result   = $GLOBALS['xoopsDB']->query($sql);
6 6
 $countpic = 0;
7 7
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
8
-    $form .= '<a href="pedigree.php?pedid=' . $row['id'] . '">' . $row['naam'] . '</a><br>';
8
+    $form .= '<a href="pedigree.php?pedid='.$row['id'].'">'.$row['naam'].'</a><br>';
9 9
     ++$countpic;
10 10
 }
11
-$form .= '<hr>There are a total of ' . $countpic . ' animals with a picture';
11
+$form .= '<hr>There are a total of '.$countpic.' animals with a picture';
Please login to merge, or discard this patch.
phpthumb/phpThumb.php 1 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.