Completed
Branch master (7d3f82)
by Thomas
09:15
created
htdocs/util2/cron/modules/sitemaps.class.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
         $this->ping_searchengine('http://www.bing.com/webmaster/ping.aspx?siteMap=' . $url);
62 62
     }
63 63
 
64
+    /**
65
+     * @param string $url
66
+     */
64 67
     public function ping_searchengine($url)
65 68
     {
66 69
         $curl = curl_init($url);
Please login to merge, or discard this patch.
htdocs/xml/ocxml11.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -368,6 +368,9 @@
 block discarded – undo
368 368
 /* end parameter reading */
369 369
 
370 370
 
371
+/**
372
+ * @param integer $sessionid
373
+ */
371 374
 function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $ziptype)
372 375
 {
373 376
     global $zip_basedir, $zip_wwwdir, $sDateformat, $sDateshort, $t1, $t2, $t3, $safemode_zip, $safemode_zip, $sCharset, $bAttrlist;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 require_once __DIR__ . '/../lib2/const.inc.php';
22 22
 require_once __DIR__ . '/../lib2/logic/data-license.inc.php';
23 23
 require_once __DIR__ . '/../lib2/logic/npas.inc.php';
24
-require_once __DIR__ .' /../lib2/logic/geomath.class.php';
24
+require_once __DIR__ . ' /../lib2/logic/geomath.class.php';
25 25
 
26 26
 if ($error == true) {
27 27
     echo 'Unable to connect to database';
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
     $logtypes = [];
389 389
     $rs = sql('SELECT `id`, `de` FROM log_types');
390
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
390
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
391 391
         $r = sql_fetch_array($rs);
392 392
         $logtypes[$r['id']] = $r['de'];
393 393
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
     $cachetypes = [];
397 397
     $rs = sql('SELECT `id`, `short`, `de` FROM cache_type');
398
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
398
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
399 399
         $r = sql_fetch_array($rs);
400 400
         $cachetypes[$r['id']]['de'] = $r['de'];
401 401
         $cachetypes[$r['id']]['short'] = $r['short'];
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
     $cachestatus = [];
406 406
     $rs = sql('SELECT `id`, `de` FROM cache_status');
407
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
407
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
408 408
         $r = sql_fetch_array($rs);
409 409
         $cachestatus[$r['id']]['de'] = $r['de'];
410 410
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
     $counties = [];
414 414
     $rs = sql('SELECT `short`, `de` FROM countries');
415
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
415
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
416 416
         $r = sql_fetch_array($rs);
417 417
         $counties[$r['short']]['de'] = $r['de'];
418 418
     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
     $cachesizes = [];
422 422
     $rs = sql('SELECT `id`, `de` FROM cache_size');
423
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
423
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
424 424
         $r = sql_fetch_array($rs);
425 425
         $cachesizes[$r['id']]['de'] = $r['de'];
426 426
     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
     $languages = [];
430 430
     $rs = sql('SELECT `short`, `de` FROM languages');
431
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
431
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
432 432
         $r = sql_fetch_array($rs);
433 433
         $languages[$r['short']]['de'] = $r['de'];
434 434
     }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     $objecttypes['3'] = 'cachedesc';
440 440
     $objecttypes['1'] = 'cachelog';
441 441
     $objecttypes['6'] = 'picture';
442
-    $objecttypes['8'] = 'cachelist';    // not implemented yet
442
+    $objecttypes['8'] = 'cachelist'; // not implemented yet
443 443
 
444 444
     /* end now a few dynamically loaded constants */
445 445
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     while (file_exists(
453 453
         $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'
454 454
     )) {
455
-        $fileid ++;
455
+        $fileid++;
456 456
     }
457 457
 
458 458
     $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 //    echo $startat . ' ' . $endat . '<br><br>';
1301 1301
 //    echo '<table>';
1302 1302
 //    echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>';
1303
-    for ($i = 0; $i < 6; $i ++) {
1303
+    for ($i = 0; $i < 6; $i++) {
1304 1304
         if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) {
1305 1305
             if ($recordnr[$i + 1] - $startat > 500) {
1306 1306
                 $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500];
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
     $from[4] = '\'';
1423 1423
     $to[4] = '&apos;';
1424 1424
 
1425
-    for ($i = 0; $i <= 4; $i ++) {
1425
+    for ($i = 0; $i <= 4; $i++) {
1426 1426
         $str = mb_ereg_replace($from[$i], $to[$i], $str);
1427 1427
     }
1428 1428
 
@@ -1501,13 +1501,13 @@  discard block
 block discarded – undo
1501 1501
 
1502 1502
     $hDir = opendir($path);
1503 1503
     if ($hDir === false) {
1504
-        ++ $notunlinked;
1504
+        ++$notunlinked;
1505 1505
     } else {
1506 1506
         while (false !== ($file = readdir($hDir))) {
1507 1507
             if (($file != '.') && ($file != '..')) {
1508 1508
                 if (is_dir($path . $file)) {
1509 1509
                     if (unlinkrecursiv($path . $file . '/') == false) {
1510
-                        $notunlinked ++;
1510
+                        $notunlinked++;
1511 1511
                     }
1512 1512
                 } else {
1513 1513
                     if ((mb_substr($file, - 4) == '.zip') ||
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
                     ) {
1518 1518
                         @unlink($path . $file);
1519 1519
                     } else {
1520
-                        $notunlinked ++;
1520
+                        $notunlinked++;
1521 1521
                     }
1522 1522
                 }
1523 1523
             }
Please login to merge, or discard this patch.
local/devel/find_bad_encodings.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 
42
+/**
43
+ * @param string $path
44
+ */
42 45
 function test_encoding($path)
43 46
 {
44 47
     static $ur_exclude = [  // no unicode reminder needed
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 function test_encoding($path)
43 43
 {
44
-    static $ur_exclude = [  // no unicode reminder needed
44
+    static $ur_exclude = [// no unicode reminder needed
45 45
         'lang/de/ocstyle/search1/search.result.caches',
46 46
         'lib2/b2evo-captcha',
47 47
         'lib2/HTMLPurifier',
Please login to merge, or discard this patch.
local/devel/find_unicode_boms.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@
 block discarded – undo
39 39
 }
40 40
 
41 41
 
42
+/**
43
+ * @param string $path
44
+ */
42 45
 function testforbom($path)
43 46
 {
44 47
     $filestart = file_get_contents($path, false, null, 0, 2);
Please login to merge, or discard this patch.
local/ocxml11client/index.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -1281,11 +1281,19 @@
 block discarded – undo
1281 1281
     }
1282 1282
 }
1283 1283
 
1284
+/**
1285
+ * @param string $recordtype
1286
+ * @param string $info
1287
+ */
1284 1288
 function importError($recordtype, $uuid, $r, $info)
1285 1289
 {
1286 1290
     echo 'error: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
1287 1291
 }
1288 1292
 
1293
+/**
1294
+ * @param string $recordtype
1295
+ * @param string $info
1296
+ */
1289 1297
 function importWarn($recordtype, $uuid, $r, $info)
1290 1298
 {
1291 1299
     echo 'warn: ' . $recordtype . ' (' . $uuid . '): ' . $info . "\n";
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     $nFileNr = 0;
68 68
     $rs = sql('SELECT `id`, `url` FROM `pictures` WHERE `local`=0');
69 69
     while ($r = sql_fetch_array($rs)) {
70
-        $nFileNr ++;
70
+        $nFileNr++;
71 71
         $fileparts = mb_split('/', $r['url']);
72 72
         $filename = $fileparts[count($fileparts) - 1];
73 73
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             exit;
238 238
         }
239 239
 
240
-        for ($i = 1; $i <= $filescount; $i ++) {
240
+        for ($i = 1; $i <= $filescount; $i++) {
241 241
             echo "Download Paket: " . $i . ' von ' . $filescount . "\n";
242 242
 
243 243
             $fileurl = $opt['url_getsession'];
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
                             if ($sSubElement != '') {
412 412
                                 // vorheriges element zuerst schlißen
413 413
                                 $sSubElement = '';
414
-                                $nRecursionLevel --;
414
+                                $nRecursionLevel--;
415 415
                             }
416 416
 
417 417
                             $sSubElement = mb_strtoupper($xmlReader->name);
418
-                            $nRecursionLevel ++;
418
+                            $nRecursionLevel++;
419 419
 
420 420
                             // attribute auslesen
421 421
                             if ($xmlReader->moveToFirstAttribute()) {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                         } else {
433 433
                             if ($xmlReader->nodeType == XMLReader::END_ELEMENT) {
434 434
                                 $sSubElement = '';
435
-                                $nRecursionLevel --;
435
+                                $nRecursionLevel--;
436 436
                             }
437 437
                         }
438 438
                     }
Please login to merge, or discard this patch.
local/ocxml11client/xml2array.inc.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@
 block discarded – undo
26 26
         $this->stack_ref =& $this->stack[count($this->stack) - 1];
27 27
     }
28 28
 
29
+    /**
30
+     * @param false|string $strInputXML
31
+     */
29 32
     public function parse($strInputXML)
30 33
     {
31 34
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@
 block discarded – undo
16 16
 
17 17
     public function push_pos(&$pos)
18 18
     {
19
-        $this->stack[count($this->stack)] =& $pos;
20
-        $this->stack_ref =& $pos;
19
+        $this->stack[count($this->stack)] = & $pos;
20
+        $this->stack_ref = & $pos;
21 21
     }
22 22
 
23 23
     public function pop_pos()
24 24
     {
25 25
         unset($this->stack[count($this->stack) - 1]);
26
-        $this->stack_ref =& $this->stack[count($this->stack) - 1];
26
+        $this->stack_ref = & $this->stack[count($this->stack) - 1];
27 27
     }
28 28
 
29 29
     public function parse($strInputXML)
Please login to merge, or discard this patch.
sql/static-data/pwlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     while (!feof($pwf)) {
19 19
         $pw = fgets($pwf);
20 20
         sql("INSERT IGNORE INTO `pw_dict` (`pw`) VALUES ('&1')", trim($pw));
21
-        ++ $n;
21
+        ++$n;
22 22
     }
23 23
     fclose($pwf);
24 24
 
Please login to merge, or discard this patch.
htdocs/editdesc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     // check for old-style parameters
22 22
     if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
23 23
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
-        $desc_lang = $_REQUEST['desclang'];  // Ocprop
24
+        $cache_id = $_REQUEST['cacheid']; // Ocprop
25
+        $desc_lang = $_REQUEST['desclang']; // Ocprop
26 26
 
27 27
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
28 28
         if (mysql_num_rows($rs) == 1) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if (isset($_POST['post']))  // Ocprop
91 91
                 {
92 92
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
93
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop
94 94
 
95 95
                     // fuer alte Versionen von OCProp
96 96
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $oldDescMode = $descMode;
124 124
                     }
125 125
 
126
-                    $short_desc = $_POST['short_desc'];  // Ocprop
126
+                    $short_desc = $_POST['short_desc']; // Ocprop
127 127
                     $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8');
128 128
                     $desclang = $_POST['desclang'];
129 129
                     $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     }
139 139
 
140 140
                     // Text from textarea
141
-                    $desc = $_POST['desc'];  // Ocprop
141
+                    $desc = $_POST['desc']; // Ocprop
142 142
 
143 143
                     // fuer alte Versionen von OCProp
144 144
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                 tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8'));
298 298
                 tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8'));
299 299
                 tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8'));
300
-                tpl_set_var('reset', $reset);  // obsolete
300
+                tpl_set_var('reset', $reset); // obsolete
301 301
                 tpl_set_var('submit', $submit);
302 302
 
303 303
                 // Text / normal HTML / HTML editor
Please login to merge, or discard this patch.
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,9 +19,12 @@  discard block
 block discarded – undo
19 19
     require $stylepath . '/editdesc.inc.php';
20 20
 
21 21
     // check for old-style parameters
22
-    if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
22
+    if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) {
23
+        // Ocprop
23 24
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
+        $cache_id = $_REQUEST['cacheid'];
26
+    }
27
+    // Ocprop
25 28
         $desc_lang = $_REQUEST['desclang'];  // Ocprop
26 29
 
27 30
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
@@ -87,10 +90,13 @@  discard block
 block discarded – undo
87 90
                 $show_all_langs = false;
88 91
 
89 92
                 //save to DB?
90
-                if (isset($_POST['post']))  // Ocprop
93
+                if (isset($_POST['post'])) {
94
+                    // Ocprop
91 95
                 {
92 96
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
97
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;
98
+                }
99
+                // Ocprop
94 100
 
95 101
                     // fuer alte Versionen von OCProp
96 102
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -147,7 +153,8 @@  discard block
 block discarded – undo
147 153
 
148 154
                     $desc = processEditorInput($oldDescMode, $descMode, $desc);
149 155
 
150
-                    if (isset($_POST['submitform']))  // Ocprop
156
+                    if (isset($_POST['submitform'])) {
157
+                        // Ocprop
151 158
                     {
152 159
                         // prüfen, ob sprache nicht schon vorhanden
153 160
                         $rs = sql(
@@ -160,6 +167,7 @@  discard block
 block discarded – undo
160 167
                             $descid,
161 168
                             $desclang
162 169
                         );
170
+                    }
163 171
                         $r = sql_fetch_array($rs);
164 172
                         if ($r['count'] > 0) {
165 173
                             tpl_errorMsg('editdesc', $error_desc_exists);
@@ -224,8 +232,7 @@  discard block
 block discarded – undo
224 232
 
225 233
                     if ($oldDescMode == 0) {
226 234
                         $desc = processEditorInput($oldDescMode, $descMode, $desc_record['desc']);
227
-                    }
228
-                    else {
235
+                    } else {
229 236
                         $desc = $desc_record['desc'];
230 237
                     }
231 238
                 }
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Validator/RealValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
     protected function getMinValue()
24 24
     {
25
-        return - 1e38;
25
+        return -1e38;
26 26
     }
27 27
 
28 28
     protected function getMaxValue()
Please login to merge, or discard this patch.