Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
created
htdocs/util2/license/process-old-disabled-users.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
  ***************************************************************************/
13 13
 
14 14
 $opt['rootpath'] = '../../';
15
-require_once $opt['rootpath'] . 'lib2/cli.inc.php';
16
-require_once $opt['rootpath'] . 'lib2/logic/user.class.php';
15
+require_once $opt['rootpath'].'lib2/cli.inc.php';
16
+require_once $opt['rootpath'].'lib2/logic/user.class.php';
17 17
 
18 18
 $login->admin = ADMIN_USER;
19 19
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 $n = 0;
26 26
 while ($r = sql_fetch_assoc($rs)) {
27
-    echo "purging content of user '" . $r['username'] . "'\n";
27
+    echo "purging content of user '".$r['username']."'\n";
28 28
 
29 29
     $user = new user($r['user_id']);
30 30
     $result = $user->disduelicense(true);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         die($result);
33 33
     }
34 34
 
35
-    ++ $n;
35
+    ++$n;
36 36
 }
37 37
 sql_free_result($rs);
38 38
 
Please login to merge, or discard this patch.
htdocs/util2/gns/gns_import.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $file = fopen($filename, "r");
45 45
     $cnt = 0;
46 46
     while ($line = fgets($file, 4096)) {
47
-        if ($cnt ++ == 0) {// skip first line
47
+        if ($cnt++ == 0) {// skip first line
48 48
             continue;
49 49
         }
50 50
 
@@ -52,31 +52,31 @@  discard block
 block discarded – undo
52 52
 
53 53
         sql(
54 54
             "INSERT IGNORE INTO gns_locations SET
55
-                    rc = '" . sql_escape($gns[0]) . "',
56
-                    ufi = '" . sql_escape($gns[1]) . "',
57
-                    uni = '" . sql_escape($gns[2]) . "',
58
-                    lat = '" . sql_escape($gns[3]) . "',
59
-                    lon = '" . sql_escape($gns[4]) . "',
60
-                    dms_lat = '" . sql_escape($gns[5]) . "',
61
-                    dms_lon = '" . sql_escape($gns[6]) . "',
62
-                    utm = '" . sql_escape($gns[7]) . "',
63
-                    jog = '" . sql_escape($gns[8]) . "',
64
-                    fc = '" . sql_escape($gns[9]) . "',
65
-                    dsg = '" . sql_escape($gns[10]) . "',
66
-                    pc = '" . sql_escape($gns[11]) . "',
67
-                    cc1 = '" . sql_escape($gns[12]) . "',
68
-                    adm1 = '" . sql_escape($gns[13]) . "',
69
-                    adm2 = _utf8'" . sql_escape($gns[14]) . "',
70
-                    dim = '" . sql_escape($gns[15]) . "',
71
-                    cc2 = '" . sql_escape($gns[16]) . "',
72
-                    nt = '" . sql_escape($gns[17]) . "',
73
-                    lc = '" . sql_escape($gns[18]) . "',
74
-                    SHORT_FORM = _utf8'" . sql_escape($gns[19]) . "',
75
-                    GENERIC = _utf8'" . sql_escape($gns[20]) . "',
76
-                    SORT_NAME = _utf8'" . sql_escape($gns[21]) . "',
77
-                    FULL_NAME = _utf8'" . sql_escape($gns[22]) . "',
78
-                    FULL_NAME_ND = _utf8'" . sql_escape($gns[23]) . "',
79
-                    MOD_DATE = '" . sql_escape($gns[24]) . "'"
55
+                    rc = '" . sql_escape($gns[0])."',
56
+                    ufi = '" . sql_escape($gns[1])."',
57
+                    uni = '" . sql_escape($gns[2])."',
58
+                    lat = '" . sql_escape($gns[3])."',
59
+                    lon = '" . sql_escape($gns[4])."',
60
+                    dms_lat = '" . sql_escape($gns[5])."',
61
+                    dms_lon = '" . sql_escape($gns[6])."',
62
+                    utm = '" . sql_escape($gns[7])."',
63
+                    jog = '" . sql_escape($gns[8])."',
64
+                    fc = '" . sql_escape($gns[9])."',
65
+                    dsg = '" . sql_escape($gns[10])."',
66
+                    pc = '" . sql_escape($gns[11])."',
67
+                    cc1 = '" . sql_escape($gns[12])."',
68
+                    adm1 = '" . sql_escape($gns[13])."',
69
+                    adm2 = _utf8'" . sql_escape($gns[14])."',
70
+                    dim = '" . sql_escape($gns[15])."',
71
+                    cc2 = '" . sql_escape($gns[16])."',
72
+                    nt = '" . sql_escape($gns[17])."',
73
+                    lc = '" . sql_escape($gns[18])."',
74
+                    SHORT_FORM = _utf8'" . sql_escape($gns[19])."',
75
+                    GENERIC = _utf8'" . sql_escape($gns[20])."',
76
+                    SORT_NAME = _utf8'" . sql_escape($gns[21])."',
77
+                    FULL_NAME = _utf8'" . sql_escape($gns[22])."',
78
+                    FULL_NAME_ND = _utf8'" . sql_escape($gns[23])."',
79
+                    MOD_DATE = '" . sql_escape($gns[24])."'"
80 80
         );
81 81
     }
82 82
     fclose($file);
Please login to merge, or discard this patch.
htdocs/util2/gns/mksearchindex.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  ***************************************************************************/
11 11
 
12 12
 $opt['rootpath'] = '../../';
13
-require_once $opt['rootpath'] . 'lib2/cli.inc.php';
14
-require_once $opt['rootpath'] . 'lib2/search/search.inc.php';
13
+require_once $opt['rootpath'].'lib2/cli.inc.php';
14
+require_once $opt['rootpath'].'lib2/search/search.inc.php';
15 15
 
16 16
 
17 17
 $doubleindex['sankt'] = 'st';
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     foreach ($simpletextsarray as $text) {
28 28
         if ($text != '') {
29 29
             if (nonalpha($text)) {
30
-                die($r['uni'] . ' ' . $text . "\n");// obsolete for the same reason as above
30
+                die($r['uni'].' '.$text."\n"); // obsolete for the same reason as above
31 31
             }
32 32
 
33 33
             $simpletext = search_text2simple($text);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 function nonalpha($str)
61 61
 {
62
-    for ($i = 0; $i < mb_strlen($str); $i ++) {
62
+    for ($i = 0; $i < mb_strlen($str); $i++) {
63 63
         if (!((ord(mb_substr($str, $i, 1)) >= ord('a')) && (ord(mb_substr($str, $i, 1)) <= ord('z')))) {
64 64
             return true;
65 65
         }
Please login to merge, or discard this patch.
htdocs/util2/gns/mkadmtxt.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  ***************************************************************************/
11 11
 
12 12
 $opt['rootpath'] = '../../';
13
-require_once $opt['rootpath'] . 'lib2/cli.inc.php';
14
-require_once $opt['rootpath'] . 'lib2/search/search.inc.php';
13
+require_once $opt['rootpath'].'lib2/cli.inc.php';
14
+require_once $opt['rootpath'].'lib2/search/search.inc.php';
15 15
 
16 16
 
17 17
 $rsLocations = sql("SELECT `uni`, `lat`, `lon`, `rc`, `cc1`, `adm1` FROM `gns_locations` WHERE `dsg` LIKE 'PPL%'");
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $maxlon = geomath::getMaxLon($rLocations['lon'], $rLocations['lat'], 10, 1);
23 23
 
24 24
     // den nächsgelegenen Ort in den geodb ermitteln
25
-    $sql = 'SELECT ' . geomath::getSqlDistanceFormula(
25
+    $sql = 'SELECT '.geomath::getSqlDistanceFormula(
26 26
             $rLocations['lon'],
27 27
             $rLocations['lat'],
28 28
             10,
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
             'lon',
31 31
             'lat',
32 32
             'geodb_coordinates'
33
-        ) . ' `distance`,
33
+        ).' `distance`,
34 34
                             `geodb_coordinates`.`loc_id` `loc_id`
35 35
                       FROM `geodb_coordinates`
36
-                      WHERE `lon` > ' . $minlon . ' AND
37
-                            `lon` < ' . $maxlon . ' AND
38
-                            `lat` > ' . $minlat . ' AND
39
-                            `lat` < ' . $maxlat . '
36
+                      WHERE `lon` > ' . $minlon.' AND
37
+                            `lon` < ' . $maxlon.' AND
38
+                            `lat` > ' . $minlat.' AND
39
+                            `lat` < ' . $maxlat.'
40 40
                       HAVING `distance` < 10
41 41
                       ORDER BY `distance` ASC
42 42
                       LIMIT 1';
Please login to merge, or discard this patch.
htdocs/util2/geodb/make_searchindex.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  ***************************************************************************/
11 11
 
12 12
 $opt['rootpath'] = '../../';
13
-require_once __DIR__ . '/../../lib2/cli.inc.php';
14
-require_once __DIR__ . '/../../lib2/search/search.inc.php';
13
+require_once __DIR__.'/../../lib2/cli.inc.php';
14
+require_once __DIR__.'/../../lib2/search/search.inc.php';
15 15
 
16 16
 
17 17
 sql('DELETE FROM geodb_search');
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     foreach ($simpletextsarray as $text) {
31 31
         if ($text != '') {
32 32
             if (nonalpha($text)) {
33
-                die($text . "\n");
33
+                die($text."\n");
34 34
             }
35 35
 
36 36
             $simpletext = search_text2simple($text);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 function nonalpha($str)
52 52
 {
53
-    for ($i = 0; $i < mb_strlen($str); $i ++) {
53
+    for ($i = 0; $i < mb_strlen($str); $i++) {
54 54
         if (!((ord(mb_substr($str, $i, 1)) >= ord('a')) && (ord(mb_substr($str, $i, 1)) <= ord('z')))) {
55 55
             return true;
56 56
         }
Please login to merge, or discard this patch.
htdocs/util2/google-earth/caches.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 header('Content-type: text/html; charset=utf-8');
11 11
 
12 12
 $opt['rootpath'] = '../../';
13
-require $opt['rootpath'] . 'lib2/web.inc.php';
14
-require $opt['rootpath'] . 'templates2/ocstyle/search.tpl.inc.php';
13
+require $opt['rootpath'].'lib2/web.inc.php';
14
+require $opt['rootpath'].'templates2/ocstyle/search.tpl.inc.php';
15 15
 
16 16
 $bbox = isset($_REQUEST['BBOX']) ? $_REQUEST['BBOX'] : '0,0,0,0';
17 17
 $abox = mb_split(',', $bbox);
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $kmlLine =
47 47
     '
48 48
 <Placemark>
49
-  <description><![CDATA[' . $t_by . ' {username}<br><br><a href="{urlbase}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>
49
+  <description><![CDATA[' . $t_by.' {username}<br><br><a href="{urlbase}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>
50 50
   <name>{name}</name>
51 51
   <LookAt>
52 52
     <longitude>{lon}</longitude>
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $nCount = $nCount + 1;
237 237
         $thisline = $kmlLine;
238 238
 
239
-        $typeimgurl = '<img src="' . $opt['page']['default_absolute_url'] . 'resource2/' . $opt['template']['style'] . '/images/cacheicon/' . $r['icon_large'] . '" alt="' . $r['typedesc'] . '" title="' . $r['typedesc'] . '" />';
239
+        $typeimgurl = '<img src="'.$opt['page']['default_absolute_url'].'resource2/'.$opt['template']['style'].'/images/cacheicon/'.$r['icon_large'].'" alt="'.$r['typedesc'].'" title="'.$r['typedesc'].'" />';
240 240
 
241 241
         $thisline = mb_ereg_replace('{icon}', $r['kml_name'], $thisline);
242 242
         $thisline = mb_ereg_replace('{typeimgurl}', $typeimgurl, $thisline);
@@ -313,15 +313,15 @@  discard block
 block discarded – undo
313 313
     // prepare lines
314 314
     $sZoomIn = str_replace("\r", "", $sZoomIn);
315 315
     $sLines = mb_split("\n", $sZoomIn);
316
-    for ($i = 0; $i < count($sLines); $i ++) {
316
+    for ($i = 0; $i < count($sLines); $i++) {
317 317
         $sLines[$i] = str_pad($sLines[$i], ($nColumnsCount - 1), ' ');
318 318
     }
319 319
 
320 320
     $nDegreePerLine = ($lat_to - $lat_from) / count($sLines);
321 321
     $nDegreePerColumn = ($lon_to - $lon_from) / $nColumnsCount;
322 322
 
323
-    for ($nLine = 0; $nLine < count($sLines); $nLine ++) {
324
-        for ($nColumn = 0; $nColumn < $nColumnsCount; $nColumn ++) {
323
+    for ($nLine = 0; $nLine < count($sLines); $nLine++) {
324
+        for ($nColumn = 0; $nColumn < $nColumnsCount; $nColumn++) {
325 325
             if (substr($sLines[$nLine], $nColumn, 1) == '#') {
326 326
                 $nLat = $lat_to - $nDegreePerLine * $nLine;
327 327
                 $nLon = $lon_from + $nDegreePerColumn * $nColumn;
@@ -331,14 +331,14 @@  discard block
 block discarded – undo
331 331
                     <description><![CDATA[You have to zoom in to see the Geocaches]]></description>
332 332
                     <name></name>
333 333
                     <LookAt>
334
-                        <longitude>' . $nLon . '</longitude>
335
-                        <latitude>' . $nLat . '</latitude>
334
+                        <longitude>' . $nLon.'</longitude>
335
+                        <latitude>' . $nLat.'</latitude>
336 336
                         <range>5000</range>
337 337
                         <tilt>0</tilt>
338 338
                         <heading>3</heading>
339 339
                     </LookAt>
340 340
                     <Point>
341
-                        <coordinates>' . $nLon . ',' . $nLat . ',0</coordinates>
341
+                        <coordinates>' . $nLon.','.$nLat.',0</coordinates>
342 342
                     </Point>
343 343
                 </Placemark>
344 344
                 ';
Please login to merge, or discard this patch.
htdocs/util2/cron/phpbbtopics.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
         usort($this->topiclist, 'sort_compare_updated');
32 32
         $this->topiclist = array_slice($this->topiclist, 0, $opt['cron']['phpbbtopics']['count']);
33 33
 
34
-        $f = fopen(__DIR__ . '/../../cache2/phpbb.inc.php', 'w');
35
-        fwrite($f, '<?php' . "\n");
34
+        $f = fopen(__DIR__.'/../../cache2/phpbb.inc.php', 'w');
35
+        fwrite($f, '<?php'."\n");
36 36
         fwrite(
37 37
             $f,
38
-            '$phpbb_topics = unserialize("' . str_replace('"', '\\"', serialize($this->topiclist)) . '");' . "\n"
38
+            '$phpbb_topics = unserialize("'.str_replace('"', '\\"', serialize($this->topiclist)).'");'."\n"
39 39
         );
40 40
         fwrite($f, '?>');
41 41
         fclose($f);
Please login to merge, or discard this patch.
htdocs/util2/cron/fill_search_index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
  ****************************************************************************/
13 13
 
14 14
 // needs absolute rootpath because called as cronjob
15
-$opt['rootpath'] = __DIR__ . '/../../';
15
+$opt['rootpath'] = __DIR__.'/../../';
16 16
 
17
-require __DIR__ . '/../../lib2/cli.inc.php';
18
-require __DIR__ . '/../../lib2/search/ftsearch.inc.php';
17
+require __DIR__.'/../../lib2/cli.inc.php';
18
+require __DIR__.'/../../lib2/search/ftsearch.inc.php';
19 19
 
20 20
 if (!cronjobs_enabled()) {
21 21
     exit;
Please login to merge, or discard this patch.
htdocs/util2/cron/modules/gcwp_update.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 class gcwp_update
14 14
 {
15 15
     public $name = 'gcwp_update';
16
-    public $interval = 3600;  // every hour
16
+    public $interval = 3600; // every hour
17 17
 
18 18
 
19 19
     public function run()
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         foreach ($opt['cron']['gcwp']['sources'] as $source) {
27 27
             $wpdata = @file($source);
28 28
             if ($wpdata === false) {
29
-                echo 'gcwp_update: error reading ' . $source . "\n";
29
+                echo 'gcwp_update: error reading '.$source."\n";
30 30
                 $errors = true;
31 31
             } else {
32 32
                 foreach ($wpdata as $line) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 "
49 49
                     UPDATE caches
50 50
                     SET wp_gc_maintained = UCASE(TRIM(wp_gc))
51
-                    WHERE wp_oc NOT IN ('" . implode("','", $ocwp_imported) . "')"
51
+                    WHERE wp_oc NOT IN ('" . implode("','", $ocwp_imported)."')"
52 52
             );
53 53
         }
54 54
     }
Please login to merge, or discard this patch.