Passed
Push — master ( 48d769...5ccf6e )
by Michael
07:14
created
owner.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@  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
 
10 10
 //xoops_loadLanguage('main', basename(dirname(__DIR__)));
11 11
 $moduleDirName = basename(__DIR__);
12 12
 xoops_loadLanguage('main', $moduleDirName);
13 13
 
14
-require_once __DIR__ . '/header.php';
14
+require_once __DIR__.'/header.php';
15 15
 
16 16
 // Include any common code for this module.
17
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
17
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
18 18
 
19 19
 // Get all HTTP post or get parameters into global variables that are prefixed with "param_"
20 20
 //import_request_variables("gp", "param_");
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
 include $GLOBALS['xoops']->path('/header.php');
27 27
 
28 28
 $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
29
-$GLOBALS['xoTheme']->addScript('browse.php?modules/' . $moduleDirName . '/assets/js/jquery.magnific-popup.min.js');
30
-$GLOBALS['xoTheme']->addStylesheet('browse.php?modules/' . $moduleDirName . '/assets/css/style.css');
29
+$GLOBALS['xoTheme']->addScript('browse.php?modules/'.$moduleDirName.'/assets/js/jquery.magnific-popup.min.js');
30
+$GLOBALS['xoTheme']->addStylesheet('browse.php?modules/'.$moduleDirName.'/assets/css/style.css');
31 31
 
32
-$GLOBALS['xoTheme']->addStylesheet(PEDIGREE_URL . '/assets/css/magnific-popup.css');
32
+$GLOBALS['xoTheme']->addStylesheet(PEDIGREE_URL.'/assets/css/magnific-popup.css');
33 33
 
34 34
 if (isset($GLOBALS['xoTheme'])) {
35 35
     $GLOBALS['xoTheme']->addScript('include/color-picker.js');
36 36
 } else {
37
-    echo '<script type="text/javascript" src="' . XOOPS_URL . '/include/color-picker.js"></script>';
37
+    echo '<script type="text/javascript" src="'.XOOPS_URL.'/include/color-picker.js"></script>';
38 38
 }
39 39
 
40 40
 //@todo move language string to language file
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 $ownid = Request::getInt('ownid', 0, 'GET');
57 57
 
58 58
 //query
59
-$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $ownid;
59
+$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$ownid;
60 60
 $result      = $GLOBALS['xoopsDB']->query($queryString);
61 61
 
62 62
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     $id = $row['id'];
65 65
 
66 66
     //name
67
-    $naam = stripslashes($row['firstname']) . ' ' . stripslashes($row['lastname']);
67
+    $naam = stripslashes($row['firstname']).' '.stripslashes($row['lastname']);
68 68
 
69 69
     //lastname
70 70
     $naaml = stripslashes($row['lastname']);
Please login to merge, or discard this patch.
virtual.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
     $perPage = $helper->getConfig('perpage');
65 65
     //count total number of dogs
66 66
     $numDog = 'SELECT COUNT(d.id) FROM '
67
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
68
-              . ' d LEFT JOIN '
69
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
70
-              . ' m ON m.id = d.mother LEFT JOIN '
71
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
72
-              //            . " f ON f.id = d.father WHERE d.roft = '0' and d.mother != '0' and d.father != '0' and m.mother != '0' and m.father != '0' and f.mother != '0' and f.father != '0' and d.naam LIKE '" . $l . "%'";
73
-              . " f ON f.id = d.father WHERE d.roft = '0' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
74
-              . $GLOBALS['xoopsDB']->escape($l)
75
-              . "%'";
67
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
68
+                . ' d LEFT JOIN '
69
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
70
+                . ' m ON m.id = d.mother LEFT JOIN '
71
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
72
+                //            . " f ON f.id = d.father WHERE d.roft = '0' and d.mother != '0' and d.father != '0' and m.mother != '0' and m.father != '0' and f.mother != '0' and f.father != '0' and d.naam LIKE '" . $l . "%'";
73
+                . " f ON f.id = d.father WHERE d.roft = '0' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
74
+                . $GLOBALS['xoopsDB']->escape($l)
75
+                . "%'";
76 76
     $numRes = $GLOBALS['xoopsDB']->query($numDog);
77 77
     //total number of dogs the query will find
78 78
     list($numResults) = $GLOBALS['xoopsDB']->fetchRow($numRes);
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
 
123 123
     //query
124 124
     $queryString = 'SELECT d.*, d.id AS d_id, d.naam AS d_naam FROM '
125
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
126
-                   . ' d LEFT JOIN '
127
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
128
-                   . ' m ON m.id = d.mother LEFT JOIN '
129
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
130
-                   . " f ON f.id = d.father WHERE d.roft = '0' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
131
-                   . $l
132
-                   . "%' ORDER BY d.naam LIMIT "
133
-                   . $st
134
-                   . ', '
135
-                   . $perPage;
125
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
126
+                    . ' d LEFT JOIN '
127
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
128
+                    . ' m ON m.id = d.mother LEFT JOIN '
129
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
130
+                    . " f ON f.id = d.father WHERE d.roft = '0' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
131
+                    . $l
132
+                    . "%' ORDER BY d.naam LIMIT "
133
+                    . $st
134
+                    . ', '
135
+                    . $perPage;
136 136
     $result      = $GLOBALS['xoopsDB']->query($queryString);
137 137
 
138 138
     $animal = new Pedigree\Animal();
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
     $perPage = $helper->getConfig('perpage');
284 284
     //count total number of dogs
285 285
     $numDog = 'SELECT COUNT(d.id) FROM '
286
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
287
-              . ' d LEFT JOIN '
288
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
289
-              . ' m ON m.id = d.mother LEFT JOIN '
290
-              . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
291
-              //  . " f ON f.id = d.father WHERE d.roft = '1' and d.mother != '0' and d.father != '0' and m.mother != '0' and m.father != '0' and f.mother != '0' and f.father != '0' and d.naam LIKE '" . $l . "%'";
292
-              . " f ON f.id = d.father WHERE d.roft = '1' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
293
-              . $GLOBALS['xoopsDB']->escape($l)
294
-              . "%'";
286
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
287
+                . ' d LEFT JOIN '
288
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
289
+                . ' m ON m.id = d.mother LEFT JOIN '
290
+                . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
291
+                //  . " f ON f.id = d.father WHERE d.roft = '1' and d.mother != '0' and d.father != '0' and m.mother != '0' and m.father != '0' and f.mother != '0' and f.father != '0' and d.naam LIKE '" . $l . "%'";
292
+                . " f ON f.id = d.father WHERE d.roft = '1' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
293
+                . $GLOBALS['xoopsDB']->escape($l)
294
+                . "%'";
295 295
 
296 296
     $numRes = $GLOBALS['xoopsDB']->query($numDog);
297 297
     //total number of dogs the query will find
@@ -362,17 +362,17 @@  discard block
 block discarded – undo
362 362
 
363 363
     //query
364 364
     $queryString = 'SELECT d.*, d.id AS d_id, d.naam AS d_naam FROM '
365
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
366
-                   . ' d LEFT JOIN '
367
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
368
-                   . ' m ON m.id = d.mother LEFT JOIN '
369
-                   . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
370
-                   . " f ON f.id = d.father WHERE d.roft = '1' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
371
-                   . $l
372
-                   . "%' ORDER BY d.naam LIMIT "
373
-                   . $st
374
-                   . ', '
375
-                   . $perPage;
365
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
366
+                    . ' d LEFT JOIN '
367
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
368
+                    . ' m ON m.id = d.mother LEFT JOIN '
369
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
370
+                    . " f ON f.id = d.father WHERE d.roft = '1' AND d.mother != '0' AND d.father != '0' AND m.mother != '0' AND m.father != '0' AND f.mother != '0' AND f.father != '0' AND d.naam LIKE '"
371
+                    . $l
372
+                    . "%' ORDER BY d.naam LIMIT "
373
+                    . $st
374
+                    . ', '
375
+                    . $perPage;
376 376
     $result      = $GLOBALS['xoopsDB']->query($queryString);
377 377
 
378 378
     $animal = new Pedigree\Animal();
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  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
 
10 10
 //$moduleDirName = basename(__DIR__);
11 11
 xoops_loadLanguage('main', $moduleDirName);
12 12
 xoops_load('Pedigree\Animal', $moduleDirName);
13 13
 
14 14
 // Include any common code for this module.
15
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
15
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
16 16
 
17 17
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_virtual.tpl';
18 18
 include $GLOBALS['xoops']->path('/header.php');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $module        = $moduleHandler->getByDirname($moduleDirName);
45 45
     $configHandler = xoops_getHandler('config');
46 46
     $moduleConfig  = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
47
-    $helper      = Pedigree\Helper::getInstance();
47
+    $helper = Pedigree\Helper::getInstance();
48 48
 
49 49
     //    if (isset($_GET['st'])) {
50 50
     //        $st = $_GET['st'];
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
     $pages = '';
88 88
     for ($i = 65; $i <= 90; ++$i) {
89 89
         if ($l == chr($i)) {
90
-            $pages .= '<b><a href="virtual.php?r=1&st=0&l=' . chr($i) . '">' . chr($i) . '</a></b>&nbsp;';
90
+            $pages .= '<b><a href="virtual.php?r=1&st=0&l='.chr($i).'">'.chr($i).'</a></b>&nbsp;';
91 91
         } else {
92
-            $pages .= '<a href="virtual.php?r=1&st=0&l=' . chr($i) . '">' . chr($i) . '</a>&nbsp;';
92
+            $pages .= '<a href="virtual.php?r=1&st=0&l='.chr($i).'">'.chr($i).'</a>&nbsp;';
93 93
         }
94 94
     }
95 95
     $pages .= '-&nbsp;';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     $pages .= '<br>';
99 99
     //create previous button
100 100
     if (($numPages > 1) && ($currentPage > 1)) {
101
-        $pages .= '<a href="virtual.php?r=1&&l=' . $l . 'st=' . ($st - $perPage) . '">' . _MA_PEDIGREE_PREVIOUS . '</a>&nbsp;&nbsp';
101
+        $pages .= '<a href="virtual.php?r=1&&l='.$l.'st='.($st - $perPage).'">'._MA_PEDIGREE_PREVIOUS.'</a>&nbsp;&nbsp';
102 102
         }
103 103
     //create numbers
104 104
     $xLimit = $numPages + 1;
@@ -108,15 +108,15 @@  discard block
 block discarded – undo
108 108
             $pages .= '<br>';
109 109
         }
110 110
         if ($x != $currentPage) {
111
-            $pages .= '<a href="virtual.php?r=1&l=' . $l . '&st=' . ($perPage * ($x - 1)) . '">' . $x . '</a>&nbsp;&nbsp;';
111
+            $pages .= '<a href="virtual.php?r=1&l='.$l.'&st='.($perPage * ($x - 1)).'">'.$x.'</a>&nbsp;&nbsp;';
112 112
         } else {
113
-            $pages .= $x . '&nbsp;&nbsp';
113
+            $pages .= $x.'&nbsp;&nbsp';
114 114
         }
115 115
     }
116 116
     //create next button
117 117
     if ($numPages > 1) {
118 118
         if ($currentPage < $numPages) {
119
-            $pages .= '<a href="virtual.php?r=1&l=' . $l . '&st=' . ($st + $perPage) . '">' . _MA_PEDIGREE_NEXT . '</a>&nbsp;&nbsp';
119
+            $pages .= '<a href="virtual.php?r=1&l='.$l.'&st='.($st + $perPage).'">'._MA_PEDIGREE_NEXT.'</a>&nbsp;&nbsp';
120 120
         }
121 121
     }
122 122
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                    . $st
134 134
                    . ', '
135 135
                    . $perPage;
136
-    $result      = $GLOBALS['xoopsDB']->query($queryString);
136
+    $result = $GLOBALS['xoopsDB']->query($queryString);
137 137
 
138 138
     $animal = new Pedigree\Animal();
139 139
     //test to find out how many user fields there are...
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
166 166
         //create picture information
167 167
         if ('' != $row['foto']) {
168
-            $camera = ' <img src="' . PEDIGREE_UPLOAD_URL . '/images/dog-icon25.png">';
168
+            $camera = ' <img src="'.PEDIGREE_UPLOAD_URL.'/images/dog-icon25.png">';
169 169
         } else {
170 170
             $camera = '';
171 171
         }
172
-        $name = stripslashes($row['d_naam']) . $camera;
172
+        $name = stripslashes($row['d_naam']).$camera;
173 173
         //empty array
174 174
         unset($columnvalue);
175 175
         //fill array
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             //echo $x."columnnumber";
179 179
             if (is_array($columns[$i]['lookupval'])) {
180 180
                 foreach ($columns[$i]['lookupval'] as $key => $keyValue) {
181
-                    if ($keyValue['id'] == $row['user' . $x]) {
181
+                    if ($keyValue['id'] == $row['user'.$x]) {
182 182
                         //echo "key:".$row['user5']."<br>";
183 183
                         $value = $keyValue['value'];
184 184
                     }
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
                 //debug information
187 187
                 ///echo $columns[$i]['columnname']."is an array !";
188 188
             } //format value - cant use object because of query count
189
-            elseif (0 === strncmp($row['user' . $x], 'http://', 7)) {
190
-                $value = '<a href="' . $row['user' . $x] . '">' . $row['user' . $x] . '</a>';
189
+            elseif (0 === strncmp($row['user'.$x], 'http://', 7)) {
190
+                $value = '<a href="'.$row['user'.$x].'">'.$row['user'.$x].'</a>';
191 191
             } else {
192
-                $value = $row['user' . $x];
192
+                $value = $row['user'.$x];
193 193
             }
194 194
             $columnvalue[] = ['value' => $value];
195 195
             unset($value);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             'id'          => $row['d_id'],
199 199
             'name'        => $name,
200 200
             'gender'      => '<img src="assets/images/male.gif">',
201
-            'link'        => '<a href="virtual.php?f=dam&selsire=' . $row['d_id'] . '">' . $name . '</a>',
201
+            'link'        => '<a href="virtual.php?f=dam&selsire='.$row['d_id'].'">'.$name.'</a>',
202 202
             'colour'      => '',
203 203
             'number'      => '',
204 204
             'usercolumns' => isset($columnvalue) ? $columnvalue : 0
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         '[father]'   => $helper->getConfig('father'),
223 223
         '[children]' => $helper->getConfig('children')
224 224
     ]));
225
-    $xoopsTpl->assign('nextaction', '<b>' . strtr(_MA_PEDIGREE_VIRT_SIRE, ['[father]' => $helper->getConfig('father')]) . '</b>');
225
+    $xoopsTpl->assign('nextaction', '<b>'.strtr(_MA_PEDIGREE_VIRT_SIRE, ['[father]' => $helper->getConfig('father')]).'</b>');
226 226
     //    break;
227 227
 
228 228
     //mb =========== FATHER LETTERS =============================
@@ -304,41 +304,41 @@  discard block
 block discarded – undo
304 304
     //find current page
305 305
     $currentPage = floor($st / $perPage) + 1;
306 306
     //create the alphabet
307
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=a">A</a>&nbsp;';
308
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=b">B</a>&nbsp;';
309
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=c">C</a>&nbsp;';
310
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=d">D</a>&nbsp;';
311
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=e">E</a>&nbsp;';
312
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=f">F</a>&nbsp;';
313
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=g">G</a>&nbsp;';
314
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=h">H</a>&nbsp;';
315
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=i">I</a>&nbsp;';
316
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=j">J</a>&nbsp;';
317
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=k">K</a>&nbsp;';
318
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=l">L</a>&nbsp;';
319
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=m">M</a>&nbsp;';
320
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=n">N</a>&nbsp;';
321
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=o">O</a>&nbsp;';
322
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=p">P</a>&nbsp;';
323
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=q">Q</a>&nbsp;';
324
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=r">R</a>&nbsp;';
325
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=s">S</a>&nbsp;';
326
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=t">T</a>&nbsp;';
327
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=u">U</a>&nbsp;';
328
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=v">V</a>&nbsp;';
329
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=w">W</a>&nbsp;';
330
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=x">X</a>&nbsp;';
331
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=y">Y</a>&nbsp;';
332
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=z">Z</a>&nbsp;';
307
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=a">A</a>&nbsp;';
308
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=b">B</a>&nbsp;';
309
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=c">C</a>&nbsp;';
310
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=d">D</a>&nbsp;';
311
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=e">E</a>&nbsp;';
312
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=f">F</a>&nbsp;';
313
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=g">G</a>&nbsp;';
314
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=h">H</a>&nbsp;';
315
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=i">I</a>&nbsp;';
316
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=j">J</a>&nbsp;';
317
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=k">K</a>&nbsp;';
318
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=l">L</a>&nbsp;';
319
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=m">M</a>&nbsp;';
320
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=n">N</a>&nbsp;';
321
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=o">O</a>&nbsp;';
322
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=p">P</a>&nbsp;';
323
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=q">Q</a>&nbsp;';
324
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=r">R</a>&nbsp;';
325
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=s">S</a>&nbsp;';
326
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=t">T</a>&nbsp;';
327
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=u">U</a>&nbsp;';
328
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=v">V</a>&nbsp;';
329
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=w">W</a>&nbsp;';
330
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=x">X</a>&nbsp;';
331
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=y">Y</a>&nbsp;';
332
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=z">Z</a>&nbsp;';
333 333
     $pages .= '-&nbsp;';
334
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=Ã…">Ã…</a>&nbsp;';
335
-    $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&st=0&l=Ö">Ö</a>&nbsp;';
334
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=Ã…">Ã…</a>&nbsp;';
335
+    $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&st=0&l=Ö">Ö</a>&nbsp;';
336 336
     //create linebreak
337 337
     $pages .= '<br>';
338 338
     //create previous button
339 339
     if ($numPages > 1) {
340 340
         if ($currentPage > 1) {
341
-            $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&l=' . $l . '&st=' . ($st - $perPage) . '">' . _MA_PEDIGREE_PREVIOUS . '</a>&nbsp;&nbsp';
341
+            $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&l='.$l.'&st='.($st - $perPage).'">'._MA_PEDIGREE_PREVIOUS.'</a>&nbsp;&nbsp';
342 342
         }
343 343
     }
344 344
     //create numbers
@@ -348,15 +348,15 @@  discard block
 block discarded – undo
348 348
             $pages .= '<br>';
349 349
         }
350 350
         if ($x != $currentPage) {
351
-            $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&l=' . $l . '&st=' . ($perPage * ($x - 1)) . '">' . $x . '</a>&nbsp;&nbsp;';
351
+            $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&l='.$l.'&st='.($perPage * ($x - 1)).'">'.$x.'</a>&nbsp;&nbsp;';
352 352
         } else {
353
-            $pages .= $x . '&nbsp;&nbsp';
353
+            $pages .= $x.'&nbsp;&nbsp';
354 354
         }
355 355
     }
356 356
     //create next button
357 357
     if ($numPages > 1) {
358 358
         if ($currentPage < $numPages) {
359
-            $pages .= '<a href="virtual.php?f=dam&selsire=' . $selsire . '&l=' . $l . '&st=' . ($st + $perPage) . '">' . _MA_PEDIGREE_NEXT . '</a>&nbsp;&nbsp';
359
+            $pages .= '<a href="virtual.php?f=dam&selsire='.$selsire.'&l='.$l.'&st='.($st + $perPage).'">'._MA_PEDIGREE_NEXT.'</a>&nbsp;&nbsp';
360 360
         }
361 361
     }
362 362
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                    . $st
374 374
                    . ', '
375 375
                    . $perPage;
376
-    $result      = $GLOBALS['xoopsDB']->query($queryString);
376
+    $result = $GLOBALS['xoopsDB']->query($queryString);
377 377
 
378 378
     $animal = new Pedigree\Animal();
379 379
     //test to find out how many user fields there are...
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
406 406
         //create picture information
407 407
         if ('' != $row['foto']) {
408
-            $camera = ' <img src="' . PEDIGREE_UPLOAD_URL . '/images/dog-icon25.png">';
408
+            $camera = ' <img src="'.PEDIGREE_UPLOAD_URL.'/images/dog-icon25.png">';
409 409
         } else {
410 410
             $camera = '';
411 411
         }
412
-        $name = stripslashes($row['d_naam']) . $camera;
412
+        $name = stripslashes($row['d_naam']).$camera;
413 413
         //empty array
414 414
         unset($columnvalue);
415 415
         //fill array
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             //echo $x."columnnumber";
419 419
             if (is_array($columns[$i]['lookupval'])) {
420 420
                 foreach ($columns[$i]['lookupval'] as $key => $keyValue) {
421
-                    if ($keyValue['id'] == $row['user' . $x]) {
421
+                    if ($keyValue['id'] == $row['user'.$x]) {
422 422
                         //echo "key:".$row['user5']."<br>";
423 423
                         $value = $keyValue['value'];
424 424
                     }
@@ -426,10 +426,10 @@  discard block
 block discarded – undo
426 426
                 //debug information
427 427
                 ///echo $columns[$i]['columnname']."is an array !";
428 428
             } //format value - cant use object because of query count
429
-            elseif (0 === strncmp($row['user' . $x], 'http://', 7)) {
430
-                $value = '<a href="' . $row['user' . $x] . '">' . $row['user' . $x] . '</a>';
429
+            elseif (0 === strncmp($row['user'.$x], 'http://', 7)) {
430
+                $value = '<a href="'.$row['user'.$x].'">'.$row['user'.$x].'</a>';
431 431
             } else {
432
-                $value = $row['user' . $x];
432
+                $value = $row['user'.$x];
433 433
             }
434 434
             $columnvalue[] = ['value' => $value];
435 435
             unset($value);
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
             'id'          => $row['d_id'],
439 439
             'name'        => $name,
440 440
             'gender'      => '<img src="assets/images/female.gif">',
441
-            'link'        => '<a href="virtual.php?f=check&selsire=' . $selsire . '&seldam=' . $row['d_id'] . '">' . $name . '</a>',
441
+            'link'        => '<a href="virtual.php?f=check&selsire='.$selsire.'&seldam='.$row['d_id'].'">'.$name.'</a>',
442 442
             'colour'      => '',
443 443
             'number'      => '',
444 444
             'usercolumns' => isset($columnvalue) ? $columnvalue : 0
@@ -460,10 +460,10 @@  discard block
 block discarded – undo
460 460
         '[father]'   => $helper->getConfig('father'),
461 461
         '[children]' => $helper->getConfig('children')
462 462
     ]));
463
-    $xoopsTpl->assign('nextaction', '<b>' . strtr(_MA_PEDIGREE_VIRT_DAM, ['[mother]' => $helper->getConfig('mother')]) . '</b>');
463
+    $xoopsTpl->assign('nextaction', '<b>'.strtr(_MA_PEDIGREE_VIRT_DAM, ['[mother]' => $helper->getConfig('mother')]).'</b>');
464 464
 
465 465
     //find father
466
-    $query  = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $selsire;
466
+    $query  = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$selsire;
467 467
     $result = $GLOBALS['xoopsDB']->query($query);
468 468
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
469 469
         $vsire = stripslashes($row['naam']);
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         '[children]' => $helper->getConfig('children')
521 521
     ]));
522 522
     //find father
523
-    $query  = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $selsire;
523
+    $query  = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$selsire;
524 524
     $result = $GLOBALS['xoopsDB']->query($query);
525 525
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
526 526
         $vsire = stripslashes($row['naam']);
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     $xoopsTpl->assign('virtualsiretitle', strtr(_MA_PEDIGREE_VIRTUALSTIT, ['[father]' => $helper->getConfig('father')]));
529 529
     $xoopsTpl->assign('virtualsire', $vsire);
530 530
     //find mother
531
-    $query  = 'SELECT id, naam FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id=' . $seldam;
531
+    $query  = 'SELECT id, naam FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id='.$seldam;
532 532
     $result = $GLOBALS['xoopsDB']->query($query);
533 533
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
534 534
         $vdam = stripslashes($row['naam']);
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     $xoopsTpl->assign('virtualdamtitle', strtr(_MA_PEDIGREE_VIRTUALDTIT, ['[mother]' => $helper->getConfig('mother')]));
537 537
     $xoopsTpl->assign('virtualdam', $vdam);
538 538
 
539
-    $xoopsTpl->assign('form', '<a href="coi.php?s=' . $selsire . '&d=' . $seldam . '&dogid=&detail=1">' . _MA_PEDIGREE_VIRTUALBUT . '</a>');
539
+    $xoopsTpl->assign('form', '<a href="coi.php?s='.$selsire.'&d='.$seldam.'&dogid=&detail=1">'._MA_PEDIGREE_VIRTUALBUT.'</a>');
540 540
 }
541 541
 
542 542
 //footer
Please login to merge, or discard this patch.
deletebreeder.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@  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
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_delete.tpl';
15 15
 
16
-include XOOPS_ROOT_PATH . '/header.php';
16
+include XOOPS_ROOT_PATH.'/header.php';
17 17
 
18 18
 //get module configuration
19 19
 /** @var XoopsModuleHandler $moduleHandler */
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 //check for access
26 26
 $xoopsModule = XoopsModule::getByDirname($moduleDirName);
27 27
 if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) {
28
-    redirect_header('javascript:history.go(-1)', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST);
28
+    redirect_header('javascript:history.go(-1)', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST);
29 29
 }
30 30
 
31 31
 global $xoopsTpl;
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
 
35 35
 $id = Request::getInt('id', 0, 'GET');
36 36
 //query (find values for this dog (and format them))
37
-$queryString = 'SELECT lastname, firstname, user FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE id=' . $id;
37
+$queryString = 'SELECT lastname, firstname, user FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE id='.$id;
38 38
 $result      = $GLOBALS['xoopsDB']->query($queryString);
39 39
 
40 40
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
41 41
     //ID
42 42
     $id = $row['id'];
43 43
     //name
44
-    $naam     = htmlentities(stripslashes($row['lastname']) . ', ' . stripslashes($row['firstname']), ENT_QUOTES);
45
-    $namelink = '<a href="owner.php?ownid=' . $row['id'] . '">' . stripslashes($row['lastname']) . ', ' . stripslashes($row['firstname']) . '</a>';
44
+    $naam     = htmlentities(stripslashes($row['lastname']).', '.stripslashes($row['firstname']), ENT_QUOTES);
45
+    $namelink = '<a href="owner.php?ownid='.$row['id'].'">'.stripslashes($row['lastname']).', '.stripslashes($row['firstname']).'</a>';
46 46
     //user who entered the info
47 47
     $dbuser = $row['user'];
48 48
 }
49 49
 
50 50
 //create form
51
-include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
51
+include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
52 52
 $form = new \XoopsThemeForm($naam, 'deletedata', 'deletebreederpage.php', 'post', true);
53 53
 //hidden value current record owner
54 54
 $form->addElement(new \XoopsFormHidden('dbuser', $dbuser));
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
 $form->addElement(new \XoopsFormHidden('dogid', $_GET['id']));
57 57
 $form->addElement(new \XoopsFormHidden('curname', $naam));
58 58
 $form->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
59
-$form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_SURE, _MA_PEDIGREE_DELE_CONF_OWN . '<b>' . $naam . '</b>?'));
59
+$form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_SURE, _MA_PEDIGREE_DELE_CONF_OWN.'<b>'.$naam.'</b>?'));
60 60
 $breeder = Pedigree\Utility::breederof($_GET['id'], 1);
61 61
 if ('' != $breeder) {
62
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_WARN, strtr(_MA_PEDIGREE_DELE_WARN_BREEDER, ['[animalTypes]' => $moduleConfig['animalTypes']]) . '<br><br>' . $breeder));
62
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_WARN, strtr(_MA_PEDIGREE_DELE_WARN_BREEDER, ['[animalTypes]' => $moduleConfig['animalTypes']]).'<br><br>'.$breeder));
63 63
 }
64 64
 $owner = Pedigree\Utility::breederof($_GET['id'], 0);
65 65
 if ('' != $owner) {
66
-    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_WARN, strtr(_MA_PEDIGREE_DELE_WARN_OWNER, ['[animalTypes]' => $moduleConfig['animalTypes']]) . '<br><br>' . $owner));
66
+    $form->addElement(new \XoopsFormLabel(_MA_PEDIGREE_DELE_WARN, strtr(_MA_PEDIGREE_DELE_WARN_OWNER, ['[animalTypes]' => $moduleConfig['animalTypes']]).'<br><br>'.$owner));
67 67
 }
68 68
 $form->addElement(new \XoopsFormButton('', 'button_id', _DELETE, 'submit'));
69 69
 //add data (form) to smarty template
70 70
 $xoopsTpl->assign('form', $form->render());
71 71
 
72 72
 //footer
73
-include XOOPS_ROOT_PATH . '/footer.php';
73
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
add_litter.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
         //gender
78 78
         $gender_radio[$count] = new \XoopsFormRadio('<b>' . _MA_PEDIGREE_FLD_GEND . '</b>', 'roft' . $count, $value = '0');
79 79
         $gender_radio[$count]->addOptionArray([
80
-                                                  '0' => strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]),
81
-                                                  '1' => strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']])
82
-                                              ]);
80
+                                                    '0' => strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]),
81
+                                                    '1' => strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']])
82
+                                                ]);
83 83
         $searchform->addElement($gender_radio[$count]);
84 84
         //add userfields
85 85
         for ($i = 0, $iMax = count($fields); $i < $iMax; ++$i) {
@@ -219,18 +219,18 @@  discard block
 block discarded – undo
219 219
         //insert into pedigree_temp
220 220
         //      $query = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . " VALUES ('" . $random . "','" . Pedigree\Utility::unHtmlEntities($name) . "','0','" . $id_breeder . "','" . $userid . "','" . $roft . "','','','', ''";
221 221
         $query = 'INSERT INTO '
222
-                 . $GLOBALS['xoopsDB']->prefix('pedigree_temp')
223
-                 . " VALUES ('"
224
-                 . Request::getInt($random)
225
-                 . "','"
226
-                 . Request::getInt(Pedigree\Utility::unHtmlEntities($name))
227
-                 . "','0','"
228
-                 . Request::getInt($id_breeder)
229
-                 . "','"
230
-                 . Request::getInt($userid)
231
-                 . "','"
232
-                 . Request::getInt($roft)
233
-                 . "','','','', ''";
222
+                    . $GLOBALS['xoopsDB']->prefix('pedigree_temp')
223
+                    . " VALUES ('"
224
+                    . Request::getInt($random)
225
+                    . "','"
226
+                    . Request::getInt(Pedigree\Utility::unHtmlEntities($name))
227
+                    . "','0','"
228
+                    . Request::getInt($id_breeder)
229
+                    . "','"
230
+                    . Request::getInt($userid)
231
+                    . "','"
232
+                    . Request::getInt($roft)
233
+                    . "','','','', ''";
234 234
         foreach ($fields as $i => $iValue) {
235 235
             $userField   = new Pedigree\Field($fields[$i], $animal->getConfig());
236 236
             $fieldType   = $userField->getSetting('FieldType');
@@ -614,20 +614,20 @@  discard block
 block discarded – undo
614 614
             for ($c = 1, $cMax = count($names); $c < $cMax; ++$c) {
615 615
                 //              $query = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " VALUES ('','" . addslashes($names[$c]) . "','0','" . $row['id_breeder'] . "','" . $row['user'] . "','" . $genders[$c] . "','" . $_GET['seldam'] . "','" . $row['father'] . "','',''";
616 616
                 $query = 'INSERT INTO '
617
-                         . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
618
-                         . " VALUES ('','"
619
-                         . $GLOBALS['xoopsDB']->escape($names[$c])
620
-                         . "','0','"
621
-                         . $GLOBALS['xoopsDB']->escape($row['id_breeder'])
622
-                         . "','"
623
-                         . $GLOBALS['xoopsDB']->escape($row['user'])
624
-                         . "','"
625
-                         . $GLOBALS['xoopsDB']->escape($genders[$c])
626
-                         . "','"
627
-                         . $GLOBALS['xoopsDB']->escape($seldam)
628
-                         . "','"
629
-                         . $GLOBALS['xoopsDB']->escape($row['father'])
630
-                         . "','',''";
617
+                            . $GLOBALS['xoopsDB']->prefix('pedigree_tree')
618
+                            . " VALUES ('','"
619
+                            . $GLOBALS['xoopsDB']->escape($names[$c])
620
+                            . "','0','"
621
+                            . $GLOBALS['xoopsDB']->escape($row['id_breeder'])
622
+                            . "','"
623
+                            . $GLOBALS['xoopsDB']->escape($row['user'])
624
+                            . "','"
625
+                            . $GLOBALS['xoopsDB']->escape($genders[$c])
626
+                            . "','"
627
+                            . $GLOBALS['xoopsDB']->escape($seldam)
628
+                            . "','"
629
+                            . $GLOBALS['xoopsDB']->escape($row['father'])
630
+                            . "','',''";
631 631
                 //create animal object
632 632
                 $animal = new Pedigree\Animal();
633 633
                 //test to find out how many user fields there are..
Please login to merge, or discard this patch.
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@  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/' . $xoopsModule->dirname() . '/include/common.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/common.php';
13 13
 
14 14
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_addlitter.tpl';
15
-include XOOPS_ROOT_PATH . '/header.php';
15
+include XOOPS_ROOT_PATH.'/header.php';
16 16
 $xoopsTpl->assign('page_title', 'Pedigree database - add a litter');
17 17
 
18 18
 //check for access
19 19
 $xoopsModule = XoopsModule::getByDirname($moduleDirName);
20 20
 if (empty($xoopsUser)) {
21
-    redirect_header('index.php', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST);
21
+    redirect_header('index.php', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST);
22 22
 }
23 23
 
24 24
 //get module configuration
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     $moduleConfig  = $configHandler->getConfigsByCat(0, $module->getVar('mid'));
56 56
 
57 57
     //create xoopsform
58
-    include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
58
+    include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
59 59
     $searchform = new \XoopsThemeForm(strtr(_MA_PEDIGREE_ADD_LITTER, ['[litter]' => $moduleConfig['litter']]), 'searchform', 'add_litter.php?f=sire', 'post', true);
60 60
     $searchform->addElement(new \XoopsFormHiddenToken($name = 'XOOPS_TOKEN_REQUEST', $timeout = 360));
61 61
     //create random value
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
     //create animal object
67 67
     $animal = new Pedigree\Animal();
68 68
     //test to find out how many user fields there are...
69
-    $fields  = $animal->getNumOfFields();
69
+    $fields = $animal->getNumOfFields();
70 70
 
71 71
     //create form contents
72 72
     for ($count = 1; $count < 11; ++$count) {
73 73
         //name
74
-        $searchform->addElement(new \XoopsFormLabel($count . '.', strtr(_MA_PEDIGREE_KITT_NAME . $count . '.', ['[animalType]' => $moduleConfig['animalType']])));
75
-        $textbox[$count] = new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_NAME . '</b>', 'name' . $count, $size = 50, $maxsize = 50, '');
74
+        $searchform->addElement(new \XoopsFormLabel($count.'.', strtr(_MA_PEDIGREE_KITT_NAME.$count.'.', ['[animalType]' => $moduleConfig['animalType']])));
75
+        $textbox[$count] = new \XoopsFormText('<b>'._MA_PEDIGREE_FLD_NAME.'</b>', 'name'.$count, $size = 50, $maxsize = 50, '');
76 76
         $searchform->addElement($textbox[$count]);
77 77
         //gender
78
-        $gender_radio[$count] = new \XoopsFormRadio('<b>' . _MA_PEDIGREE_FLD_GEND . '</b>', 'roft' . $count, $value = '0');
78
+        $gender_radio[$count] = new \XoopsFormRadio('<b>'._MA_PEDIGREE_FLD_GEND.'</b>', 'roft'.$count, $value = '0');
79 79
         $gender_radio[$count]->addOptionArray([
80 80
                                                   '0' => strtr(_MA_PEDIGREE_FLD_MALE, ['[male]' => $moduleConfig['male']]),
81 81
                                                   '1' => strtr(_MA_PEDIGREE_FLD_FEMA, ['[female]' => $moduleConfig['female']])
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $searchform->addElement(new \XoopsFormLabel('&nbsp;', ''));
96 96
     }
97 97
 
98
-    $searchform->addElement(new \XoopsFormLabel(_MA_PEDIGREE_ADD_DATA, _MA_PEDIGREE_DATA_INFO . $moduleConfig['litter'] . '.</h2>'));
98
+    $searchform->addElement(new \XoopsFormLabel(_MA_PEDIGREE_ADD_DATA, _MA_PEDIGREE_DATA_INFO.$moduleConfig['litter'].'.</h2>'));
99 99
     //add userfields that are not shown in the litter
100 100
     for ($i = 0, $iMax = count($fields); $i < $iMax; ++$i) {
101 101
         $userField   = new Pedigree\Field($fields[$i], $animal->getConfig());
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
     if ('1' == $moduleConfig['ownerbreeder']) {
113 113
         //breeder
114 114
         $breeder  = new \XoopsFormSelect(_MA_PEDIGREE_FLD_BREE, 'id_breeder', $value = '', $size = 1, $multiple = false);
115
-        $queryfok = 'SELECT id, firstname, lastname FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' ORDER BY `lastname`';
115
+        $queryfok = 'SELECT id, firstname, lastname FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' ORDER BY `lastname`';
116 116
         $resfok   = $GLOBALS['xoopsDB']->query($queryfok);
117 117
         $breeder->addOption(0, $name = 'Unknown');
118 118
         while (false !== ($rowfok = $GLOBALS['xoopsDB']->fetchArray($resfok))) {
119
-            $breeder->addOption($rowfok['id'], $name = $rowfok['lastname'] . ', ' . $rowfok['firstname']);
119
+            $breeder->addOption($rowfok['id'], $name = $rowfok['lastname'].', '.$rowfok['firstname']);
120 120
         }
121 121
         $searchform->addElement($breeder);
122 122
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     //check for access
144 144
     $xoopsModule = XoopsModule::getByDirname($moduleDirName);
145 145
     if (empty($GLOBALS['xoopsUser']) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)) {
146
-        redirect_header('javascript:history.go(-1)', 3, _NOPERM . '<br>' . _MA_PEDIGREE_REGIST);
146
+        redirect_header('javascript:history.go(-1)', 3, _NOPERM.'<br>'._MA_PEDIGREE_REGIST);
147 147
     }
148 148
     //    $userid = $_POST['userid'];
149 149
     //    if (empty($random)) {
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
     $name       = '';
166 166
     $roft       = '';
167 167
     for ($count = 1; $count < 11; ++$count) {
168
-        $namelitter = 'name' . $count;
169
-        $roftlitter = 'roft' . $count;
168
+        $namelitter = 'name'.$count;
169
+        $roftlitter = 'roft'.$count;
170 170
         //check for an empty name
171 171
             if ('' !== $_POST[$namelitter]) {
172
-                $name .= ':' . Request::getString('namelitter', '', 'POST');
173
-                $roft .= ':' . Request::getString('roftlitter', '', 'POST');
172
+                $name .= ':'.Request::getString('namelitter', '', 'POST');
173
+                $roft .= ':'.Request::getString('roftlitter', '', 'POST');
174 174
         } else {
175 175
                 if (1 == $count) {
176 176
                 redirect_header('add_litter.php', 3, _MA_PEDIGREE_ADD_NAMEPLZ);
@@ -196,18 +196,18 @@  discard block
 block discarded – undo
196 196
             //emtpy string to house the different values for this userfield
197 197
             $withinfield = '';
198 198
             for ($count = 1; $count < 11; ++$count) {
199
-                if ('' !== $_POST['name' . $count]) {
200
-                    if (isset($_POST[$count . 'user' . $iValue])) {
199
+                if ('' !== $_POST['name'.$count]) {
200
+                    if (isset($_POST[$count.'user'.$iValue])) {
201 201
                         //debug option
202 202
                         //echo $count.'user'.$fields[$i]."=".$_POST[$count.'user'.$fields[$i]]."<br>";
203
-                        $withinfield .= ':' . $_POST[$count . 'user' . $iValue];
203
+                        $withinfield .= ':'.$_POST[$count.'user'.$iValue];
204 204
                     } else {
205 205
                         if ($userField->isActive() && $userField->generalLitter() && !$userField->isLocked()) {
206 206
                             //use $_POST value if this is a general litter field
207
-                            $withinfield .= ':' . $_POST['-user' . $iValue];
207
+                            $withinfield .= ':'.$_POST['-user'.$iValue];
208 208
                         } else {
209 209
                             //create $withinfield for fields not added to the litter
210
-                            $withinfield .= ':' . $defvalue;
210
+                            $withinfield .= ':'.$defvalue;
211 211
                         }
212 212
                     }
213 213
                 }
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
             $fieldType   = $userField->getSetting('FieldType');
237 237
             $fieldObject = new $fieldType($userField, $animal);
238 238
             //do we only need to create a query for active fields ?
239
-            $query .= ",'" . $user{$fields[$i]} . "'";
239
+            $query .= ",'".$user{$fields[$i]}."'";
240 240
         }
241 241
         $query .= ')';
242 242
         //debug options
243 243
         //echo $query."<br>"; die();
244 244
         $GLOBALS['xoopsDB']->query($query);
245
-        redirect_header('add_litter.php?f=sire&random=' . $random . '&st=' . $st . '&r=1&l=a', 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, ['[father]' => $moduleConfig['father']]));
245
+        redirect_header('add_litter.php?f=sire&random='.$random.'&st='.$st.'&r=1&l=a', 1, strtr(_MA_PEDIGREE_ADD_SIREPLZ, ['[father]' => $moduleConfig['father']]));
246 246
     }
247 247
     //find letter on which to start else set to 'a'
248 248
         $l = Request::getWord('l', 'a', 'GET');
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     //create list of males dog to select from
253 253
     $perPage = $moduleConfig['perpage'];
254 254
     //count total number of dogs
255
-    $numDog = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='0' AND naam LIKE '" . $l . "%'";
255
+    $numDog = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='0' AND naam LIKE '".$l."%'";
256 256
     $numRes = $GLOBALS['xoopsDB']->query($numDog);
257 257
     //total number of dogs the query will find
258 258
     $numResults = $GLOBALS['xoopsDB']->getRowsNum($numRes);
@@ -267,20 +267,20 @@  discard block
 block discarded – undo
267 267
     $pages = '';
268 268
     for ($i = 65; $i <= 90; ++$i) {
269 269
         if ($l == chr($i)) {
270
-            $pages .= '<b><a href="add_litter.php?f=sire&r=1&r=1&random=' . $random . '&l=' . chr($i) . '">' . chr($i) . '</a></b>&nbsp;';
270
+            $pages .= '<b><a href="add_litter.php?f=sire&r=1&r=1&random='.$random.'&l='.chr($i).'">'.chr($i).'</a></b>&nbsp;';
271 271
         } else {
272
-            $pages .= '<a href="add_litter.php?f=sire&r=1&r=1&random=' . $random . '&l=' . chr($i) . '">' . chr($i) . '</a>&nbsp;';
272
+            $pages .= '<a href="add_litter.php?f=sire&r=1&r=1&random='.$random.'&l='.chr($i).'">'.chr($i).'</a>&nbsp;';
273 273
         }
274 274
     }
275 275
     $pages .= '-&nbsp;';
276
-    $pages .= '<a href="add_litter.php?f=sire&r=1&random=' . $random . '&l=Ã…">Ã…</a>&nbsp;';
277
-    $pages .= '<a href="add_litter.php?f=sire&r=1&random=' . $random . '&l=Ö">Ö</a>&nbsp;';
276
+    $pages .= '<a href="add_litter.php?f=sire&r=1&random='.$random.'&l=Ã…">Ã…</a>&nbsp;';
277
+    $pages .= '<a href="add_litter.php?f=sire&r=1&random='.$random.'&l=Ö">Ö</a>&nbsp;';
278 278
     //create linebreak
279 279
     $pages .= '<br>';
280 280
     //create previous button
281 281
     if ($numPages > 1) {
282 282
         if ($currentPage > 1) {
283
-            $pages .= '<a href="add_litter.php?f=sire&r=1&l=' . $l . '&random=' . $random . '&st=' . ($st - $perPage) . '">' . _MA_PEDIGREE_PREVIOUS . '</a>&nbsp;&nbsp';
283
+            $pages .= '<a href="add_litter.php?f=sire&r=1&l='.$l.'&random='.$random.'&st='.($st - $perPage).'">'._MA_PEDIGREE_PREVIOUS.'</a>&nbsp;&nbsp';
284 284
         }
285 285
     }
286 286
     //create numbers
@@ -290,19 +290,19 @@  discard block
 block discarded – undo
290 290
             $pages .= '<br>';
291 291
         }
292 292
         if ($x != $currentPage) {
293
-            $pages .= '<a href="add_litter.php?f=sire&r=1&l=' . $l . '&random=' . $random . '&st=' . ($perPage * ($x - 1)) . '">' . $x . '</a>&nbsp;&nbsp;';
293
+            $pages .= '<a href="add_litter.php?f=sire&r=1&l='.$l.'&random='.$random.'&st='.($perPage * ($x - 1)).'">'.$x.'</a>&nbsp;&nbsp;';
294 294
         } else {
295
-            $pages .= $x . '&nbsp;&nbsp';
295
+            $pages .= $x.'&nbsp;&nbsp';
296 296
         }
297 297
     }
298 298
     //create next button
299 299
     if ($numPages > 1) {
300 300
         if ($currentPage < $numPages) {
301
-            $pages .= '<a href="add_litter.php?f=sire&r=1&l=' . $l . '&random=' . $random . '&st=' . ($st + $perPage) . '">' . _MA_PEDIGREE_NEXT . '</a>&nbsp;&nbsp';
301
+            $pages .= '<a href="add_litter.php?f=sire&r=1&l='.$l.'&random='.$random.'&st='.($st + $perPage).'">'._MA_PEDIGREE_NEXT.'</a>&nbsp;&nbsp';
302 302
         }
303 303
     }
304 304
     //query
305
-    $queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft = '0' AND naam LIKE '" . $l . "%' ORDER BY naam LIMIT " . $st . ', ' . $perPage;
305
+    $queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft = '0' AND naam LIKE '".$l."%' ORDER BY naam LIMIT ".$st.', '.$perPage;
306 306
     $result      = $GLOBALS['xoopsDB']->query($queryString);
307 307
 
308 308
     $animal = new Pedigree\Animal();
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         'id'          => '0',
340 340
         'name'        => '',
341 341
         'gender'      => '',
342
-        'link'        => '<a href="add_litter.php?f=dam&random=' . $random . '&selsire=0">' . strtr(_MA_PEDIGREE_ADD_SIREUNKNOWN, ['[father]' => $moduleConfig['father']]) . '</a>',
342
+        'link'        => '<a href="add_litter.php?f=dam&random='.$random.'&selsire=0">'.strtr(_MA_PEDIGREE_ADD_SIREUNKNOWN, ['[father]' => $moduleConfig['father']]).'</a>',
343 343
         'colour'      => '',
344 344
         'number'      => '',
345 345
         'usercolumns' => $empty
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
         } else {
353 353
             $camera = '';
354 354
         }
355
-        $name = stripslashes($row['naam']) . $camera;
355
+        $name = stripslashes($row['naam']).$camera;
356 356
         //empty array
357 357
         unset($columnvalue);
358 358
         //fill array
@@ -360,17 +360,17 @@  discard block
 block discarded – undo
360 360
             $x = $columns[$i]['columnnumber'];
361 361
             if (is_array($columns[$i]['lookupval'])) {
362 362
                 foreach ($columns[$i]['lookupval'] as $key => $keyValue) {
363
-                    if ($key == $row['user' . $x]) {
363
+                    if ($key == $row['user'.$x]) {
364 364
                         $value = $keyValue['value'];
365 365
                     }
366 366
                 }
367 367
                 //debug information
368 368
                 ///echo $columns[$i]['columnname']."is an array !";
369 369
             } //format value - cant use object because of query count
370
-            elseif (0 === strncmp($row['user' . $x], 'http://', 7)) {
371
-                $value = '<a href="' . $row['user' . $x] . '">' . $row['user' . $x] . '</a>';
370
+            elseif (0 === strncmp($row['user'.$x], 'http://', 7)) {
371
+                $value = '<a href="'.$row['user'.$x].'">'.$row['user'.$x].'</a>';
372 372
             } else {
373
-                $value = $row['user' . $x];
373
+                $value = $row['user'.$x];
374 374
             }
375 375
             $columnvalue[] = ['value' => $value];
376 376
         }
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             'id'          => $row['id'],
379 379
             'name'        => $name,
380 380
             'gender'      => '<img src="assets/images/male.gif">',
381
-            'link'        => '<a href="add_litter.php?f=dam&random=' . $random . '&selsire=' . $row['id'] . '">' . $name . '</a>',
381
+            'link'        => '<a href="add_litter.php?f=dam&random='.$random.'&selsire='.$row['id'].'">'.$name.'</a>',
382 382
             'colour'      => '',
383 383
             'number'      => '',
384 384
             'usercolumns' => $columnvalue
@@ -424,9 +424,9 @@  discard block
 block discarded – undo
424 424
     if (!isset($_GET['r'])) {
425 425
         //insert into pedigree_temp
426 426
         //      $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' SET father =' . $_GET['selsire'] . ' WHERE id=' . $random;
427
-        $query = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' SET father =' . Request::getInt('selsire', 0, 'GET') . ' WHERE id=' . $random;
427
+        $query = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('pedigree_temp').' SET father ='.Request::getInt('selsire', 0, 'GET').' WHERE id='.$random;
428 428
         $GLOBALS['xoopsDB']->queryF($query);
429
-        redirect_header('add_litter.php?f=dam&random=' . $random . '&st=' . $st . '&r=1', 1, strtr(_MA_PEDIGREE_ADD_SIREOK, ['[mother]' => $moduleConfig['mother']]));
429
+        redirect_header('add_litter.php?f=dam&random='.$random.'&st='.$st.'&r=1', 1, strtr(_MA_PEDIGREE_ADD_SIREOK, ['[mother]' => $moduleConfig['mother']]));
430 430
     }
431 431
     //find letter on which to start else set to 'a'
432 432
     //    if (isset($_GET['l'])) {
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     $perPage = (int)$moduleConfig['perpage'];
443 443
     //count total number of dogs
444 444
     //  $numDog = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='1' and naam LIKE '" . $l . "%'";
445
-    $numDog = 'SELECT id FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft='1' AND naam LIKE '" . $GLOBALS['xoopsDB']->escape($l) . "%'";
445
+    $numDog = 'SELECT id FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft='1' AND naam LIKE '".$GLOBALS['xoopsDB']->escape($l)."%'";
446 446
     $numRes = $GLOBALS['xoopsDB']->query($numDog);
447 447
     //total number of dogs the query will find
448 448
     $numResults = $GLOBALS['xoopsDB']->getRowsNum($numRes);
@@ -457,20 +457,20 @@  discard block
 block discarded – undo
457 457
     $pages = '';
458 458
     for ($i = 65; $i <= 90; ++$i) {
459 459
         if ($l == chr($i)) {
460
-            $pages .= '<b><a href="add_litter.php?f=dam&r=1&random=' . $random . '&l=' . chr($i) . '">' . chr($i) . '</a></b>&nbsp;';
460
+            $pages .= '<b><a href="add_litter.php?f=dam&r=1&random='.$random.'&l='.chr($i).'">'.chr($i).'</a></b>&nbsp;';
461 461
         } else {
462
-            $pages .= '<a href="add_litter.php?f=dam&r=1&random=' . $random . '&l=' . chr($i) . '">' . chr($i) . '</a>&nbsp;';
462
+            $pages .= '<a href="add_litter.php?f=dam&r=1&random='.$random.'&l='.chr($i).'">'.chr($i).'</a>&nbsp;';
463 463
         }
464 464
     }
465 465
     $pages .= '-&nbsp;';
466
-    $pages .= '<a href="add_litter.php?f=dam&r=1&random=' . $random . '&l=Ã…">Ã…</a>&nbsp;';
467
-    $pages .= '<a href="add_litter.php?f=dam&r=1&random=' . $random . '&l=Ö">Ö</a>&nbsp;';
466
+    $pages .= '<a href="add_litter.php?f=dam&r=1&random='.$random.'&l=Ã…">Ã…</a>&nbsp;';
467
+    $pages .= '<a href="add_litter.php?f=dam&r=1&random='.$random.'&l=Ö">Ö</a>&nbsp;';
468 468
     //create linebreak
469 469
     $pages .= '<br>';
470 470
     //create previous button
471 471
     if ($numPages > 1) {
472 472
         if ($currentPage > 1) {
473
-            $pages .= '<a href="add_litter.php?f=dam&r=1&l=' . $l . '&random=' . $random . '&st=' . ($st - $perPage) . '">' . _MA_PEDIGREE_PREVIOUS . '</a>&nbsp;&nbsp';
473
+            $pages .= '<a href="add_litter.php?f=dam&r=1&l='.$l.'&random='.$random.'&st='.($st - $perPage).'">'._MA_PEDIGREE_PREVIOUS.'</a>&nbsp;&nbsp';
474 474
         }
475 475
     }
476 476
     //create numbers
@@ -480,19 +480,19 @@  discard block
 block discarded – undo
480 480
             $pages .= '<br>';
481 481
         }
482 482
         if ($x != $currentPage) {
483
-            $pages .= '<a href="add_litter.php?f=dam&r=1&l=' . $l . '&random=' . $random . '&st=' . ($perPage * ($x - 1)) . '">' . $x . '</a>&nbsp;&nbsp;';
483
+            $pages .= '<a href="add_litter.php?f=dam&r=1&l='.$l.'&random='.$random.'&st='.($perPage * ($x - 1)).'">'.$x.'</a>&nbsp;&nbsp;';
484 484
         } else {
485
-            $pages .= $x . '&nbsp;&nbsp';
485
+            $pages .= $x.'&nbsp;&nbsp';
486 486
         }
487 487
     }
488 488
     //create next button
489 489
     if ($numPages > 1) {
490 490
         if ($currentPage < $numPages) {
491
-            $pages .= '<a href="add_litter.php?f=dam&r=1&l=' . $l . '&random=' . $random . '&st=' . ($st + $perPage) . '">' . _MA_PEDIGREE_NEXT . '</a>&nbsp;&nbsp';
491
+            $pages .= '<a href="add_litter.php?f=dam&r=1&l='.$l.'&random='.$random.'&st='.($st + $perPage).'">'._MA_PEDIGREE_NEXT.'</a>&nbsp;&nbsp';
492 492
         }
493 493
     }
494 494
     //query
495
-    $queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE roft = '1' AND naam LIKE '" . $l . "%' ORDER BY naam LIMIT " . $st . ', ' . $perPage;
495
+    $queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE roft = '1' AND naam LIKE '".$l."%' ORDER BY naam LIMIT ".$st.', '.$perPage;
496 496
     $result      = $GLOBALS['xoopsDB']->query($queryString);
497 497
 
498 498
     $animal = new Pedigree\Animal();
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
         'id'          => '0',
530 530
         'name'        => '',
531 531
         'gender'      => '',
532
-        'link'        => '<a href="add_litter.php?f=check&random=' . $random . '&seldam=0">' . strtr(_MA_PEDIGREE_ADD_DAMUNKNOWN, ['[mother]' => $moduleConfig['mother']]) . '</a>',
532
+        'link'        => '<a href="add_litter.php?f=check&random='.$random.'&seldam=0">'.strtr(_MA_PEDIGREE_ADD_DAMUNKNOWN, ['[mother]' => $moduleConfig['mother']]).'</a>',
533 533
         'colour'      => '',
534 534
         'number'      => '',
535 535
         'usercolumns' => $empty
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
         } else {
543 543
             $camera = '';
544 544
         }
545
-        $name = stripslashes($row['naam']) . $camera;
545
+        $name = stripslashes($row['naam']).$camera;
546 546
         //empty array
547 547
         unset($columnvalue);
548 548
         //fill array
@@ -550,17 +550,17 @@  discard block
 block discarded – undo
550 550
             $x = $columns[$i]['columnnumber'];
551 551
             if (is_array($columns[$i]['lookupval'])) {
552 552
                 foreach ($columns[$i]['lookupval'] as $key => $keyValue) {
553
-                    if ($key == $row['user' . $x]) {
553
+                    if ($key == $row['user'.$x]) {
554 554
                         $value = $keyValue['value'];
555 555
                     }
556 556
                 }
557 557
                 //debug information
558 558
                 ///echo $columns[$i]['columnname']."is an array !";
559 559
             } //format value - cant use object because of query count
560
-            elseif (0 === strncmp($row['user' . $x], 'http://', 7)) {
561
-                $value = '<a href="' . $row['user' . $x] . '">' . $row['user' . $x] . '</a>';
560
+            elseif (0 === strncmp($row['user'.$x], 'http://', 7)) {
561
+                $value = '<a href="'.$row['user'.$x].'">'.$row['user'.$x].'</a>';
562 562
             } else {
563
-                $value = $row['user' . $x];
563
+                $value = $row['user'.$x];
564 564
             }
565 565
             $columnvalue[] = ['value' => $value];
566 566
         }
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
             'id'          => $row['id'],
569 569
             'name'        => $name,
570 570
             'gender'      => '<img src="assets/images/female.gif">',
571
-            'link'        => '<a href="add_litter.php?f=check&random=' . $random . '&seldam=' . $row['id'] . '">' . $name . '</a>',
571
+            'link'        => '<a href="add_litter.php?f=check&random='.$random.'&seldam='.$row['id'].'">'.$name.'</a>',
572 572
             'colour'      => '',
573 573
             'number'      => '',
574 574
             'usercolumns' => $columnvalue
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
         $random = $_GET['random'];
604 604
     }
605 605
     //query
606
-    $queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . ' WHERE id = ' . $random;
606
+    $queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_temp').' WHERE id = '.$random;
607 607
     $result      = $GLOBALS['xoopsDB']->query($queryString);
608 608
     $seldam      = Request::getInt('seldam', 0, 'GET');
609 609
     while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
@@ -635,19 +635,19 @@  discard block
 block discarded – undo
635 635
                 sort($fields);
636 636
                 $usersql = '';
637 637
                 foreach ($fields as $i => $iValue) {
638
-                    $userfields{$fields[$i]} = explode(':', $row['user' . $iValue]);
639
-                    $query .= ",'" . $userfields{$fields[$i]}
640
-                        [$c] . "'";
638
+                    $userfields{$fields[$i]} = explode(':', $row['user'.$iValue]);
639
+                    $query .= ",'".$userfields{$fields[$i]}
640
+                        [$c]."'";
641 641
                 }
642 642
                 //insert into pedigree
643 643
                 $query .= ');';
644 644
                 $GLOBALS['xoopsDB']->queryF($query);
645 645
             }
646 646
         }
647
-        $sqlQuery = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_temp') . " WHERE id='" . $random . "'";
647
+        $sqlQuery = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_temp')." WHERE id='".$random."'";
648 648
     }
649 649
     redirect_header('latest.php', 1, strtr(_MA_PEDIGREE_ADD_LIT_OK, ['[animalTypes]' => $moduleConfig['animalTypes']]));
650 650
 }
651 651
 
652 652
 //footer
653
-include XOOPS_ROOT_PATH . '/footer.php';
653
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
breeder.php 1 patch
Spacing   +18 added lines, -18 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
 // Include any common code for this module.
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_breeder.tpl';
18 18
 
19
-include XOOPS_ROOT_PATH . '/header.php';
19
+include XOOPS_ROOT_PATH.'/header.php';
20 20
 // Include any common code for this module.
21
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
21
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
22 22
 $xoopsTpl->assign('page_title', 'Pedigree database - View owner/breeder');
23 23
 
24 24
 // Breadcrumb
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 } else {
44 44
     $l = 'a';
45 45
 }
46
-$w = $l . '%';
46
+$w = $l.'%';
47 47
 if (1 == $l) {
48 48
     $l = 'LIKE';
49 49
 }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 }
74 74
 
75 75
 //count total number of owners
76
-$numowner = 'SELECT count(id) FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE ' . $f . " LIKE '" . $w . "'";
76
+$numowner = 'SELECT count(id) FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE '.$f." LIKE '".$w."'";
77 77
 $numRes   = $GLOBALS['xoopsDB']->query($numowner);
78 78
 //total number of owners the query will find
79 79
 list($numResults) = $GLOBALS['xoopsDB']->fetchRow($numRes);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 //create previous button
120 120
 if ($numPages > 1) {
121 121
     if ($currentPage > 1) {
122
-        $pages .= '<a href="breeder.php?f=' . $f . '&o=' . $o . '&d=' . $d . '&l=' . $l . '&st=' . ($st - $perPage) . '">' . _MA_PEDIGREE_PREVIOUS . '</a>&nbsp;&nbsp;';
122
+        $pages .= '<a href="breeder.php?f='.$f.'&o='.$o.'&d='.$d.'&l='.$l.'&st='.($st - $perPage).'">'._MA_PEDIGREE_PREVIOUS.'</a>&nbsp;&nbsp;';
123 123
 }
124 124
 
125 125
 //create numbers
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
             $pages .= '<br>';
130 130
     }
131 131
         if ($x != $currentPage) {
132
-            $pages .= '<a href="breeder.php?f=' . $f . '&o=' . $o . '&d=' . $d . '&l=' . $l . '&st=' . ($perPage * ($x - 1)) . '">' . $x . '</a>&nbsp;&nbsp;';
132
+            $pages .= '<a href="breeder.php?f='.$f.'&o='.$o.'&d='.$d.'&l='.$l.'&st='.($perPage * ($x - 1)).'">'.$x.'</a>&nbsp;&nbsp;';
133 133
     } else {
134
-        $pages .= $x . '&nbsp;&nbsp';
134
+        $pages .= $x.'&nbsp;&nbsp';
135 135
     }
136 136
 }
137 137
 }
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
 //create next button
140 140
 if ($numPages > 1) {
141 141
     if ($currentPage < $numPages) {
142
-        $pages .= '<a href="breeder.php?f=' . $f . '&o=' . $o . '&d=' . $d . '&l=' . $l . '&st=' . ($st + $perPage) . '">' . _MA_PEDIGREE_NEXT . '</a>&nbsp;&nbsp;';
142
+        $pages .= '<a href="breeder.php?f='.$f.'&o='.$o.'&d='.$d.'&l='.$l.'&st='.($st + $perPage).'">'._MA_PEDIGREE_NEXT.'</a>&nbsp;&nbsp;';
143 143
     }
144 144
 }
145 145
 
146 146
 //query
147
-$queryString = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_owner') . ' WHERE ' . $f . " LIKE '" . $w . "' ORDER BY " . $o . ' ' . $d . ' LIMIT ' . $st . ', ' . $perPage;
147
+$queryString = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_owner').' WHERE '.$f." LIKE '".$w."' ORDER BY ".$o.' '.$d.' LIMIT '.$st.', '.$perPage;
148 148
 $result      = $GLOBALS['xoopsDB']->query($queryString);
149 149
 
150 150
 while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
     if (!empty($xoopsUser)) {
154 154
         if (true === $modadmin || $row['user'] == $xoopsUser->getVar('uid')) {
155 155
             //$access = "<a href=\"dog.php?id=".$row['id']."\"><img src=\"assets/images/edit.png\" alt="._EDIT."></a>";
156
-            $access .= '<a href="deletebreeder.php?id=' . $row['id'] . "\"><img src='" . $pathIcon16 . "/delete.png' alt=" . _DELETE . '></a>';
156
+            $access .= '<a href="deletebreeder.php?id='.$row['id']."\"><img src='".$pathIcon16."/delete.png' alt="._DELETE.'></a>';
157 157
         } else {
158 158
             $access = '';
159 159
         }
160 160
     }
161 161
     //make names
162
-    $name = $access . '<a href="owner.php?ownid=' . $row['id'] . '">' . stripslashes($row['lastname']) . ', ' . stripslashes($row['firstname']) . '</a>';
162
+    $name = $access.'<a href="owner.php?ownid='.$row['id'].'">'.stripslashes($row['lastname']).', '.stripslashes($row['firstname']).'</a>';
163 163
     //create array for owners
164 164
     $dogs[] = [
165 165
         'id'   => $row['id'],
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
 }
176 176
 //assign links
177 177
 if ('ASC' === $d) {
178
-    $nl = '<a href="breeder.php?f=' . $f . '&o=lastname&d=DESC">' . _MA_PEDIGREE_OWN_NAME . '</a>';
179
-    $cl = '<a href="breeder.php?f=' . $f . '&o=city&d=DESC">' . _MA_PEDIGREE_OWN_CITY . '</a>';
178
+    $nl = '<a href="breeder.php?f='.$f.'&o=lastname&d=DESC">'._MA_PEDIGREE_OWN_NAME.'</a>';
179
+    $cl = '<a href="breeder.php?f='.$f.'&o=city&d=DESC">'._MA_PEDIGREE_OWN_CITY.'</a>';
180 180
 } else {
181
-    $nl = '<a href="breeder.php?f=' . $f . '&o=lastname&d=ASC">' . _MA_PEDIGREE_OWN_NAME . '</a>';
182
-    $cl = '<a href="breeder.php?f=' . $f . '&o=city&d=ASC">' . _MA_PEDIGREE_OWN_CITY . '</a>';
181
+    $nl = '<a href="breeder.php?f='.$f.'&o=lastname&d=ASC">'._MA_PEDIGREE_OWN_NAME.'</a>';
182
+    $cl = '<a href="breeder.php?f='.$f.'&o=city&d=ASC">'._MA_PEDIGREE_OWN_CITY.'</a>';
183 183
 }
184 184
 $xoopsTpl->assign('namelink', $nl);
185 185
 $xoopsTpl->assign('colourlink', $cl);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 }
193 193
 //create string
194 194
 $matches     = _MA_PEDIGREE_MATCHESB;
195
-$nummatchstr = $numResults . $matches . ($st + 1) . '-' . $lastshown . ' (' . $numPages . ' pages)';
195
+$nummatchstr = $numResults.$matches.($st + 1).'-'.$lastshown.' ('.$numPages.' pages)';
196 196
 $xoopsTpl->assign('nummatch', $nummatchstr);
197 197
 $xoopsTpl->assign('pages', $pages);
198 198
 
@@ -214,4 +214,4 @@  discard block
 block discarded – undo
214 214
 $xoopsTpl->assign('pageTitle', _MA_PEDIGREE_BREEDER_PAGETITLE);
215 215
 
216 216
 //comments and footer
217
-include XOOPS_ROOT_PATH . '/footer.php';
217
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
mpedigree.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  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
 
10 10
 /** @var Pedigree\Helper $helper */
11 11
 $helper = Pedigree\Helper::getInstance();
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $helper->loadLanguage('main');
15 15
 
16 16
 // Include any common code for this module.
17
-require_once XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/include/common.php';
17
+require_once XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/include/common.php';
18 18
 
19 19
 $GLOBALS['xoopsOption']['template_main'] = 'pedigree_mpedigree.tpl';
20 20
 
@@ -96,37 +96,37 @@  discard block
 block discarded – undo
96 96
 mfmm.naam as mfmm_naam,
97 97
 mmmm.id as mmmm_id,
98 98
 mmmm.naam as mmmm_naam
99
-    FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' d
100
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' f ON d.father = f.id
101
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' m ON d.mother = m.id
102
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ff ON f.father = ff.id
103
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fff ON ff.father = fff.id
104
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffm ON ff.mother = ffm.id
105
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mf ON m.father = mf.id
106
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mff ON mf.father = mff.id
107
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfm ON mf.mother = mfm.id
108
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fm ON f.mother = fm.id
109
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmf ON fm.father = fmf.id
110
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmm ON fm.mother = fmm.id
111
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mm ON m.mother = mm.id
112
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmf ON mm.father = mmf.id
113
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmm ON mm.mother = mmm.id
114
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffff ON fff.father = ffff.id
115
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffmf ON ffm.father = ffmf.id
116
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmff ON fmf.father = fmff.id
117
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmmf ON fmm.father = fmmf.id
118
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmff ON mmf.father = mmff.id
119
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfff ON mff.father = mfff.id
120
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfmf ON mfm.father = mfmf.id
121
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmmf ON mmm.father = mmmf.id
122
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fffm ON fff.mother = fffm.id
123
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' ffmm ON ffm.mother = ffmm.id
124
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmfm ON fmf.mother = fmfm.id
125
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' fmmm ON fmm.mother = fmmm.id
126
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmfm ON mmf.mother = mmfm.id
127
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mffm ON mff.mother = mffm.id
128
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mfmm ON mfm.mother = mfmm.id
129
-LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' mmmm ON mmm.mother = mmmm.id
99
+    FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' d
100
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' f ON d.father = f.id
101
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' m ON d.mother = m.id
102
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ff ON f.father = ff.id
103
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fff ON ff.father = fff.id
104
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffm ON ff.mother = ffm.id
105
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mf ON m.father = mf.id
106
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mff ON mf.father = mff.id
107
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfm ON mf.mother = mfm.id
108
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fm ON f.mother = fm.id
109
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmf ON fm.father = fmf.id
110
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmm ON fm.mother = fmm.id
111
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mm ON m.mother = mm.id
112
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmf ON mm.father = mmf.id
113
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmm ON mm.mother = mmm.id
114
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffff ON fff.father = ffff.id
115
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffmf ON ffm.father = ffmf.id
116
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmff ON fmf.father = fmff.id
117
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmmf ON fmm.father = fmmf.id
118
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmff ON mmf.father = mmff.id
119
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfff ON mff.father = mfff.id
120
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfmf ON mfm.father = mfmf.id
121
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmmf ON mmm.father = mmmf.id
122
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fffm ON fff.mother = fffm.id
123
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' ffmm ON ffm.mother = ffmm.id
124
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmfm ON fmf.mother = fmfm.id
125
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' fmmm ON fmm.mother = fmmm.id
126
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmfm ON mmf.mother = mmfm.id
127
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mffm ON mff.mother = mffm.id
128
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mfmm ON mfm.mother = mfmm.id
129
+LEFT JOIN ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree').' mmmm ON mmm.mother = mmmm.id
130 130
 WHERE d.id=' . $pedId;
131 131
 
132 132
 $result = $GLOBALS['xoopsDB']->query($queryString);
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 }
299 299
 
300 300
 //add data to smarty template
301
-$GLOBALS['xoopsTpl']->assign('xoops_pagetitle', $d['d']['name'] . ' -- mega pedigree');
301
+$GLOBALS['xoopsTpl']->assign('xoops_pagetitle', $d['d']['name'].' -- mega pedigree');
302 302
 //assign dog(s)
303 303
 $GLOBALS['xoopsTpl']->assign('d', $d);
304 304
 $GLOBALS['xoopsTpl']->assign('male', '<img src="assets/images/male.gif">');
Please login to merge, or discard this patch.
include/ZervWizard.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -70,17 +70,17 @@  discard block
 block discarded – undo
70 70
             return;
71 71
         }
72 72
 
73
-        $containerKey = $this->_containerPrefix . $name;
73
+        $containerKey = $this->_containerPrefix.$name;
74 74
         if (!array_key_exists($containerKey, $container)) {
75 75
             $container[$containerKey] = [];
76 76
         }
77 77
 
78
-        $this->container =& $container[$containerKey];
78
+        $this->container = & $container[$containerKey];
79 79
 
80 80
         if (!array_key_exists('_errors', $this->container)) {
81 81
             $this->container['_errors'] = [];
82 82
         }
83
-        $this->_errors =& $this->container['_errors'];
83
+        $this->_errors = & $this->container['_errors'];
84 84
     }
85 85
 
86 86
     /**
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $this->_errors = [];
119 119
 
120 120
             // processing callback must exist and validate to proceed
121
-            $callback = 'process' . $action;
121
+            $callback = 'process'.$action;
122 122
             $complete = method_exists($this, $callback) && $this->$callback($form);
123 123
 
124 124
             $this->container[$this->_step_status_key][$action] = $complete;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     $this->_errors = [];
146 146
 
147 147
                     // processing callback must exist and validate to proceed
148
-                    $callback = 'process' . $action;
148
+                    $callback = 'process'.$action;
149 149
                     $complete = method_exists($this, $callback) && $this->$callback($form);
150 150
 
151 151
                     $this->container[$this->_step_status_key][$action] = $complete;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         }
175 175
 
176 176
         // setup any required data for this step
177
-        $callback = 'prepare' . $this->getStepName();
177
+        $callback = 'prepare'.$this->getStepName();
178 178
         if (method_exists($this, $callback)) {
179 179
             $this->$callback();
180 180
         }
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
     {
195 195
         if ($this->coalesce($this->options['redirectAfterPost'], false)) {
196 196
             $redir = $_SERVER['REQUEST_URI'];
197
-            $redir = preg_replace('/\?' . preg_quote($_SERVER['QUERY_STRING'], '/') . '$/', '', $redir);
198
-            header('Location: ' . $redir);
197
+            $redir = preg_replace('/\?'.preg_quote($_SERVER['QUERY_STRING'], '/').'$/', '', $redir);
198
+            header('Location: '.$redir);
199 199
             exit;
200 200
         }
201 201
     }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     public function addStep($stepname, $title)
449 449
     {
450 450
         if (array_key_exists($stepname, $this->_steps)) {
451
-            $this->addError('step', 'Step with name ' . $stepname . ' already exists');
451
+            $this->addError('step', 'Step with name '.$stepname.' already exists');
452 452
 
453 453
             return;
454 454
         }
Please login to merge, or discard this patch.
include/class_field.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function __construct($message)
22 22
     {
23
-        echo '<span style="color: red;"><h3>' . $message . '</h3></span>';
23
+        echo '<span style="color: red;"><h3>'.$message.'</h3></span>';
24 24
     }
25 25
 }
26 26
 
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
     {
38 38
         global $xoopsDB;
39 39
         if (0 == $animalnumber) {
40
-            $SQL = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . " WHERE id = '1'";
40
+            $SQL = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree')." WHERE id = '1'";
41 41
         } else {
42
-            $SQL = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_tree') . ' WHERE id = ' . $animalnumber;
42
+            $SQL = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_tree').' WHERE id = '.$animalnumber;
43 43
         }
44 44
         $result    = $GLOBALS['xoopsDB']->query($SQL);
45 45
         $row       = $GLOBALS['xoopsDB']->fetchRow($result);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function getNumOfFields()
57 57
     {
58 58
         global $xoopsDB;
59
-        $SQL    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . ' ORDER BY `order`';
59
+        $SQL    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_fields').' ORDER BY `order`';
60 60
         $fields = [];
61 61
         $result = $GLOBALS['xoopsDB']->query($SQL);
62 62
         $count  = 0;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     {
268 268
         $ret = [];
269 269
         global $xoopsDB;
270
-        $SQL    = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_lookup' . $fieldnumber) . " ORDER BY 'order'";
270
+        $SQL    = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('pedigree_lookup'.$fieldnumber)." ORDER BY 'order'";
271 271
         $result = $GLOBALS['xoopsDB']->query($SQL);
272 272
         while (false !== ($row = $GLOBALS['xoopsDB']->fetchArray($result))) {
273 273
             $ret[] = ['id' => $row['id'], 'value' => $row['value']];
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
      */
293 293
     public function showField()
294 294
     {
295
-        return $this->fieldname . ' : ' . $this->value;
295
+        return $this->fieldname.' : '.$this->value;
296 296
     }
297 297
 
298 298
     /**
@@ -329,11 +329,11 @@  discard block
 block discarded – undo
329 329
         $this->fieldnumber = $parentObject->getId();
330 330
 
331 331
         $this->fieldname    = $parentObject->fieldname;
332
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
332
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
333 333
         $this->defaultvalue = $parentObject->defaultvalue;
334 334
         $this->lookuptable  = $parentObject->lookuptable;
335 335
         if ('0' == $this->lookuptable) {
336
-            new SystemMessage('A lookuptable must be specified for userfield' . $this->fieldnumber);
336
+            new SystemMessage('A lookuptable must be specified for userfield'.$this->fieldnumber);
337 337
         }
338 338
     }
339 339
 
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function editField()
344 344
     {
345
-        $radio          = new \XoopsFormRadio('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $value = $this->value);
345
+        $radio          = new \XoopsFormRadio('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $value = $this->value);
346 346
         $lookupcontents = Field::lookupField($this->fieldnumber);
347 347
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
348
-            $radio->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'] . '<br>'));
348
+            $radio->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'].'<br>'));
349 349
         }
350 350
 
351 351
         return $radio;
@@ -358,10 +358,10 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function newField($name = '')
360 360
     {
361
-        $radio          = new \XoopsFormRadio('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $value = $this->defaultvalue);
361
+        $radio          = new \XoopsFormRadio('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $value = $this->defaultvalue);
362 362
         $lookupcontents = Field::lookupField($this->fieldnumber);
363 363
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
364
-            $radio->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'] . '<br>'));
364
+            $radio->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'].'<br>'));
365 365
         }
366 366
 
367 367
         return $radio;
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             }
398 398
         }
399 399
 
400
-        return $this->fieldname . ' : ' . $choosenvalue;
400
+        return $this->fieldname.' : '.$choosenvalue;
401 401
     }
402 402
 
403 403
     /**
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         $select         = '<select size="1" name="query" style="width: 140px;">';
425 425
         $lookupcontents = Field::lookupField($this->fieldnumber);
426 426
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
427
-            $select .= '<option value="' . $lookupcontents[$i]['id'] . '">' . $lookupcontents[$i]['value'] . '</option>';
427
+            $select .= '<option value="'.$lookupcontents[$i]['id'].'">'.$lookupcontents[$i]['value'].'</option>';
428 428
         }
429 429
         $select .= '</select>';
430 430
 
@@ -445,11 +445,11 @@  discard block
 block discarded – undo
445 445
     {
446 446
         $this->fieldnumber  = $parentObject->getId();
447 447
         $this->fieldname    = $parentObject->fieldname;
448
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
448
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
449 449
         $this->defaultvalue = $parentObject->defaultvalue;
450 450
         $this->lookuptable  = $parentObject->lookuptable;
451 451
         if ('0' == $this->lookuptable) {
452
-            new SystemMessage('A lookuptable must be specified for userfield' . $this->fieldnumber);
452
+            new SystemMessage('A lookuptable must be specified for userfield'.$this->fieldnumber);
453 453
         }
454 454
     }
455 455
 
@@ -458,10 +458,10 @@  discard block
 block discarded – undo
458 458
      */
459 459
     public function editField()
460 460
     {
461
-        $select         = new \XoopsFormSelect('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $value = $this->value, $size = 1, $multiple = false);
461
+        $select         = new \XoopsFormSelect('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $value = $this->value, $size = 1, $multiple = false);
462 462
         $lookupcontents = Field::lookupField($this->fieldnumber);
463 463
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
464
-            $select->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'] . '<br>'));
464
+            $select->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'].'<br>'));
465 465
         }
466 466
 
467 467
         return $select;
@@ -474,10 +474,10 @@  discard block
 block discarded – undo
474 474
      */
475 475
     public function newField($name = '')
476 476
     {
477
-        $select         = new \XoopsFormSelect('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $value = $this->defaultvalue, $size = 1, $multiple = false);
477
+        $select         = new \XoopsFormSelect('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $value = $this->defaultvalue, $size = 1, $multiple = false);
478 478
         $lookupcontents = Field::lookupField($this->fieldnumber);
479 479
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
480
-            $select->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'] . '<br>'));
480
+            $select->addOption($lookupcontents[$i]['id'], $name = ($lookupcontents[$i]['value'].'<br>'));
481 481
         }
482 482
 
483 483
         return $select;
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             }
514 514
         }
515 515
 
516
-        return $this->fieldname . ' : ' . $choosenvalue;
516
+        return $this->fieldname.' : '.$choosenvalue;
517 517
     }
518 518
 
519 519
     /**
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
         $select         = '<select size="1" name="query" style="width: 140px;">';
541 541
         $lookupcontents = Field::lookupField($this->fieldnumber);
542 542
         for ($i = 0, $iMax = count($lookupcontents); $i < $iMax; ++$i) {
543
-            $select .= '<option value="' . $lookupcontents[$i]['id'] . '">' . $lookupcontents[$i]['value'] . '</option>';
543
+            $select .= '<option value="'.$lookupcontents[$i]['id'].'">'.$lookupcontents[$i]['value'].'</option>';
544 544
         }
545 545
         $select .= '</select>';
546 546
 
@@ -561,17 +561,17 @@  discard block
 block discarded – undo
561 561
     {
562 562
         $this->fieldnumber  = $parentObject->getId();
563 563
         $this->fieldname    = $parentObject->fieldname;
564
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
564
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
565 565
         $this->defaultvalue = $parentObject->defaultvalue;
566 566
         $this->lookuptable  = $parentObject->lookuptable;
567 567
         if ('1' == $this->lookuptable) {
568
-            new SystemMessage('No lookuptable may be specified for userfield' . $this->fieldnumber);
568
+            new SystemMessage('No lookuptable may be specified for userfield'.$this->fieldnumber);
569 569
         }
570 570
         if ('1' == $parentObject->ViewInAdvanced) {
571
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be shown in advanced info');
571
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be shown in advanced info');
572 572
         }
573 573
         if ('1' == $parentObject->ViewInPie) {
574
-            new SystemMessage('A Pie-chart cannot be specified for userfield' . $this->fieldnumber);
574
+            new SystemMessage('A Pie-chart cannot be specified for userfield'.$this->fieldnumber);
575 575
         }
576 576
     }
577 577
 
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
      */
581 581
     public function editField()
582 582
     {
583
-        $textbox = new \XoopsFormText('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $size = 50, $maxsize = 50, $value = $this->value);
583
+        $textbox = new \XoopsFormText('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $size = 50, $maxsize = 50, $value = $this->value);
584 584
 
585 585
         return $textbox;
586 586
     }
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
      */
593 593
     public function newField($name = '')
594 594
     {
595
-        $textbox = new \XoopsFormText('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $size = 50, $maxsize = 50, $value = $this->defaultvalue);
595
+        $textbox = new \XoopsFormText('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $size = 50, $maxsize = 50, $value = $this->defaultvalue);
596 596
 
597 597
         return $textbox;
598 598
     }
@@ -619,16 +619,16 @@  discard block
 block discarded – undo
619 619
     {
620 620
         $this->fieldnumber  = $parentObject->getId();
621 621
         $this->fieldname    = $parentObject->fieldname;
622
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
622
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
623 623
         $this->defaultvalue = $parentObject->defaultvalue;
624 624
         if ('1' == $parentObject->LookupTable) {
625
-            new SystemMessage('No lookuptable may be specified for userfield' . $this->fieldnumber);
625
+            new SystemMessage('No lookuptable may be specified for userfield'.$this->fieldnumber);
626 626
         }
627 627
         if ('1' == $parentObject->ViewInAdvanced) {
628
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be shown in advanced info');
628
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be shown in advanced info');
629 629
         }
630 630
         if ('1' == $parentObject->ViewInPie) {
631
-            new SystemMessage('A Pie-chart cannot be specified for userfield' . $this->fieldnumber);
631
+            new SystemMessage('A Pie-chart cannot be specified for userfield'.$this->fieldnumber);
632 632
         }
633 633
     }
634 634
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      */
638 638
     public function editField()
639 639
     {
640
-        $textarea = new \XoopsFormTextArea('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $value = $this->value, $rows = 5, $cols = 50);
640
+        $textarea = new \XoopsFormTextArea('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $value = $this->value, $rows = 5, $cols = 50);
641 641
 
642 642
         return $textarea;
643 643
     }
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
      */
650 650
     public function newField($name = '')
651 651
     {
652
-        $textarea = new \XoopsFormTextArea('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $value = $this->defaultvalue, $rows = 5, $cols = 50);
652
+        $textarea = new \XoopsFormTextArea('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $value = $this->defaultvalue, $rows = 5, $cols = 50);
653 653
 
654 654
         return $textarea;
655 655
     }
@@ -676,16 +676,16 @@  discard block
 block discarded – undo
676 676
     {
677 677
         $this->fieldnumber  = $parentObject->getId();
678 678
         $this->fieldname    = $parentObject->fieldname;
679
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
679
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
680 680
         $this->defaultvalue = $parentObject->defaultvalue;
681 681
         if ('1' == $parentObject->lookuptable) {
682
-            new SystemMessage('No lookuptable may be specified for userfield' . $this->fieldnumber);
682
+            new SystemMessage('No lookuptable may be specified for userfield'.$this->fieldnumber);
683 683
         }
684 684
         if ('1' == $parentObject->ViewInAdvanced) {
685
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be shown in advanced info');
685
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be shown in advanced info');
686 686
         }
687 687
         if ('1' == $parentObject->ViewInPie) {
688
-            new SystemMessage('A Pie-chart cannot be specified for userfield' . $this->fieldnumber);
688
+            new SystemMessage('A Pie-chart cannot be specified for userfield'.$this->fieldnumber);
689 689
         }
690 690
     }
691 691
 
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
     public function editField()
696 696
     {
697 697
         //$textarea = new \XoopsFormFile("<b>".$this->fieldname."</b>", $this->fieldname, $maxfilesize = 2000);
698
-        $textarea = new \XoopsFormTextDateSelect('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $size = 15, $this->value);
698
+        $textarea = new \XoopsFormTextDateSelect('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $size = 15, $this->value);
699 699
 
700 700
         return $textarea;
701 701
     }
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function newField($name = '')
709 709
     {
710
-        $textarea = new \XoopsFormTextDateSelect('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $size = 15, $this->defaultvalue);
710
+        $textarea = new \XoopsFormTextDateSelect('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $size = 15, $this->defaultvalue);
711 711
 
712 712
         return $textarea;
713 713
     }
@@ -734,17 +734,17 @@  discard block
 block discarded – undo
734 734
     {
735 735
         $this->fieldnumber  = $parentObject->getId();
736 736
         $this->fieldname    = $parentObject->fieldname;
737
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
737
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
738 738
         $this->defaultvalue = $parentObject->defaultvalue;
739 739
         $this->lookuptable  = $parentObject->lookuptable;
740 740
         if ('1' == $this->lookuptable) {
741
-            new SystemMessage('No lookuptable may be specified for userfield' . $this->fieldnumber);
741
+            new SystemMessage('No lookuptable may be specified for userfield'.$this->fieldnumber);
742 742
         }
743 743
         if ('1' == $parentObject->ViewInAdvanced) {
744
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be shown in advanced info');
744
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be shown in advanced info');
745 745
         }
746 746
         if ('1' == $parentObject->ViewInPie) {
747
-            new SystemMessage('A Pie-chart cannot be specified for userfield' . $this->fieldnumber);
747
+            new SystemMessage('A Pie-chart cannot be specified for userfield'.$this->fieldnumber);
748 748
         }
749 749
     }
750 750
 
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      */
754 754
     public function editField()
755 755
     {
756
-        $textbox = new \XoopsFormText('<b>' . $this->fieldname . '</b>', 'user' . $this->fieldnumber, $size = 50, $maxsize = 255, $value = $this->value);
756
+        $textbox = new \XoopsFormText('<b>'.$this->fieldname.'</b>', 'user'.$this->fieldnumber, $size = 50, $maxsize = 255, $value = $this->value);
757 757
 
758 758
         return $textbox;
759 759
     }
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
      */
766 766
     public function newField($name = '')
767 767
     {
768
-        $textbox = new \XoopsFormText('<b>' . $this->fieldname . '</b>', $name . 'user' . $this->fieldnumber, $size = 50, $maxsize = 255, $value = $this->defaultvalue);
768
+        $textbox = new \XoopsFormText('<b>'.$this->fieldname.'</b>', $name.'user'.$this->fieldnumber, $size = 50, $maxsize = 255, $value = $this->defaultvalue);
769 769
 
770 770
         return $textbox;
771 771
     }
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
      */
776 776
     public function viewField()
777 777
     {
778
-        $view = new \XoopsFormLabel($this->fieldname, '<a href="' . $this->value . '" target=\"_new\">' . $this->value . '</a>');
778
+        $view = new \XoopsFormLabel($this->fieldname, '<a href="'.$this->value.'" target=\"_new\">'.$this->value.'</a>');
779 779
 
780 780
         return $view;
781 781
     }
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
      */
786 786
     public function showField()
787 787
     {
788
-        return $this->fieldname . ' : <a href="' . $this->value . '" target="_new">' . $this->value . '</a>';
788
+        return $this->fieldname.' : <a href="'.$this->value.'" target="_new">'.$this->value.'</a>';
789 789
     }
790 790
 
791 791
     /**
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
      */
794 794
     public function showValue()
795 795
     {
796
-        return '<a href="' . $this->value . '" target="_new">' . $this->value . '</a>';
796
+        return '<a href="'.$this->value.'" target="_new">'.$this->value.'</a>';
797 797
     }
798 798
 
799 799
     /**
@@ -818,23 +818,23 @@  discard block
 block discarded – undo
818 818
     {
819 819
         $this->fieldnumber  = $parentObject->getId();
820 820
         $this->fieldname    = $parentObject->fieldname;
821
-        $this->value        = $animalObject->{'user' . $this->fieldnumber};
821
+        $this->value        = $animalObject->{'user'.$this->fieldnumber};
822 822
         $this->defaultvalue = $parentObject->defaultvalue;
823 823
         $this->lookuptable  = $parentObject->lookuptable;
824 824
         if ('1' == $this->lookuptable) {
825
-            new SystemMessage('No lookuptable may be specified for userfield' . $this->fieldnumber);
825
+            new SystemMessage('No lookuptable may be specified for userfield'.$this->fieldnumber);
826 826
         }
827 827
         if ('1' == $parentObject->ViewInAdvanced) {
828
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be shown in advanced info');
828
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be shown in advanced info');
829 829
         }
830 830
         if ('1' == $parentObject->ViewInPie) {
831
-            new SystemMessage('A Pie-chart cannot be specified for userfield' . $this->fieldnumber);
831
+            new SystemMessage('A Pie-chart cannot be specified for userfield'.$this->fieldnumber);
832 832
         }
833 833
         if ('1' == $parentObject->ViewInList) {
834
-            new SystemMessage('userfield' . $this->fieldnumber . ' cannot be included in listview');
834
+            new SystemMessage('userfield'.$this->fieldnumber.' cannot be included in listview');
835 835
         }
836 836
         if ('1' == $parentObject->HasSearch) {
837
-            new SystemMessage('Search cannot be defined for userfield' . $this->fieldnumber);
837
+            new SystemMessage('Search cannot be defined for userfield'.$this->fieldnumber);
838 838
         }
839 839
     }
840 840
 
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
      */
844 844
     public function editField()
845 845
     {
846
-        $pictureField = new \XoopsFormFile($this->fieldname, 'user' . $this->fieldnumber, 1024000);
846
+        $pictureField = new \XoopsFormFile($this->fieldname, 'user'.$this->fieldnumber, 1024000);
847 847
         $pictureField->setExtra("size ='50'");
848 848
 
849 849
         return $pictureField;
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
      */
857 857
     public function newField($name = '')
858 858
     {
859
-        $pictureField = new \XoopsFormFile($this->fieldname, $name . 'user' . $this->fieldnumber, 1024000);
859
+        $pictureField = new \XoopsFormFile($this->fieldname, $name.'user'.$this->fieldnumber, 1024000);
860 860
         $pictureField->setExtra("size ='50'");
861 861
 
862 862
         return $pictureField;
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
      */
868 868
     public function viewField()
869 869
     {
870
-        $view = new \XoopsFormLabel($this->fieldname, '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_400.jpeg">');
870
+        $view = new \XoopsFormLabel($this->fieldname, '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_400.jpeg">');
871 871
 
872 872
         return $view;
873 873
     }
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
      */
878 878
     public function showField()
879 879
     {
880
-        return '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_150.jpeg">';
880
+        return '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_150.jpeg">';
881 881
     }
882 882
 
883 883
     /**
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
      */
886 886
     public function showValue()
887 887
     {
888
-        return '<img src="' . PEDIGREE_UPLOAD_URL . '/images/thumbnails/' . $this->value . '_400.jpeg">';
888
+        return '<img src="'.PEDIGREE_UPLOAD_URL.'/images/thumbnails/'.$this->value.'_400.jpeg">';
889 889
     }
890 890
 }
891 891
 
Please login to merge, or discard this patch.
include/config.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,25 +23,25 @@  discard block
 block discarded – undo
23 23
     $moduleDirName      = basename(dirname(__DIR__));
24 24
     $moduleDirNameUpper = strtoupper($moduleDirName);
25 25
     return (object)[
26
-        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
26
+        'name'           => strtoupper($moduleDirName).' Module Configurator',
27 27
         'paths'          => [
28 28
             'dirname'    => $moduleDirName,
29
-            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
30
-            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
31
-            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
32
-            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
33
-            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
29
+            'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
30
+            'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
31
+            'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
32
+            'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
33
+            'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
34 34
         ],
35 35
         'uploadFolders'  => [
36
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
37
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/images',
38
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/images/thumbnails',
36
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
37
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/images',
38
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/images/thumbnails',
39 39
             //XOOPS_UPLOAD_PATH . '/flags'
40 40
         ],
41 41
         'copyBlankFiles' => [
42
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
43
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/images',
44
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/images/thumbnails'
42
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
43
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/images',
44
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/images/thumbnails'
45 45
             //XOOPS_UPLOAD_PATH . '/flags'
46 46
         ],
47 47
 
@@ -76,6 +76,6 @@  discard block
 block discarded – undo
76 76
             '/images',
77 77
         ],
78 78
         'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
79
-                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
79
+                     <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>',
80 80
     ];
81 81
 }
Please login to merge, or discard this patch.