Passed
Push — master ( 48d769...5ccf6e )
by Michael
07:14
created
class/pedigree.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     protected function __construct($debug)
39 39
     {
40
-        $this->debug   = $debug;
40
+        $this->debug = $debug;
41 41
        $moduleDirName = basename(dirname(__DIR__));
42 42
        parent::__construct($moduleDirName);
43 43
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
             return null;
90 90
         }
91
-        $this->addLog("Getting config '{$name}' : " . print_r($this->config[$name], true));
91
+        $this->addLog("Getting config '{$name}' : ".print_r($this->config[$name], true));
92 92
 
93 93
         return $this->config[$name];
94 94
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $this->initConfig();
106 106
         }
107 107
         $this->config[$name] = $value;
108
-        $this->addLog("Setting config '{$name}' : " . $this->config[$name]);
108
+        $this->addLog("Setting config '{$name}' : ".$this->config[$name]);
109 109
 
110 110
         return $this->config[$name];
111 111
     }
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function getHandler($name)
119 119
     {
120
-        if (!isset($this->handler[$name . 'Handler'])) {
120
+        if (!isset($this->handler[$name.'Handler'])) {
121 121
             $this->initHandler($name);
122 122
         }
123 123
         $this->addLog("Getting handler '{$name}'");
124 124
 
125
-        return $this->handler[$name . 'Handler'];
125
+        return $this->handler[$name.'Handler'];
126 126
     }
127 127
 
128 128
     public function initModule()
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function initHandler($name)
151 151
     {
152
-        $this->addLog('INIT ' . $name . ' HANDLER');
153
-        $this->handler[$name . 'Handler'] = xoops_getModuleHandler($name, $this->dirname);
152
+        $this->addLog('INIT '.$name.' HANDLER');
153
+        $this->handler[$name.'Handler'] = xoops_getModuleHandler($name, $this->dirname);
154 154
     }
155 155
 
156 156
     /**
Please login to merge, or discard this patch.
class/SelectBox.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->fieldnumber  = $parentObject->getId();
47 47
         $this->fieldname    = $parentObject->fieldname;
48
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
48
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
49 49
         $this->defaultvalue = $parentObject->defaultvalue;
50 50
         $this->lookuptable  = $parentObject->lookuptable;
51 51
         if (0 == $this->lookuptable) {
52
-            echo "<span style='color: red;'><h3>A lookuptable must be specified for userfield" . $this->fieldnumber . '</h3></span>';
52
+            echo "<span style='color: red;'><h3>A lookuptable must be specified for userfield".$this->fieldnumber.'</h3></span>';
53 53
         }
54 54
     }
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function editField()
60 60
     {
61
-        $select         = new \XoopsFormSelect('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $value = $this->value, $size = 1, $multiple = false);
61
+        $select         = new \XoopsFormSelect('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $value = $this->value, $size = 1, $multiple = false);
62 62
         $lookupcontents = parent::lookupField($this->fieldnumber);
63 63
         $lcCount        = count($lookupcontents);
64 64
         foreach ($lookupcontents as $i => $iValue) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function newField($name = '')
77 77
     {
78
-        $select         = new \XoopsFormSelect('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $value = $this->defaultvalue, $size = 1, $multiple = false);
78
+        $select         = new \XoopsFormSelect('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $value = $this->defaultvalue, $size = 1, $multiple = false);
79 79
         $lookupcontents = parent::lookupField($this->fieldnumber);
80 80
         $lcCount        = count($lookupcontents);
81 81
         foreach ($lookupcontents as $i => $iValue) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             }
117 117
         }
118 118
 
119
-        return $this->fieldname . ' : ' . $choosenvalue;
119
+        return $this->fieldname.' : '.$choosenvalue;
120 120
     }
121 121
 
122 122
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $lookupcontents = parent::lookupField($this->fieldnumber);
146 146
         $lcCount        = count($lookupcontents);
147 147
         foreach ($lookupcontents as $i => $iValue) {
148
-            $select .= "<option value='" . $lookupcontents[$i]['id'] . "'>" . $lookupcontents[$i]['value'] . '</option>';
148
+            $select .= "<option value='".$lookupcontents[$i]['id']."'>".$lookupcontents[$i]['value'].'</option>';
149 149
         }
150 150
         $select .= '</select>';
151 151
 
Please login to merge, or discard this patch.
class/breadcrumb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         require_once $GLOBALS['xoops']->path('class/template.php');
75 75
         $breadcrumbTpl = new \XoopsTpl();
76 76
         $breadcrumbTpl->assign('breadcrumb', $this->bread);
77
-        $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl');
77
+        $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl');
78 78
         unset($breadcrumbTpl);
79 79
 
80 80
         return $html;
Please login to merge, or discard this patch.
class/DateSelect.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@  discard block
 block discarded – undo
47 47
         //@todo move language strings to language file
48 48
         $this->fieldnumber  = $parentObject->getId();
49 49
         $this->fieldname    = $parentObject->fieldname;
50
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
50
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
51 51
         $this->defaultvalue = $parentObject->defaultvalue;
52 52
         if ($parentObject->hasLookup()) {
53
-            xoops_error('No lookuptable may be specified for userfield ' . $this->fieldnumber, get_class($this));
53
+            xoops_error('No lookuptable may be specified for userfield '.$this->fieldnumber, get_class($this));
54 54
         }
55 55
         if ($parentObject->inAdvanced()) {
56
-            xoops_error('userfield ' . $this->fieldnumber . ' cannot be shown in advanced info', get_class($this));
56
+            xoops_error('userfield '.$this->fieldnumber.' cannot be shown in advanced info', get_class($this));
57 57
         }
58 58
         if ($parentObject->inPie()) {
59
-            xoops_error('A Pie-chart cannot be specified for userfield ' . $this->fieldnumber, get_class($this));
59
+            xoops_error('A Pie-chart cannot be specified for userfield '.$this->fieldnumber, get_class($this));
60 60
         }
61 61
     }
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function editField()
67 67
     {
68
-        $textarea = new \XoopsFormTextDateSelect('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $size = 15, $this->value);
68
+        $textarea = new \XoopsFormTextDateSelect('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $size = 15, $this->value);
69 69
 
70 70
         return $textarea;
71 71
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function newField($name = '')
79 79
     {
80
-        $textarea = new \XoopsFormTextDateSelect('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $size = 15, $this->defaultvalue);
80
+        $textarea = new \XoopsFormTextDateSelect('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $size = 15, $this->defaultvalue);
81 81
 
82 82
         return $textarea;
83 83
     }
Please login to merge, or discard this patch.
class/Picture.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,23 +34,23 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $this->fieldnumber  = $parentObject->getId();
36 36
         $this->fieldname    = $parentObject->fieldname;
37
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
37
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
38 38
         $this->defaultvalue = $parentObject->defaultvalue;
39 39
         $this->lookuptable  = $parentObject->hasLookup();
40 40
         if ($this->lookuptable) {
41
-            xoops_error('No lookuptable may be specified for userfield ' . $this->fieldnumber);
41
+            xoops_error('No lookuptable may be specified for userfield '.$this->fieldnumber);
42 42
         }
43 43
         if ($parentObject->inAdvanced()) {
44
-            xoops_error('userfield ' . $this->fieldnumber . ' cannot be shown in advanced info', get_class($this));
44
+            xoops_error('userfield '.$this->fieldnumber.' cannot be shown in advanced info', get_class($this));
45 45
         }
46 46
         if ($parentObject->inPie()) {
47
-            xoops_error('A Pie-chart cannot be specified for userfield ' . $this->fieldnumber, get_class($this));
47
+            xoops_error('A Pie-chart cannot be specified for userfield '.$this->fieldnumber, get_class($this));
48 48
         }
49 49
         if ('1' == $parentObject->viewinlist) {
50
-            xoops_error('userfield ' . $this->fieldnumber . ' cannot be included in listview', get_class($this));
50
+            xoops_error('userfield '.$this->fieldnumber.' cannot be included in listview', get_class($this));
51 51
         }
52 52
         if ('1' == $parentObject->hassearch) {
53
-            xoops_error('Search cannot be defined for userfield ' . $this->fieldnumber, get_class($this));
53
+            xoops_error('Search cannot be defined for userfield '.$this->fieldnumber, get_class($this));
54 54
         }
55 55
     }
56 56
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function editField()
61 61
     {
62
-        $picturefield = new \XoopsFormFile($this->fieldname, 'user' . $this->fieldnumber, 1024000);
62
+        $picturefield = new \XoopsFormFile($this->fieldname, 'user'.$this->fieldnumber, 1024000);
63 63
         $picturefield->setExtra("size ='50'");
64 64
 
65 65
         return $picturefield;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function newField($name = '')
74 74
     {
75
-        $picturefield = new \XoopsFormFile($this->fieldname, $name . 'user' . $this->fieldnumber, 1024000);
75
+        $picturefield = new \XoopsFormFile($this->fieldname, $name.'user'.$this->fieldnumber, 1024000);
76 76
         $picturefield->setExtra("size ='50'");
77 77
 
78 78
         return $picturefield;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function viewField()
85 85
     {
86
-        $view = new \XoopsFormLabel($this->fieldname, '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_400.jpeg">');
86
+        $view = new \XoopsFormLabel($this->fieldname, '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_400.jpeg">');
87 87
 
88 88
         return $view;
89 89
     }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function showField()
95 95
     {
96
-        return '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_150.jpeg">';
96
+        return '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_150.jpeg">';
97 97
     }
98 98
 
99 99
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function showValue()
103 103
     {
104
-        return '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_400.jpeg">';
104
+        return '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_400.jpeg">';
105 105
     }
106 106
 
107 107
     /**
Please login to merge, or discard this patch.
class/Utility.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         //        $filteredFolder = XoopsFilterInput::clean($folder, 'PATH');
29 29
         if (!is_dir($folder)) {
30 30
             mkdir($folder);
31
-            file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
31
+            file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
32 32
         }
33 33
         //        chmod($filteredFolder, 0777);
34 34
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $max_imgheight     = $GLOBALS['xoopsModuleConfig']['maximgheight']; //1000;
66 66
         $allowed_mimetypes = ['image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'];
67 67
         //    $img_dir = XOOPS_ROOT_PATH . "/modules/" . $GLOBALS['xoopsModule']->dirname() . "/images" ;
68
-        $img_dir = $GLOBALS['xoopsModuleConfig']['uploaddir'] . '/images';
68
+        $img_dir = $GLOBALS['xoopsModuleConfig']['uploaddir'].'/images';
69 69
         require_once $GLOBALS['xoops']->path('class/uploader.php');
70 70
         $field = $_POST['xoops_upload_file'][$num];
71 71
         if (!empty($field) || '' != $field) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     */
121 121
 
122 122
         // load the image
123
-        require_once $GLOBALS['xoops']->path('modules/' . $GLOBALS['xoopsModule']->dirname() . '/library/Zebra_Image.php');
123
+        require_once $GLOBALS['xoops']->path('modules/'.$GLOBALS['xoopsModule']->dirname().'/library/Zebra_Image.php');
124 124
         $thumbnail_widths = [150, 400];
125 125
 
126 126
         // indicate a target image
@@ -132,12 +132,12 @@  discard block
 block discarded – undo
132 132
         // create a new instance of the class
133 133
         $image = new \Zebra_Image();
134 134
         // indicate a source image (a GIF, PNG or JPEG file)
135
-        $image->source_path = PEDIGREE_UPLOAD_PATH . "/images/{$filename}";
135
+        $image->source_path = PEDIGREE_UPLOAD_PATH."/images/{$filename}";
136 136
 
137 137
         foreach ($thumbnail_widths as $thumbnail_width) {
138 138
 
139 139
             // generate & output thumbnail
140
-            $output_filename    = PEDIGREE_UPLOAD_PATH . '/images/thumbnails/' . basename($filename) . "_{$thumbnail_width}.{$config_output_format}";
140
+            $output_filename    = PEDIGREE_UPLOAD_PATH.'/images/thumbnails/'.basename($filename)."_{$thumbnail_width}.{$config_output_format}";
141 141
             $image->target_path = $output_filename;
142 142
             // since in this example we're going to have a jpeg file, let's set the output
143 143
             // image's quality
@@ -293,17 +293,17 @@  discard block
 block discarded – undo
293 293
                 $x = $columns[$i]['columnnumber'];
294 294
                 if (is_array($columns[$i]['lookupval'])) {
295 295
                     foreach ($columns[$i]['lookupval'] as $key => $keyvalue) {
296
-                        if ($keyvalue['id'] == $rowres['user' . $x]) {
296
+                        if ($keyvalue['id'] == $rowres['user'.$x]) {
297 297
                             $value = $keyvalue['value'];
298 298
                         }
299 299
                     }
300 300
                     //debug information
301 301
                     ///echo $columns[$i]['columnname']."is an array !";
302 302
                 } //format value - cant use object because of query count
303
-                elseif (0 === strncmp($rowres['user' . $x], 'http://', 7)) {
304
-                    $value = '<a href="' . $rowres['user' . $x] . '">' . $rowres['user' . $x] . '</a>';
303
+                elseif (0 === strncmp($rowres['user'.$x], 'http://', 7)) {
304
+                    $value = '<a href="'.$rowres['user'.$x].'">'.$rowres['user'.$x].'</a>';
305 305
                 } else {
306
-                    $value = $rowres['user' . $x];
306
+                    $value = $rowres['user'.$x];
307 307
                 }
308 308
                 $columnvalue[] = ['value' => $value];
309 309
             }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                 'id'          => $rowres['d_id'],
313 313
                 'name'        => $name,
314 314
                 'gender'      => $gender,
315
-                'link'        => '<a href="dog.php?id=' . $rowres['d_id'] . '">' . $name . '</a>',
315
+                'link'        => '<a href="dog.php?id='.$rowres['d_id'].'">'.$name.'</a>',
316 316
                 'colour'      => '',
317 317
                 'number'      => '',
318 318
                 'usercolumns' => $columnvalue
@@ -333,9 +333,9 @@  discard block
 block discarded – undo
333 333
     {
334 334
         global $numofcolumns1, $nummatch1, $pages1, $columns1, $dogs1;
335 335
         if ('0' == $pa && '0' == $ma) {
336
-            $sqlquery = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE father = ' . $pa . ' AND mother = ' . $ma . ' AND id != ' . $oid . " AND father != '0' AND mother !='0' ORDER BY naam";
336
+            $sqlquery = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE father = '.$pa.' AND mother = '.$ma.' AND id != '.$oid." AND father != '0' AND mother !='0' ORDER BY naam";
337 337
         } else {
338
-            $sqlquery = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE father = ' . $pa . ' AND mother = ' . $ma . ' AND id != ' . $oid . ' ORDER BY naam';
338
+            $sqlquery = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE father = '.$pa.' AND mother = '.$ma.' AND id != '.$oid.' ORDER BY naam';
339 339
         }
340 340
         $queryresult = $GLOBALS['xoopsDB']->query($sqlquery);
341 341
         $nummatch1   = $GLOBALS['xoopsDB']->getRowsNum($queryresult);
@@ -382,17 +382,17 @@  discard block
 block discarded – undo
382 382
                 $x = $columns1[$i]['columnnumber'];
383 383
                 if (is_array($columns1[$i]['lookupval'])) {
384 384
                     foreach ($columns1[$i]['lookupval'] as $key => $keyvalue) {
385
-                        if ($keyvalue['id'] == $rowres['user' . $x]) {
385
+                        if ($keyvalue['id'] == $rowres['user'.$x]) {
386 386
                             $value = $keyvalue['value'];
387 387
                         }
388 388
                     }
389 389
                     //debug information
390 390
                     ///echo $columns[$i]['columnname']."is an array !";
391 391
                 } //format value - cant use object because of query count
392
-                elseif (0 === strncmp($rowres['user' . $x], 'http://', 7)) {
393
-                    $value = '<a href="' . $rowres['user' . $x] . '">' . $rowres['user' . $x] . '</a>';
392
+                elseif (0 === strncmp($rowres['user'.$x], 'http://', 7)) {
393
+                    $value = '<a href="'.$rowres['user'.$x].'">'.$rowres['user'.$x].'</a>';
394 394
                 } else {
395
-                    $value = $rowres['user' . $x];
395
+                    $value = $rowres['user'.$x];
396 396
                 }
397 397
                 $columnvalue1[] = ['value' => $value];
398 398
             }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
                 'id'          => $rowres['id'],
401 401
                 'name'        => $name,
402 402
                 'gender'      => $gender,
403
-                'link'        => '<a href="dog.php?id=' . $rowres['id'] . '">' . $name . '</a>',
403
+                'link'        => '<a href="dog.php?id='.$rowres['id'].'">'.$name.'</a>',
404 404
                 'colour'      => '',
405 405
                 'number'      => '',
406 406
                 'usercolumns' => $columnvalue1
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
         $content = '';
422 422
 
423 423
         if (0 == $breeder) {
424
-            $sqlquery = 'SELECT id, naam, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id_owner = '" . $oid . "' ORDER BY naam";
424
+            $sqlquery = 'SELECT id, naam, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id_owner = '".$oid."' ORDER BY naam";
425 425
         } else {
426
-            $sqlquery = 'SELECT id, naam, roft FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id_breeder = '" . $oid . "' ORDER BY naam";
426
+            $sqlquery = 'SELECT id, naam, roft FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id_breeder = '".$oid."' ORDER BY naam";
427 427
         }
428 428
         $queryresult = $GLOBALS['xoopsDB']->query($sqlquery);
429 429
         while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) {
@@ -432,8 +432,8 @@  discard block
 block discarded – undo
432 432
             } else {
433 433
                 $gender = '<img src="assets/images/female.gif">';
434 434
             }
435
-            $link    = '<a href="dog.php?id=' . $rowres['id'] . '">' . stripslashes($rowres['naam']) . '</a>';
436
-            $content .= $gender . ' ' . $link . '<br>';
435
+            $link = '<a href="dog.php?id='.$rowres['id'].'">'.stripslashes($rowres['naam']).'</a>';
436
+            $content .= $gender.' '.$link.'<br>';
437 437
         }
438 438
 
439 439
         return $content;
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     public static function getName($oid)
448 448
     {
449 449
         $oid         = (int)$oid;
450
-        $sqlquery    = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '{$oid}'";
450
+        $sqlquery    = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '{$oid}'";
451 451
         $queryresult = $GLOBALS['xoopsDB']->query($sqlquery);
452 452
         while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) {
453 453
             $an = stripslashes($rowres['naam']);
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      */
463 463
     public static function showParent($PA)
464 464
     {
465
-        $sqlquery    = 'SELECT naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id='" . $PA . "'";
465
+        $sqlquery    = 'SELECT naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id='".$PA."'";
466 466
         $queryresult = $GLOBALS['xoopsDB']->query($sqlquery);
467 467
         while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) {
468 468
             $result = $rowres['naam'];
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public static function findId($naam_hond)
483 483
     {
484
-        $sqlquery    = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE naam= '$naam_hond'";
484
+        $sqlquery    = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE naam= '$naam_hond'";
485 485
         $queryresult = $GLOBALS['xoopsDB']->query($sqlquery);
486 486
         while (false !== ($rowres = $GLOBALS['xoopsDB']->fetchArray($queryresult))) {
487 487
             $result = $rowres['id'];
@@ -534,8 +534,8 @@  discard block
 block discarded – undo
534 534
             $gender = '';
535 535
             if ((!empty($GLOBALS['xoopsUser']) && $GLOBALS['xoopsUser'] instanceof \XoopsUser)
536 536
                 && ($row['user'] == $GLOBALS['xoopsUser']->getVar('uid') || true === $modadmin)) {
537
-                $gender = "<a href='dog.php?id={$row['id']}'><img src='assets/images/edit.png' alt='" . _EDIT . "'></a>
538
-                     . <a href='delete.php?id={$row['id']}'><img src='assets/images/delete.png' alt='" . _DELETE . "'></a>";
537
+                $gender = "<a href='dog.php?id={$row['id']}'><img src='assets/images/edit.png' alt='"._EDIT."'></a>
538
+                     . <a href='delete.php?id={$row['id']}'><img src='assets/images/delete.png' alt='"._DELETE."'></a>";
539 539
             }
540 540
 
541 541
             $genImg = (0 == $row['roft']) ? 'male.gif' : 'female.gif';
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             } else {
547 547
                 $camera = '';
548 548
             }
549
-            $name = stripslashes($row['naam']) . $camera;
549
+            $name = stripslashes($row['naam']).$camera;
550 550
             unset($columnvalue);
551 551
 
552 552
             //fill array
@@ -555,22 +555,22 @@  discard block
 block discarded – undo
555 555
                 $lookuparray = $columns[$i]['lookuparray'];
556 556
                 if (is_array($lookuparray)) {
557 557
                     foreach ($lookuparray as $index => $indexValue) {
558
-                        if ($lookuparray[$index]['id'] == $row['user' . $x]) {
558
+                        if ($lookuparray[$index]['id'] == $row['user'.$x]) {
559 559
                             //echo "<h1>".$lookuparray[$index]['id']."</h1>";
560 560
                             $value = $lookuparray[$index]['value'];
561 561
                         }
562 562
                     }
563 563
                 } //format value - cant use object because of query count
564
-                elseif (0 === strncmp($row['user' . $x], 'http://', 7)) {
565
-                    $value = '<a href="' . $row['user' . $x] . '">' . $row['user' . $x] . '</a>';
564
+                elseif (0 === strncmp($row['user'.$x], 'http://', 7)) {
565
+                    $value = '<a href="'.$row['user'.$x].'">'.$row['user'.$x].'</a>';
566 566
                 } else {
567
-                    $value = $row['user' . $x];
567
+                    $value = $row['user'.$x];
568 568
                 }
569 569
                 $columnvalue[] = ['value' => $value];
570 570
                 unset($value);
571 571
             }
572 572
 
573
-            $linkto = '<a href="' . $link . $row[$element] . '">' . $name . '</a>';
573
+            $linkto = '<a href="'.$link.$row[$element].'">'.$name.'</a>';
574 574
             //create array
575 575
             $dogs[] = [
576 576
                 'id'          => $row['id'],
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
         $cat_sql = '';
603 603
         if (is_array($cats)) {
604 604
             $cats    = array_map('intval', $cats); // make sure all cats are numbers
605
-            $cat_sql = '(' . implode(',', $cats) . ')';
605
+            $cat_sql = '('.implode(',', $cats).')';
606 606
         /*
607 607
                     $cat_sql = '(' . current($cats);
608 608
                     array_shift($cats);
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
                     $cat_sql .= ')';
613 613
         */
614 614
         } else {
615
-            $cat_sql = '(' . (int)$cats . ')'; // not efficient but at least creates valid SQL statement
615
+            $cat_sql = '('.(int)$cats.')'; // not efficient but at least creates valid SQL statement
616 616
         }
617 617
 
618 618
         return $cat_sql;
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
         //        xoops_load('XoopsLocal');
752 752
 
753 753
         //        $criteria = $myObject->getHandler($activeObject)->getActiveCriteria();
754
-        $criteria->setGroupby('UPPER(LEFT(' . $name . ',1))');
754
+        $criteria->setGroupby('UPPER(LEFT('.$name.',1))');
755 755
         $countsByLetters = $myObject->getHandler($activeObject)->getCounts($criteria);
756 756
         // Fill alphabet array
757 757
 
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
                 $letter_array['count']  = $countsByLetters[$letter];
792 792
                 //            $letter_array['url']    = "" . XOOPS_URL . "/modules/" . $helper->getModule()->dirname() . "/viewcat.php?list={$letter}";
793 793
                 //                $letter_array['url'] = '' . XOOPS_URL . '/modules/' . $myObject->getModule()->dirname() . '/'.$file.'?f='.$name."&amp;l=1&amp;w={$letter}%25&amp;o=".$name;
794
-                $letter_array['url'] = '' . XOOPS_URL . '/modules/' . $myObject->getModule()->dirname() . '/' . $link . $letter . $link2;
794
+                $letter_array['url'] = ''.XOOPS_URL.'/modules/'.$myObject->getModule()->dirname().'/'.$link.$letter.$link2;
795 795
             } else {
796 796
                 $letter_array['letter'] = $letter;
797 797
                 $letter_array['count']  = 0;
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
         $letterschoiceTpl          = new \XoopsTpl();
811 811
         $letterschoiceTpl->caching = false; // Disable cache
812 812
         $letterschoiceTpl->assign('alphabet', $alphabet_array);
813
-        $html = $letterschoiceTpl->fetch('db:' . $myObject->getModule()->dirname() . '_common_letterschoice.tpl');
813
+        $html = $letterschoiceTpl->fetch('db:'.$myObject->getModule()->dirname().'_common_letterschoice.tpl');
814 814
         unset($letterschoiceTpl);
815 815
 
816 816
         return $html;
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
         if (!$withLink) {
848 848
             return $pedigreeModuleName;
849 849
         } else {
850
-            return '<a href="' . PEDIGREE_URL . '/">{$pedigreeModuleName}</a>';
850
+            return '<a href="'.PEDIGREE_URL.'/">{$pedigreeModuleName}</a>';
851 851
         }
852 852
     }
853 853
 
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
         $GLOBALS['xoopsDB'] = \XoopsDatabaseFactory::getDatabaseConnection();
869 869
         $realName           = $GLOBALS['xoopsDB']->prefix($table);
870 870
 
871
-        $sql = 'SHOW TABLES FROM ' . XOOPS_DB_NAME;
871
+        $sql = 'SHOW TABLES FROM '.XOOPS_DB_NAME;
872 872
         $ret = $GLOBALS['xoopsDB']->queryF($sql);
873 873
 
874 874
         while (false !== (list($m_table) = $GLOBALS['xoopsDB']->fetchRow($ret))) {
@@ -972,10 +972,10 @@  discard block
 block discarded – undo
972 972
         $queryString = $_SERVER['QUERY_STRING'];
973 973
 
974 974
         if ('' != $queryString) {
975
-            $queryString = '?' . $queryString;
975
+            $queryString = '?'.$queryString;
976 976
         }
977 977
 
978
-        $currentURL = $http . $httpHost . $phpSelf . $queryString;
978
+        $currentURL = $http.$httpHost.$phpSelf.$queryString;
979 979
 
980 980
         $urls                = [];
981 981
         $urls['http']        = $http;
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
         //        $sql   .= " WHERE metakey='version' LIMIT 1";
35 35
         //        $query = $GLOBALS['xoopsDB']->query($sql);
36 36
         //        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
37
-        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n";
37
+        $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n";
38 38
         $html .= "<div style='padding: 8px;'>\n";
39 39
         //        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n";
40 40
         //        $html .= "<br>\n";
41 41
         //        $html .= "<br>\n";
42
-        $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n";
42
+        $html .= '<div>'.constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n";
43 43
         $html .= "<ul>\n";
44 44
         //
45
-        $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
46
-        $html  .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
45
+        $gdlib = function_exists('gd_info') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>';
46
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib;
47 47
         if (function_exists('gd_info')) {
48 48
             if (true === ($gdlib = gd_info())) {
49
-                $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
49
+                $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>';
50 50
             }
51 51
         }
52 52
         //
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
         //    $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
57 57
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
58 58
         //
59
-        $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
60
-        $html      .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
59
+        $downloads = ini_get('file_uploads') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>';
60
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads;
61 61
         //
62
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n";
63
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . "</span></b>\n";
64
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . ini_get('memory_limit') . "</span></b>\n";
62
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.ini_get('upload_max_filesize')."</span></b>\n";
63
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.ini_get('post_max_size')."</span></b>\n";
64
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.ini_get('memory_limit')."</span></b>\n";
65 65
         $html .= "</ul>\n";
66 66
         $html .= "<ul>\n";
67
-        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n";
67
+        $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n";
68 68
         $html .= "</ul>\n";
69 69
         $html .= "<br>\n";
70
-        $html .= constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n";
70
+        $html .= constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n";
71 71
         $html .= '</div>';
72 72
         $html .= '</fieldset><br>';
73 73
 
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
33 33
                 }
34 34
 
35
-                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
35
+                file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
36 36
             }
37 37
         } catch (\Exception $e) {
38 38
             echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
         if (!mkdir($dst) && !is_dir($dst)) {
61 61
             while (false !== ($file = readdir($dir))) {
62 62
                 if (('.' !== $file) && ('..' !== $file)) {
63
-                    if (is_dir($src . '/' . $file)) {
64
-                        self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
63
+                    if (is_dir($src.'/'.$file)) {
64
+                        self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
65 65
                     } else {
66
-                        copy($src . '/' . $file, $dst . '/' . $file);
66
+                        copy($src.'/'.$file, $dst.'/'.$file);
67 67
                     }
68 68
                 }
69 69
             }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 self::rrmdir($fObj->getPathname());
159 159
             }
160 160
         }
161
-        $iterator = null;   // clear iterator Obj to close file/directory
161
+        $iterator = null; // clear iterator Obj to close file/directory
162 162
         return rmdir($src); // remove the directory & return results
163 163
     }
164 164
 
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
         $iterator = new \DirectoryIterator($src);
192 192
         foreach ($iterator as $fObj) {
193 193
             if ($fObj->isFile()) {
194
-                rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
194
+                rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
195 195
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
196 196
                 // Try recursively on directory
197
-                self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
197
+                self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
198 198
                 //                rmdir($fObj->getPath()); // now delete the directory
199 199
             }
200 200
         }
201
-        $iterator = null;   // clear iterator Obj to close file/directory
201
+        $iterator = null; // clear iterator Obj to close file/directory
202 202
         return rmdir($src); // remove the directory & return results
203 203
     }
204 204
 
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
         $iterator = new \DirectoryIterator($src);
235 235
         foreach ($iterator as $fObj) {
236 236
             if ($fObj->isFile()) {
237
-                copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
237
+                copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
238 238
             } elseif (!$fObj->isDot() && $fObj->isDir()) {
239
-                self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename());
239
+                self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename());
240 240
             }
241 241
         }
242 242
         return true;
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
         //check for minimum XOOPS version
38 38
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
39 39
         if (null === $requiredVer) {
40
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
40
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
41 41
         }
42
-        $success     = true;
42
+        $success = true;
43 43
 
44 44
         if (version_compare($currentVer, $requiredVer, '<')) {
45
-            $success     = false;
46
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
45
+            $success = false;
46
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
47 47
         }
48 48
 
49 49
         return $success;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $reqVer  = $module->getInfo('min_php');
67 67
         if (false !== $reqVer && '' !== $reqVer) {
68 68
             if (version_compare($verNum, $reqVer, '<')) {
69
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
69
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
70 70
                 $success = false;
71 71
             }
72 72
         }
Please login to merge, or discard this patch.