Completed
Branch master (7d3f82)
by Thomas
09:15
created
htdocs/restorecaches.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -675,7 +675,7 @@
 block discarded – undo
675 675
  * @param $admins
676 676
  * @param $wp_oc
677 677
  * @param $r
678
- * @param $field
678
+ * @param string $field
679 679
  * @param $oldvalue
680 680
  * @param $newvalue
681 681
  */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1011,7 +1011,7 @@
 block discarded – undo
1011 1011
                             }
1012 1012
                             $logs_restored = true;
1013 1013
                         }
1014
-                       // if it was not already restored by a later restore operation ...
1014
+                        // if it was not already restored by a later restore operation ...
1015 1015
                     } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) {
1016 1016
                         // id, uuid, date_created and last_modified are set automatically;
1017 1017
                         // picture will be updated automatically on picture-restore
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN " . $cachelist);
368 368
     while ($r = sql_fetch_assoc($rs)) {
369 369
         $nextcd[$r['wp_oc']] = $r;
370
-        $user_id = $r['user_id'];     // is used later for logs
370
+        $user_id = $r['user_id']; // is used later for logs
371 371
     }
372 372
     sql_free_result($rs);
373 373
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     $rs = sql(
467 467
         "SELECT * FROM `caches_attributes_modified`
468 468
         WHERE `cache_id` IN " . $cachelist . "  /* OConly attrib is shown, but not restorable */
469
-        ORDER BY `date_modified` ASC");   // order doesn't matter as long it is date only
469
+        ORDER BY `date_modified` ASC"); // order doesn't matter as long it is date only
470 470
     while ($r = sql_fetch_assoc($rs)) {
471 471
         append_data(
472 472
             $data,
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
     $rs = sql(
621 621
         "SELECT *, " . $piccacheid . "AS `cache_id` FROM `pictures_modified`
622 622
         WHERE " . $piccacheid . " IN " . $cachelist . "
623
-        ORDER BY `date_modified` ASC");  // order is relevant for the case of restore-reverts
623
+        ORDER BY `date_modified` ASC"); // order is relevant for the case of restore-reverts
624 624
     while ($r = sql_fetch_assoc($rs)) {
625 625
         $r['date_modified'] = substr($r['date_modified'], 0, 10);
626 626
         switch ($r['operation']) {
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 {
725 725
     global $opt, $login;
726 726
 
727
-    sql("SET @restoredby='&1'", $login->userid);         // is evaluated by trigger functions
727
+    sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions
728 728
     sql_slave("SET @restoredby='&1'", $login->userid);
729 729
 
730 730
     $restored = array();
@@ -1016,7 +1016,7 @@  discard block
 block discarded – undo
1016 1016
                         // id, uuid, date_created and last_modified are set automatically;
1017 1017
                         // picture will be updated automatically on picture-restore
1018 1018
                         $log = new cachelog();
1019
-                        $log->setNode($r['node']);  // cachelog class currently does not initialize node field
1019
+                        $log->setNode($r['node']); // cachelog class currently does not initialize node field
1020 1020
                         $log->setCacheId($r['cache_id']);
1021 1021
                         $log->setUserId($r['user_id']);
1022 1022
                         $log->setType($r['type'], true);
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
                 }  // not already processed
1069 1069
 
1070 1070
                 if ($error != "") {
1071
-                    $restored[$wp]['internal error - could not $error log ' + $r['id'] + "/" + $logid];
1071
+                    $restored[$wp]['internal error - could not $error log ' +$r['id'] + "/" +$logid];
1072 1072
                 }
1073 1073
                 if ($logs_restored) {
1074 1074
                     $restored[$wp]['logs'] = true;
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
                 }  // not already processed
1203 1203
 
1204 1204
                 if ($error != "") {
1205
-                    $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" + $picid] = true;
1205
+                    $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" +$picid] = true;
1206 1206
                 }
1207 1207
                 if ($pics_restored) {
1208 1208
                     $restored[$wp]['pictures'] = true;
Please login to merge, or discard this patch.
htdocs/search.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -1461,6 +1461,10 @@
 block discarded – undo
1461 1461
         }
1462 1462
 
1463 1463
         // helper function for output modules
1464
+
1465
+        /**
1466
+         * @param string $str
1467
+         */
1464 1468
         function append_output($str)
1465 1469
         {
1466 1470
             global $db, $content, $bUseZip;
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     }
129 129
 }
130 130
 
131
-$queryid += 0;  // safety measure: force $queryid to be numeric
131
+$queryid += 0; // safety measure: force $queryid to be numeric
132 132
 
133 133
 
134 134
 //=========================================================
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     if (sql_num_rows($query_rs) == 0) {
150 150
         // can happen if logged out after query was created (fix for RT #3915)
151 151
         $queryid = 0;
152
-        goto newquery;  // goto needs PHP 5.3
152
+        goto newquery; // goto needs PHP 5.3
153 153
         /*
154 154
         $tpl->error($error_query_not_found);
155 155
         */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         // get findername from finderid
188
-        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0;  // Ocprop
188
+        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop
189 189
         if (isset($options['finder']) && $options['finderid'] > 0) {
190 190
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']);
191 191
             if (sql_num_rows($rs_name) == 1) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         }
198 198
 
199 199
         // get ownername from ownerid
200
-        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0;  // Ocprop
200
+        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop
201 201
         if (isset($options['owner']) && $options['ownerid'] > 0) {
202 202
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']);
203 203
             if (sql_num_rows($rs_name) == 1) {
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
     }
227 227
 
228 228
     // get the search options parameters and store them in the queries table (to view "the next page")
229
-    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0;  // Ocprop
230
-    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0;  // Ocprop
229
+    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0; // Ocprop
230
+    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0; // Ocprop
231 231
     $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? $_REQUEST['f_disabled'] : 0;
232
-    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1;  // Ocprop
232
+    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1; // Ocprop
233 233
     // f_inactive formerly was used for both, archived and disabled caches.
234 234
     // After adding the separate f_disabled option, it is used only for archived
235 235
     // caches, but keeps its name for compatibility with existing stored or
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
     $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? $_REQUEST['f_ignored'] : 1;
238 238
     $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? $_REQUEST['f_otherPlatforms'] : 0;
239 239
     $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? $_REQUEST['f_geokrets'] : 0;
240
-    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0;  // Ocprop: 0
240
+    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0; // Ocprop: 0
241 241
     $options['showresult'] = isset($_REQUEST['showresult']) ? $_REQUEST['showresult'] : 0;
242
-    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML';  // Ocprop: HTML
242
+    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
243 243
     $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
244 244
 
245 245
     if (isset($_REQUEST['cache_attribs'])) {
246 246
         if ($_REQUEST['cache_attribs'] != '') {
247 247
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs']);
248
-            for ($i = 0; $i < count($aAttribs); $i ++) {
248
+            for ($i = 0; $i < count($aAttribs); $i++) {
249 249
                 $options['cache_attribs'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
250 250
             }
251 251
             unset($aAttribs);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     if (isset($_REQUEST['cache_attribs_not'])) {
260 260
         if ($_REQUEST['cache_attribs_not'] != '') {
261 261
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs_not']);
262
-            for ($i = 0; $i < count($aAttribs); $i ++) {
262
+            for ($i = 0; $i < count($aAttribs); $i++) {
263 263
                 $options['cache_attribs_not'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
264 264
             }
265 265
             unset($aAttribs);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
         $options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0;
299 299
         $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
300
-        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7';  // Ocprop
300
+        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
301 301
     } elseif (isset($_REQUEST['searchbyortplz'])) {
302 302
         $onlydigits = is_numeric($_REQUEST['ortplz']);
303 303
         if ($onlydigits == true) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         if (!$list->allowView($password)) {
364 364
             $tpl->redirect("cachelists.php");
365 365
         }
366
-        $options['cachelist'] = cachelist::getListById($options['listid']);  // null for invalid ID
366
+        $options['cachelist'] = cachelist::getListById($options['listid']); // null for invalid ID
367 367
         $options['cachelist_pw'] = $password;
368 368
     } elseif (isset($_REQUEST['searchall'])) {
369 369
         if (!$login->logged_in() &&
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
                                 }
641 641
                                 $sqlhashes .= '`gns_search`.`simplehash`=' . sprintf("%u", crc32($searchstring));
642 642
 
643
-                                $wordscount ++;
643
+                                $wordscount++;
644 644
                             }
645 645
                         }
646 646
 
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
                 $sql_where[] = '`s' . $n . '`.`hash`=\'' . sql_escape($h) . '\'';
991 991
                 $sql_where[] = '`s' . $n . '`.`object_type` IN (' . implode(',', $ft_types) . ')';
992 992
 
993
-                $n ++;
993
+                $n++;
994 994
             }
995 995
 
996 996
             $sqlFilter =
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         if ($options['cachetype'] != '') {
1149 1149
             $types = explode(';', $options['cachetype']);
1150 1150
             if (count($types) < sql_value_slave("SELECT COUNT(*) FROM `cache_type`", 0)) {
1151
-                for ($i = 0; $i < count($types); $i ++) {
1151
+                for ($i = 0; $i < count($types); $i++) {
1152 1152
                     $types[$i] = "'" . sql_escape($types[$i]) . "'";
1153 1153
                 }
1154 1154
                 $sql_where[] = '`caches`.`type` IN (' . implode(',', $types) . ')';
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
         if ($options['cachesize'] != '') {
1159 1159
             $sizes = explode(';', $options['cachesize']);
1160 1160
             if (count($sizes) < sql_value_slave("SELECT COUNT(*) FROM `cache_size`", 0)) {
1161
-                for ($i = 0; $i < count($sizes); $i ++) {
1161
+                for ($i = 0; $i < count($sizes); $i++) {
1162 1162
                     $sizes[$i] = "'" . sql_escape($sizes[$i]) . "'";
1163 1163
                 }
1164 1164
                 $sql_where[] = '`caches`.`size` IN (' . implode(',', $sizes) . ')';
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
     //  X6. load output module and output-dependent options
1244 1244
     //=================================================================
1245 1245
 
1246
-    $output_module = mb_strtolower($options['output']);  // Ocprop: HTML, gpx
1246
+    $output_module = mb_strtolower($options['output']); // Ocprop: HTML, gpx
1247 1247
 
1248 1248
     $map2_bounds = ($output_module == 'map2bounds');
1249 1249
     if ($map2_bounds) {
@@ -1785,9 +1785,9 @@  discard block
 block discarded – undo
1785 1785
     }
1786 1786
     $tpl->assign('ortplz', $ortplz);
1787 1787
     if ($options['searchtype'] == 'byplz') {
1788
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz');  // Ocprop
1788
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz'); // Ocprop
1789 1789
     } elseif ($options['searchtype'] == 'byort') {
1790
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byort');  // Ocprop
1790
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byort'); // Ocprop
1791 1791
     } else {
1792 1792
         $dByOrtPlzChecked = false;
1793 1793
     }
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2023 2023
 
2024 2024
             $group_line .= $line;
2025
-            $nLineAttrCount2 ++;
2025
+            $nLineAttrCount2++;
2026 2026
         }
2027 2027
         sql_free_result($rs);
2028 2028
 
@@ -2133,7 +2133,7 @@  discard block
 block discarded – undo
2133 2133
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2134 2134
 
2135 2135
             $group_line .= $line;
2136
-            $nLineAttrCount1 ++;
2136
+            $nLineAttrCount1++;
2137 2137
         }
2138 2138
         sql_free_result($rs);
2139 2139
 
@@ -2278,7 +2278,7 @@  discard block
 block discarded – undo
2278 2278
 
2279 2279
 function outputUniidSelectionForm($uniSql, $options)
2280 2280
 {
2281
-    global $tpl;  // settings
2281
+    global $tpl; // settings
2282 2282
     global $locline, $secondlocationname;
2283 2283
 
2284 2284
     $urlparamString = prepareLocSelectionForm($options);
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
         $thislocation = mb_ereg_replace('{locid}', urlencode($r['uni_id']), $thislocation);
2389 2389
         $thislocation = mb_ereg_replace('{nr}', $nr, $thislocation);
2390 2390
 
2391
-        $nr ++;
2391
+        $nr++;
2392 2392
         $locations .= $thislocation . "\n";
2393 2393
     }
2394 2394
     sql_free_result($rs);
@@ -2481,7 +2481,7 @@  discard block
 block discarded – undo
2481 2481
             $thislocation = mb_ereg_replace('{bgcolor}', $bgcolor2, $thislocation);
2482 2482
         }
2483 2483
 
2484
-        $nr ++;
2484
+        $nr++;
2485 2485
         $locations .= $thislocation . "\n";
2486 2486
     }
2487 2487
 
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/ChildWp/ControllerChildWp.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@  discard block
 block discarded – undo
28 28
         $this->translator = $this->initTranslator($translator);
29 29
     }
30 30
 
31
+    /**
32
+     * @param boolean $request
33
+     */
31 34
     private function initRequest($request)
32 35
     {
33 36
         if ($request) {
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         return new RequestHttp();
38 41
     }
39 42
 
43
+    /**
44
+     * @param boolean $translator
45
+     */
40 46
     private function initTranslator($translator)
41 47
     {
42 48
         if ($translator) {
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/ChildWp/PresenterChildWp.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -54,6 +54,9 @@  discard block
 block discarded – undo
54 54
         $this->onDoSubmit($this->coordinate->getCoordinate(), $this->getDesc());
55 55
     }
56 56
 
57
+    /**
58
+     * @param \Oc\Libse\Coordinate\CoordinateCoordinate $coordinate
59
+     */
57 60
     abstract protected function onDoSubmit($coordinate, $description);
58 61
 
59 62
     protected function getType()
@@ -74,6 +77,9 @@  discard block
 block discarded – undo
74 77
         $this->typeImages = $childWpHandler->getChildNamesAndImages();
75 78
     }
76 79
 
80
+    /**
81
+     * @param \Oc\Libse\Coordinate\CoordinateCoordinate $coords
82
+     */
77 83
     public function initCoordinate($coords)
78 84
     {
79 85
         $this->coordinate->init($coords->latitude(), $coords->longitude());
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Coordinate/PresenterCoordinate.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@  discard block
 block discarded – undo
35 35
         $this->init(0, 0);
36 36
     }
37 37
 
38
+    /**
39
+     * @param boolean $request
40
+     */
38 41
     private function initRequest($request)
39 42
     {
40 43
         if ($request) {
@@ -44,6 +47,9 @@  discard block
 block discarded – undo
44 47
         return new RequestHttp();
45 48
     }
46 49
 
50
+    /**
51
+     * @param boolean $translator
52
+     */
47 53
     private function initTranslator($translator)
48 54
     {
49 55
         if ($translator) {
Please login to merge, or discard this patch.
htdocs/src/Oc/SmartyPlugins/prefilter.t.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -84,6 +84,11 @@  discard block
 block discarded – undo
84 84
 /* $block ... {t[ a=$a|nbsp b="a" ...]}
85 85
  *
86 86
  */
87
+/**
88
+ * @param string $block
89
+ * @param string $message
90
+ * @param integer $line
91
+ */
87 92
 function smarty_prefilter_t_process_block($block, $message, &$smarty, $line)
88 93
 {
89 94
     if ($message != '') {
@@ -252,6 +257,9 @@  discard block
 block discarded – undo
252 257
     return $attrs;
253 258
 }
254 259
 
260
+/**
261
+ * @param string[] $needles
262
+ */
255 263
 function smarty_prefilter_t_strpos_multi($haystack, $needles)
256 264
 {
257 265
     $arg = func_get_args();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@
 block discarded – undo
304 304
             $trans = mb_ereg_replace('%' . $number, $smarty->left_delimiter . $attr . $smarty->right_delimiter, $trans);
305 305
         }
306 306
 
307
-        $number ++;
307
+        $number++;
308 308
     }
309 309
 
310 310
     return $trans;
Please login to merge, or discard this patch.
htdocs/translate.php 3 patches
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -245,6 +245,9 @@  discard block
 block discarded – undo
245 245
 /* $truncatLastInsert = true   for downloaded file
246 246
  * $truncatLastInsert = false  to sign self generated file (in function export)
247 247
  */
248
+/**
249
+ * @param boolean $truncateLastInsert
250
+ */
248 251
 function calcDataSqlChecksum($truncateLastInsert)
249 252
 {
250 253
     global $opt;
@@ -390,6 +393,10 @@  discard block
 block discarded – undo
390 393
     $tpl->redirect('translate.php?translang=' . $translang);
391 394
 }
392 395
 
396
+/**
397
+ * @param string $relbasedir
398
+ * @param string $ext
399
+ */
393 400
 function unlinkFiles($relbasedir, $ext)
394 401
 {
395 402
     global $opt;
@@ -481,6 +488,9 @@  discard block
 block discarded – undo
481 488
     $tpl->redirect('translate.php?translang=' . $translang);
482 489
 }
483 490
 
491
+/**
492
+ * @param integer $freeId
493
+ */
484 494
 function useId($freeId)
485 495
 {
486 496
     $lastId = sql_value("SELECT MAX(`id`) FROM `sys_trans`", 0);
@@ -490,6 +500,9 @@  discard block
 block discarded – undo
490 500
     setId($lastId, $freeId);
491 501
 }
492 502
 
503
+/**
504
+ * @param integer $oldId
505
+ */
493 506
 function setId($oldId, $newId)
494 507
 {
495 508
     global $transIdCols;
@@ -568,6 +581,9 @@  discard block
 block discarded – undo
568 581
     $tpl->redirect('translate.php?translang=' . $translang);
569 582
 }
570 583
 
584
+/**
585
+ * @param string $dir
586
+ */
571 587
 function enumSqlFiles($dir)
572 588
 {
573 589
     $retval = [];
Please login to merge, or discard this patch.
Switch Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -86,69 +86,69 @@  discard block
 block discarded – undo
86 86
 }
87 87
 
88 88
 switch ($action) {
89
-    case 'selectlang':
90
-        break;
89
+        case 'selectlang':
90
+            break;
91 91
 
92
-    case 'verify':
93
-        verify();
94
-        break;
92
+        case 'verify':
93
+            verify();
94
+            break;
95 95
 
96
-    case 'resetids':
97
-        resetIds();
98
-        break;
96
+        case 'resetids':
97
+            resetIds();
98
+            break;
99 99
 
100
-    case 'clearcache':
101
-        clearCache();
102
-        break;
100
+        case 'clearcache':
101
+            clearCache();
102
+            break;
103 103
 
104
-    case 'export':
105
-        export();
106
-        break;
104
+        case 'export':
105
+            export();
106
+            break;
107 107
 
108
-    case 'xmlexport':
109
-        xmlexport();
110
-        break;
108
+        case 'xmlexport':
109
+            xmlexport();
110
+            break;
111 111
 
112
-    case 'xmlimport':
113
-        break;
112
+        case 'xmlimport':
113
+            break;
114 114
 
115
-    case 'xmlimport2':
116
-        xmlimport2();
117
-        break;
115
+        case 'xmlimport2':
116
+            xmlimport2();
117
+            break;
118 118
 
119
-    case 'xmlimport3':
120
-        xmlimport3();
121
-        break;
119
+        case 'xmlimport3':
120
+            xmlimport3();
121
+            break;
122 122
 
123
-    case 'textexportnew':
124
-        textexport($translang, false);
125
-        break;
123
+        case 'textexportnew':
124
+            textexport($translang, false);
125
+            break;
126 126
 
127
-    case 'textexportall':
128
-        textexport($translang, true);
129
-        break;
127
+        case 'textexportall':
128
+            textexport($translang, true);
129
+            break;
130 130
 
131
-    case 'textimport':
132
-        break;
131
+        case 'textimport':
132
+            break;
133 133
 
134
-    case 'textimport2':
135
-        textimport($translang);
136
-        break;
134
+        case 'textimport2':
135
+            textimport($translang);
136
+            break;
137 137
 
138
-    case 'edit':
139
-        if (!$access->mayTranslate($translang)) {
140
-            $tpl->error(ERROR_NO_ACCESS);
141
-        }
142
-        edit();
143
-        break;
138
+        case 'edit':
139
+            if (!$access->mayTranslate($translang)) {
140
+                $tpl->error(ERROR_NO_ACCESS);
141
+            }
142
+            edit();
143
+            break;
144 144
 
145
-    case 'copy_en':
146
-        copy_english_texts();
147
-        break;
145
+        case 'copy_en':
146
+            copy_english_texts();
147
+            break;
148 148
 
149
-    case 'listfaults':
150
-        $trans = sql(
151
-            "SELECT
149
+        case 'listfaults':
150
+            $trans = sql(
151
+                "SELECT
152 152
                 `sys_trans`.`id`,
153 153
                 `sys_trans`.`text`
154 154
              FROM `sys_trans`
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
157 157
              WHERE ISNULL(`sys_trans_ref`.`trans_id`)
158 158
              ORDER BY `sys_trans`.`id` DESC"
159
-        );
160
-        $tpl->assign_rs('trans', $trans);
161
-        sql_free_result($trans);
162
-        break;
159
+            );
160
+            $tpl->assign_rs('trans', $trans);
161
+            sql_free_result($trans);
162
+            break;
163 163
 
164
-    case 'listall':
165
-        $trans = sql(
166
-            "SELECT
164
+        case 'listall':
165
+            $trans = sql(
166
+                "SELECT
167 167
                 `sys_trans`.`id`,
168 168
                 `sys_trans`.`text`,
169 169
                 `sys_trans_text`.`text` AS `trans`
@@ -172,48 +172,48 @@  discard block
 block discarded – undo
172 172
                 ON `sys_trans`.`id`=`sys_trans_text`.`trans_id`
173 173
                 AND `sys_trans_text`.`lang`='&1'
174 174
              ORDER BY `sys_trans`.`id` DESC",
175
-            $translang
176
-        );
177
-        $tpl->assign_rs('trans', $trans);
178
-        sql_free_result($trans);
179
-        break;
175
+                $translang
176
+            );
177
+            $tpl->assign_rs('trans', $trans);
178
+            sql_free_result($trans);
179
+            break;
180 180
 
181
-    case 'remove':
182
-        if (!$access->mayTranslate($translang)) {
183
-            $tpl->error(ERROR_NO_ACCESS);
184
-        }
185
-        remove();
186
-        break;
187
-
188
-    case 'scan':
189
-        scan();
190
-        break;
191
-
192
-    case 'scanstart':
193
-        scanStart();
194
-        break;
195
-
196
-    case 'scanfile':
197
-        $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
-        scanFile($filename);
199
-        exit;
200
-
201
-    case 'quicknone':
202
-        $cookie->un_set('translate_mode');
203
-        break;
204
-
205
-    case 'quicknew':
206
-        $cookie->set('translate_mode', 'new');
207
-        break;
208
-
209
-    case 'quickall':
210
-        $cookie->set('translate_mode', 'all');
211
-        break;
212
-
213
-    default:
214
-        $action = 'listnew';
215
-        $trans = sql(
216
-            "SELECT DISTINCT
181
+        case 'remove':
182
+            if (!$access->mayTranslate($translang)) {
183
+                $tpl->error(ERROR_NO_ACCESS);
184
+            }
185
+            remove();
186
+            break;
187
+
188
+        case 'scan':
189
+            scan();
190
+            break;
191
+
192
+        case 'scanstart':
193
+            scanStart();
194
+            break;
195
+
196
+        case 'scanfile':
197
+            $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
+            scanFile($filename);
199
+            exit;
200
+
201
+        case 'quicknone':
202
+            $cookie->un_set('translate_mode');
203
+            break;
204
+
205
+        case 'quicknew':
206
+            $cookie->set('translate_mode', 'new');
207
+            break;
208
+
209
+        case 'quickall':
210
+            $cookie->set('translate_mode', 'all');
211
+            break;
212
+
213
+        default:
214
+            $action = 'listnew';
215
+            $trans = sql(
216
+                "SELECT DISTINCT
217 217
                 `sys_trans`.`id`,
218 218
                 `sys_trans`.`text`
219 219
              FROM `sys_trans`
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
225 225
              WHERE ISNULL(`sys_trans_text`.`trans_id`) OR `sys_trans_text`.`text`=''
226 226
              ORDER BY `sys_trans`.`id` DESC",
227
-            $translang
228
-        );
229
-        $tpl->assign_rs('trans', $trans);
230
-        sql_free_result($trans);
227
+                $translang
228
+            );
229
+            $tpl->assign_rs('trans', $trans);
230
+            sql_free_result($trans);
231 231
 }
232 232
 
233 233
 $languages = [];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
         $writer->writeAttribute('id', $r['id']);
691 691
 
692 692
         $writer->writeElement('code', $r['text']);
693
-        for ($n = 0; $n < count($lang); $n ++) {
693
+        for ($n = 0; $n < count($lang); $n++) {
694 694
             $writer->writeElement(
695 695
                 $lang[$n],
696 696
                 sql_value(
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
 
819 819
     $nCount = isset($_REQUEST['count']) ? $_REQUEST['count'] + 0 : 0;
820 820
 
821
-    for ($nIndex = 1; $nIndex <= $nCount; $nIndex ++) {
821
+    for ($nIndex = 1; $nIndex <= $nCount; $nIndex++) {
822 822
         if (isset($_REQUEST['useitem' . $nIndex]) && ($_REQUEST['useitem' . $nIndex] == '1')) {
823 823
             $sCode = base64_decode($_REQUEST['code' . $nIndex]);
824 824
             $transId = sql_value("SELECT `id` FROM `sys_trans` WHERE `text`='&1'", 0, $sCode);
Please login to merge, or discard this patch.
htdocs/util/notification/run_notify.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -197,6 +197,9 @@
 block discarded – undo
197 197
     return 0;
198 198
 }
199 199
 
200
+/**
201
+ * @param string $domain
202
+ */
200 203
 function is_existent_maildomain($domain)
201 204
 {
202 205
     $smtp_serverlist = [];
Please login to merge, or discard this patch.
htdocs/util/watchlist/runwatch.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -484,6 +484,9 @@  discard block
 block discarded – undo
484 484
     );
485 485
 }
486 486
 
487
+/**
488
+ * @param string $watchtext
489
+ */
487 490
 function insert_maintenance_flags($rLog, $language, $watchtext)
488 491
 {
489 492
     global $translate;
@@ -510,6 +513,9 @@  discard block
 block discarded – undo
510 513
     return mb_ereg_replace('{maintenance_flags}', $flagtext, $watchtext);
511 514
 }
512 515
 
516
+/**
517
+ * @param string $domain
518
+ */
513 519
 function is_existent_maildomain($domain)
514 520
 {
515 521
     $smtp_serverlist = [];
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     WHERE cache_logs.cache_id=caches.cache_id
52 52
     AND cache_logs.owner_notified=0"
53 53
 );
54
-for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i ++) {
54
+for ($i = 0; $i < mysql_num_rows($rsNewLogs); $i++) {
55 55
     $rNewLog = sql_fetch_array($rsNewLogs);
56 56
 
57 57
     $rsNotified = sql(
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     WHERE `user`.`watchmail_nextmail`<NOW()",
135 135
     $opt['template']['default']['locale']
136 136
 );
137
-for ($i = 0; $i < mysql_num_rows($rsUsers); $i ++) {
137
+for ($i = 0; $i < mysql_num_rows($rsUsers); $i++) {
138 138
     $rUser = sql_fetch_array($rsUsers);
139 139
 
140 140
     if ($rUser['watchmail_nextmail'] != '0000-00-00 00:00:00') {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 );
159 159
                 if (mysql_num_rows($rsWatchesOwner) > 0) {
160 160
                     $logtexts = '';
161
-                    for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j ++) {
161
+                    for ($j = 0; $j < mysql_num_rows($rsWatchesOwner); $j++) {
162 162
                         $rWatch = sql_fetch_array($rsWatchesOwner);
163 163
                         $logtexts .= $rWatch['watchtext'];
164 164
                     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 );
184 184
                 if (mysql_num_rows($rsWatchesLog) > 0) {
185 185
                     $logtexts = '';
186
-                    for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j ++) {
186
+                    for ($j = 0; $j < mysql_num_rows($rsWatchesLog); $j++) {
187 187
                         $rWatch = sql_fetch_array($rsWatchesLog);
188 188
                         $logtexts .= $rWatch['watchtext'];
189 189
                     }
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
         $pid_daemon = fgets($pidfile, 20);
584 584
         fclose($pidfile);
585 585
 
586
-        $pid_daemon = (int) $pid_daemon;
586
+        $pid_daemon = (int)$pid_daemon;
587 587
 
588 588
         // process running?
589 589
         if (posix_kill($pid_daemon, 0)) {
Please login to merge, or discard this patch.