Completed
Pull Request — master (#300)
by
unknown
07:10
created
htdocs/lib2/search/search.kml.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $kmlLine =
22 22
         '
23 23
 <Placemark>
24
-  <description><![CDATA[' . $t_by . ' {username}<br><br><a href="' . $opt['page']['default_absolute_url'] . 'viewcache.php?cacheid={cacheid}">' . $t_showdesc . '</a><br>&nbsp;<br><table cellspacing="0" cellpadding="0" border="0"><tr><td>{typeimgurl} </td><td>' . $t_type . ' {type}<br>' . $t_size . ' {size}</td></tr><tr><td colspan="2">' . $t_difficulty . '<br>' . $t_terrain . '</td></tr></table>]]></description>
24
+  <description><![CDATA[' . $t_by.' {username}<br><br><a href="'.$opt['page']['default_absolute_url'].'viewcache.php?cacheid={cacheid}">'.$t_showdesc.'</a><br>&nbsp;<br><table cellspacing="0" cellpadding="0" border="0"><tr><td>{typeimgurl} </td><td>'.$t_type.' {type}<br>'.$t_size.' {size}</td></tr><tr><td colspan="2">'.$t_difficulty.'<br>'.$t_terrain.'</td></tr></table>]]></description>
25 25
   <name>{name}{archivedflag}</name>
26 26
   <LookAt>
27 27
     <longitude>{lon}</longitude>
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
   <Point>
35 35
     <coordinates>{lon},{lat},0</coordinates>
36 36
   </Point>
37
-  <Snippet>D: {difficulty}/T: {terrain} {size}  ' . $t_by . ' {username}</Snippet>
37
+  <Snippet>D: {difficulty}/T: {terrain} {size}  ' . $t_by.' {username}</Snippet>
38 38
 </Placemark>
39 39
 ';
40 40
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     while ($r = sql_fetch_array($rs)) {
95 95
         $thisline = $kmlLine;
96
-        $typeimgurl = '<img src="{urlbase}resource2/' . $style . '/images/cacheicon/' . $r['icon_large'] . '" alt="' . $r['typedesc'] . '" title="' . $r['typedesc'] . '" />';
96
+        $typeimgurl = '<img src="{urlbase}resource2/'.$style.'/images/cacheicon/'.$r['icon_large'].'" alt="'.$r['typedesc'].'" title="'.$r['typedesc'].'" />';
97 97
 
98 98
         $thisline = mb_ereg_replace('{icon}', $r['kml_name'], $thisline);
99 99
         $thisline = mb_ereg_replace('{typeimgurl}', $typeimgurl, $thisline);
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
 
112 112
         if (($r['status'] == 2) || ($r['status'] == 3) || ($r['status'] == 6)) {
113 113
             if ($r['status'] == 2) {
114
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_temporarily_na . ')', $thisline);
114
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_temporarily_na.')', $thisline);
115 115
             } elseif ($r['status'] == 3) {
116
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_archived . ')', $thisline);
116
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_archived.')', $thisline);
117 117
             } else {
118
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_locked . ')', $thisline);
118
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_locked.')', $thisline);
119 119
             }
120 120
         } else {
121 121
             $thisline = mb_ereg_replace('{archivedflag}', '', $thisline);
Please login to merge, or discard this patch.
htdocs/lib2/search/search.loc.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     $server_domain = $opt['page']['domain'];
20 20
     $server_address = $opt['page']['default_absolute_url'];
21 21
 
22
-    $locHead = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><loc version="1.0" src="' . $server_domain . '">' . "\n";
22
+    $locHead = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><loc version="1.0" src="'.$server_domain.'">'."\n";
23 23
 
24 24
     $locLine =
25 25
         '
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     <name id="{waypoint}"><![CDATA[{archivedflag}{name} by {username}]]></name>
28 28
     <coord lat="{lat}" lon="{lon}"/>
29 29
     <type>Geocache</type>
30
-    <link text="Beschreibung">' . $server_address . 'viewcache.php?cacheid={cacheid}</link>
30
+    <link text="Beschreibung">' . $server_address.'viewcache.php?cacheid={cacheid}</link>
31 31
 </waypoint>
32 32
 ';
33 33
 
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
         if (($r['status'] == 2) || ($r['status'] == 3) || ($r['status'] == 6)) {
80 80
             if ($r['status'] == 2) {
81
-                $thisline = mb_ereg_replace('{archivedflag}', $state_temporarily_na . '!, ', $thisline);
81
+                $thisline = mb_ereg_replace('{archivedflag}', $state_temporarily_na.'!, ', $thisline);
82 82
             } elseif ($r['status'] == 3) {
83
-                $thisline = mb_ereg_replace('{archivedflag}', $state_archived . '!, ', $thisline);
83
+                $thisline = mb_ereg_replace('{archivedflag}', $state_archived.'!, ', $thisline);
84 84
             } else {
85
-                $thisline = mb_ereg_replace('{archivedflag}', $state_locked . '!, ', $thisline);
85
+                $thisline = mb_ereg_replace('{archivedflag}', $state_locked.'!, ', $thisline);
86 86
             }
87 87
         } else {
88 88
             $thisline = mb_ereg_replace('{archivedflag}', '', $thisline);
Please login to merge, or discard this patch.
htdocs/lib2/search/search.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
     }
157 157
 
158 158
     // doppelte chars ersetzen
159
-    for ($c = ord('a'); $c <= ord('z'); $c ++) {
160
-        $str = mb_ereg_replace(chr($c) . chr($c), chr($c), $str);
159
+    for ($c = ord('a'); $c <= ord('z'); $c++) {
160
+        $str = mb_ereg_replace(chr($c).chr($c), chr($c), $str);
161 161
     }
162 162
 
163 163
     return $str;
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 {
258 258
     global $opt;
259 259
 
260
-    $desclangs = ',' . $rCache['desc_languages'] . ',';
260
+    $desclangs = ','.$rCache['desc_languages'].',';
261 261
     $desclang = $rCache['desc_language'];
262 262
 
263
-    if (strpos($desclangs, ',' . $opt['template']['locale'] . ',') !== false) {
263
+    if (strpos($desclangs, ','.$opt['template']['locale'].',') !== false) {
264 264
         $desclang = $opt['template']['locale'];
265
-    } elseif (strpos($desclangs, ',' . $opt['template']['default']['locale'] . ',') !== false) {
265
+    } elseif (strpos($desclangs, ','.$opt['template']['default']['locale'].',') !== false) {
266 266
         $desclang = $opt['template']['default']['locale'];
267
-    } elseif (strpos($desclangs, ',' . $opt['template']['default']['fallback_locale'] . ',') !== false) {
267
+    } elseif (strpos($desclangs, ','.$opt['template']['default']['fallback_locale'].',') !== false) {
268 268
         $desclang = $opt['template']['default']['fallback_locale'];
269 269
     } elseif (strpos($desclangs, ',EN,') !== false) {
270 270
         $desclang = 'EN';
Please login to merge, or discard this patch.
htdocs/lib2/search/search.map2.inc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     $tpl->error(ERROR_INVALID_OPERATION);
13 13
 }
14 14
 
15
-$sqlchecksum = sprintf('%u', crc32($cachesFilter . "\n" . $sqlFilter));
15
+$sqlchecksum = sprintf('%u', crc32($cachesFilter."\n".$sqlFilter));
16 16
 
17 17
 // check if query was already executed within the cache period
18 18
 $rsMapCache = sql(
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 );
29 29
 if ($rMapCache = sql_fetch_assoc($rsMapCache)) {
30 30
     $resultId = $rMapCache['result_id'];
31
-    sql("UPDATE `map2_result` SET `shared_counter`=`shared_counter`+1 WHERE `result_id`='" . ($resultId + 0) . "'");
31
+    sql("UPDATE `map2_result` SET `shared_counter`=`shared_counter`+1 WHERE `result_id`='".($resultId + 0)."'");
32 32
 } else {
33 33
     // ensure that query is performed without errors before reserving the result_id
34 34
     sql_temp_table_slave('tmpmapresult');
35 35
     sql_slave("CREATE TEMPORARY TABLE &tmpmapresult (`cache_id` INT UNSIGNED NOT NULL, PRIMARY KEY (`cache_id`)) ENGINE=MEMORY");
36
-    sql_slave("INSERT INTO &tmpmapresult (`cache_id`) " . $sqlFilter);
36
+    sql_slave("INSERT INTO &tmpmapresult (`cache_id`) ".$sqlFilter);
37 37
 
38 38
     sql(
39 39
         "
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         VALUES ('&1', '&2', '&3', NOW(), NOW())",
42 42
         $db['slave_id'],
43 43
         $sqlchecksum,
44
-        $cachesFilter . "\n" . $sqlFilter
44
+        $cachesFilter."\n".$sqlFilter
45 45
     );
46 46
     $resultId = sql_insert_id();
47 47
 
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
             $rBounds['lon_min'] -= $halfwin;
75 75
             $rBounds['lon_max'] += $halfwin;
76 76
         }
77
-        $bounds_param = "&lat_min=" . round($rBounds['lat_min'], 5) . "&lat_max=" . round($rBounds['lat_max'], 5) . '&lon_min=' . round($rBounds['lon_min'], 5) . '&lon_max=' . round($rBounds['lon_max'], 5);
77
+        $bounds_param = "&lat_min=".round($rBounds['lat_min'], 5)."&lat_max=".round($rBounds['lat_max'], 5).'&lon_min='.round($rBounds['lon_min'], 5).'&lon_max='.round($rBounds['lon_max'], 5);
78 78
     }
79 79
     sql_free_result($rs);
80 80
 
81
-    $tpl->redirect('map2.php?queryid=' . $options['queryid'] . '&resultid=' . $resultId . $bounds_param);
81
+    $tpl->redirect('map2.php?queryid='.$options['queryid'].'&resultid='.$resultId.$bounds_param);
82 82
 } else {
83 83
     echo $resultId;
84 84
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,8 @@
 block discarded – undo
67 67
     if (($rBounds = sql_fetch_assoc($rs)) && $rBounds['lat_min'] !== null /* >0 caches */) {
68 68
         if ($rBounds['lat_min'] == $rBounds['lat_max'] &&
69 69
             $rBounds['lon_min'] == $rBounds['lon_max']
70
-        ) { // 1 Cache
70
+        ) {
71
+// 1 Cache
71 72
             $halfwin = 0.02;
72 73
             $rBounds['lat_min'] -= $halfwin;
73 74
             $rBounds['lat_max'] += $halfwin;
Please login to merge, or discard this patch.
htdocs/lib2/search/search.ovl.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * OVL search output for TOP25, TOP50 etc.
8 8
  ****************************************************************************/
9 9
 
10
-require_once $opt['rootpath'] . 'lib2/charset.inc.php';
10
+require_once $opt['rootpath'].'lib2/charset.inc.php';
11 11
 
12 12
 $search_output_file_download = true;
13 13
 $content_type_plain = 'application/ovl';
Please login to merge, or discard this patch.
htdocs/lib2/cli.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,30 +11,30 @@
 block discarded – undo
11 11
 {
12 12
     public function out($str)
13 13
     {
14
-        echo $str . "\n";
14
+        echo $str."\n";
15 15
     }
16 16
 
17 17
     public function debug($str)
18 18
     {
19 19
         global $opt;
20 20
         if (($opt['debug'] & DEBUG_CLI) == DEBUG_CLI) {
21
-            echo 'DEBUG: ' . $str . "\n";
21
+            echo 'DEBUG: '.$str."\n";
22 22
         }
23 23
     }
24 24
 
25 25
     public function warn($str)
26 26
     {
27
-        echo 'WARN: ' . $str . "\n";
27
+        echo 'WARN: '.$str."\n";
28 28
     }
29 29
 
30 30
     public function error($str)
31 31
     {
32
-        echo 'ERROR: ' . $str . "\n";
32
+        echo 'ERROR: '.$str."\n";
33 33
     }
34 34
 
35 35
     public function fatal($str)
36 36
     {
37
-        echo 'FATAL: ' . $str . "\n";
37
+        echo 'FATAL: '.$str."\n";
38 38
         exit;
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
htdocs/lib2/html2text.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
         if (empty($url)) {
452 452
             if (!empty($_SERVER['HTTP_HOST'])) {
453 453
                 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
454
-                    $this->url = 'https://' . $_SERVER['HTTP_HOST'];
454
+                    $this->url = 'https://'.$_SERVER['HTTP_HOST'];
455 455
                 } else {
456
-                    $this->url = 'http://' . $_SERVER['HTTP_HOST'];
456
+                    $this->url = 'http://'.$_SERVER['HTTP_HOST'];
457 457
                 }
458 458
             } else {
459 459
                 $this->url = '';
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
         // Add link list
501 501
         if (!empty($this->_link_list)) {
502
-            $text .= "\n\nLinks:\n------\n" . $this->_link_list;
502
+            $text .= "\n\nLinks:\n------\n".$this->_link_list;
503 503
         }
504 504
 
505 505
         // Wrap the text to a readable format
@@ -534,24 +534,24 @@  discard block
 block discarded – undo
534 534
         if (substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' ||
535 535
             substr($link, 0, 7) == 'mailto:'
536 536
         ) {
537
-            $this->_link_count ++;
538
-            $this->_link_list .= "[" . $this->_link_count . "] $link\n";
539
-            $additional = ' [' . $this->_link_count . ']';
537
+            $this->_link_count++;
538
+            $this->_link_list .= "[".$this->_link_count."] $link\n";
539
+            $additional = ' ['.$this->_link_count.']';
540 540
         } elseif (substr($link, 0, 11) == 'javascript:') {
541 541
             // Don't count the link; ignore it
542 542
             $additional = '';
543 543
             // what about href="#anchor" ?
544 544
         } else {
545
-            $this->_link_count ++;
546
-            $this->_link_list .= "[" . $this->_link_count . "] " . $this->url;
545
+            $this->_link_count++;
546
+            $this->_link_list .= "[".$this->_link_count."] ".$this->url;
547 547
             if (substr($link, 0, 1) != '/') {
548 548
                 $this->_link_list .= '/';
549 549
             }
550 550
             $this->_link_list .= "$link\n";
551
-            $additional = ' [' . $this->_link_count . ']';
551
+            $additional = ' ['.$this->_link_count.']';
552 552
         }
553 553
 
554
-        return $display . $additional;
554
+        return $display.$additional;
555 555
     }
556 556
 
557 557
 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/cachelist.class.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  *   add/remove etc. is executed instantly
9 9
  ***************************************************************************/
10 10
 
11
-require_once __DIR__ . '/../translate.class.php';
11
+require_once __DIR__.'/../translate.class.php';
12 12
 
13 13
 define('ERROR_BAD_LISTNAME', 1);
14 14
 define('ERROR_DUPLICATE_LISTNAME', 2);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         return sql_value(
165 165
             "
166 166
             SELECT `entries` FROM `stat_cache_lists`
167
-            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId()) . "'",
167
+            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId())."'",
168 168
             0
169 169
         );
170 170
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         return sql_value(
175 175
             "
176 176
             SELECT `watchers` FROM `stat_cache_lists`
177
-            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId()) . "'",
177
+            WHERE `stat_cache_lists`.`cache_list_id`='" . sql_escape($this->getId())."'",
178 178
             0
179 179
         );
180 180
     }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
     {
403 403
         global $login;
404 404
 
405
-        return cachelist::getLists("`cache_lists`.`user_id`='" . sql_escape($login->userid) . "'");
405
+        return cachelist::getLists("`cache_lists`.`user_id`='".sql_escape($login->userid)."'");
406 406
     }
407 407
 
408 408
     public static function getListsWatchedByMe()
@@ -410,9 +410,9 @@  discard block
 block discarded – undo
410 410
         global $login;
411 411
 
412 412
         return cachelist::getLists(
413
-            "`id` IN (SELECT `cache_list_id` FROM `cache_list_watches` WHERE `user_id`='" . sql_escape(
413
+            "`id` IN (SELECT `cache_list_id` FROM `cache_list_watches` WHERE `user_id`='".sql_escape(
414 414
                 $login->userid
415
-            ) . "')"
415
+            )."')"
416 416
         );
417 417
     }
418 418
 
@@ -421,9 +421,9 @@  discard block
 block discarded – undo
421 421
         global $login;
422 422
 
423 423
         return cachelist::getLists(
424
-            "`id` IN (SELECT `cache_list_id` FROM `cache_list_bookmarks` WHERE `user_id`='" . sql_escape(
424
+            "`id` IN (SELECT `cache_list_id` FROM `cache_list_bookmarks` WHERE `user_id`='".sql_escape(
425 425
                 $login->userid
426
-            ) . "')"
426
+            )."')"
427 427
         );
428 428
     }
429 429
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
             LEFT JOIN `stat_cache_lists` ON  `stat_cache_lists`.`cache_list_id`=`cache_lists`.`id`
437 437
             LEFT JOIN `user` ON `user`.`user_id`=`cache_lists`.`user_id`
438 438
             WHERE `is_public`>=2 AND `entries`>0"
439
-            . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '')
440
-            . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''),
439
+            . ($namelike ? " AND `name` LIKE '%".sql_escape($namelike)."%'" : '')
440
+            . ($userlike ? " AND `username` LIKE '%".sql_escape($userlike)."%'" : ''),
441 441
             0
442 442
         );
443 443
     }
@@ -446,8 +446,8 @@  discard block
 block discarded – undo
446 446
     {
447 447
         return cachelist::getLists(
448 448
             "`is_public`>=2 AND `entries`>0"
449
-            . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '')
450
-            . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''),
449
+            . ($namelike ? " AND `name` LIKE '%".sql_escape($namelike)."%'" : '')
450
+            . ($userlike ? " AND `username` LIKE '%".sql_escape($userlike)."%'" : ''),
451 451
             0,
452 452
             $startat,
453 453
             $maxitems,
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     public static function getPublicListsOf($userid)
459 459
     {
460 460
         return cachelist::getLists(
461
-            "`is_public`>=2 AND `entries`>0 AND `cache_lists`.`user_id`='" . sql_escape($userid) . "'"
461
+            "`is_public`>=2 AND `entries`>0 AND `cache_lists`.`user_id`='".sql_escape($userid)."'"
462 462
         );
463 463
     }
464 464
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             "
472 472
             SELECT `user_id`
473 473
             FROM `caches`
474
-            WHERE `cache_id`='" . sql_escape($cacheid) . "'",
474
+            WHERE `cache_id`='" . sql_escape($cacheid)."'",
475 475
             0
476 476
         );
477 477
         $my_watches = sql_fetch_column(
@@ -483,15 +483,15 @@  discard block
 block discarded – undo
483 483
             `id` IN
484 484
                 (SELECT `cache_list_id`
485 485
                  FROM `cache_list_items`
486
-                 WHERE `cache_id`='" . sql_escape($cacheid) . "')
486
+                 WHERE `cache_id`='" . sql_escape($cacheid)."')
487 487
             AND
488 488
             (
489
-                `cache_lists`.`user_id`='" . sql_escape($login->userid) . "' " .
490
-            ($all ? "OR `is_public`= 3 " : "") .
489
+                `cache_lists`.`user_id`='" . sql_escape($login->userid)."' ".
490
+            ($all ? "OR `is_public`= 3 " : "").
491 491
             "OR (`is_public`> 0 AND
492
-                   `cache_lists`.`id` IN ('" . implode("','", array_map('sql_escape', $my_watches)) . "'))
492
+                   `cache_lists`.`id` IN ('" . implode("','", array_map('sql_escape', $my_watches))."'))
493 493
             )",
494
-            "`cache_lists`.`user_id`<>'" . sql_escape($cache_owner_id) . "'",
494
+            "`cache_lists`.`user_id`<>'".sql_escape($cache_owner_id)."'",
495 495
             0,
496 496
             20,
497 497
             true
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 
501 501
     public static function getListById($listid)
502 502
     {
503
-        $lists = cachelist::getLists("`id`='" . sql_escape($listid) . "'");
503
+        $lists = cachelist::getLists("`id`='".sql_escape($listid)."'");
504 504
         if (count($lists)) {
505 505
             $lists[0]['description_for_display'] = use_current_protocol_in_html($lists[0]['description']);
506 506
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,8 @@
 block discarded – undo
109 109
                 $this->getUserId(),
110 110
                 $this->getId(),
111 111
                 $name
112
-            )) {// $this->getId() is 0 when creating a new list -> condition has no effect
112
+            )) {
113
+// $this->getId() is 0 when creating a new list -> condition has no effect
113 114
                 return ERROR_DUPLICATE_LISTNAME;
114 115
             } elseif ($visibility >= 2 && strlen($name) < 10) {
115 116
                 return ERROR_BAD_LISTNAME;
Please login to merge, or discard this patch.
htdocs/lib2/logic/const.inc.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -16,28 +16,28 @@  discard block
 block discarded – undo
16 16
 define('RE_TYPE_FLOAT', 5);
17 17
 define('RE_TYPE_DOUBLE', 6);
18 18
 
19
-define('RE_INSERT_NOTHING', 0);       //
20
-define('RE_INSERT_OVERWRITE', 1);     // ignore given values and use function
21
-define('RE_INSERT_IGNORE', 2);        // dont use this column on insert
19
+define('RE_INSERT_NOTHING', 0); //
20
+define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function
21
+define('RE_INSERT_IGNORE', 2); // dont use this column on insert
22 22
 define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column
23
-define('RE_INSERT_AUTOUUID', 8);      // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
-define('RE_INSERT_NOW', 16);          // NOW()
23
+define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
24
+define('RE_INSERT_NOW', 16); // NOW()
25 25
 
26 26
 define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ');
27 27
 // ASCII + ISO-8859-1 0xC0..0xFF
28
-define('REGEX_USERNAME', '^[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#][' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{1,58}[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#]$');
29
-define('REGEX_PASSWORD', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{3,60}$');
30
-define('REGEX_LAST_NAME', '^[' . EUROPEAN_LETTERS . '][' . EUROPEAN_LETTERS . '0-9\.\- ]{0,58}[' . EUROPEAN_LETTERS . '0-9\.]$');
28
+define('REGEX_USERNAME', '^['.EUROPEAN_LETTERS.'0-9\.\-_@=)(\/\\\&*+~#]['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*+~#]{1,58}['.EUROPEAN_LETTERS.'0-9\.\-_@=)(\/\\\&*+~#]$');
29
+define('REGEX_PASSWORD', '^['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*+~#]{3,60}$');
30
+define('REGEX_LAST_NAME', '^['.EUROPEAN_LETTERS.']['.EUROPEAN_LETTERS.'0-9\.\- ]{0,58}['.EUROPEAN_LETTERS.'0-9\.]$');
31 31
 define('REGEX_FIRST_NAME', REGEX_LAST_NAME);
32
-define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
32
+define('REGEX_STATPIC_TEXT', '^['.EUROPEAN_LETTERS.'0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
33 33
 
34
-define('ADMIN_TRANSLATE', 1);     // edit translation
35
-define('ADMIN_MAINTAINANCE', 2);  // check table etc.
36
-define('ADMIN_USER', 4);          // drop users, caches etc.
37
-define('ADMIN_NEWS', 8);          // obsolete / reserved
38
-define('ADMIN_RESTORE', 16);      // restore vandalized listings
39
-define('ADMIN_ROOT', 128 | 127);  // root + all previous rights
40
-define('ADMIN_LISTING', 1024);    // can edit any cache listings
34
+define('ADMIN_TRANSLATE', 1); // edit translation
35
+define('ADMIN_MAINTAINANCE', 2); // check table etc.
36
+define('ADMIN_USER', 4); // drop users, caches etc.
37
+define('ADMIN_NEWS', 8); // obsolete / reserved
38
+define('ADMIN_RESTORE', 16); // restore vandalized listings
39
+define('ADMIN_ROOT', 128 | 127); // root + all previous rights
40
+define('ADMIN_LISTING', 1024); // can edit any cache listings
41 41
 
42 42
 define('ATTRIB_SELECTED', 1);
43 43
 define('ATTRIB_UNSELECTED', 2);
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 // ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16.
80 80
 
81 81
 // user.data_license values
82
-define('OLD_DATA_LICSENSE', 0);                       // before deadline
83
-define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1);      // declined license
84
-define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2);      // accepted new license on registration
85
-define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3);     // did not decline license until deadline
86
-define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4);     // could not accept/decline because disabled
82
+define('OLD_DATA_LICSENSE', 0); // before deadline
83
+define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license
84
+define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration
85
+define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline
86
+define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled
87 87
 
88 88
 //picture upload/resize parameters
89 89
 define('PICTURE_QUALITY', 85);
Please login to merge, or discard this patch.