Completed
Push — master ( 598c1e...182b8c )
by Thomas
15:55 queued 08:34
created
htdocs/src/Oc/SmartyPlugins/function.season.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     ];
81 81
 
82 82
     $nTimestamp = time();
83
-    for ($nIndex = 0; $nIndex < count($seasons); $nIndex ++) {
83
+    for ($nIndex = 0; $nIndex < count($seasons); $nIndex++) {
84 84
         if (strtotime($seasons[$nIndex][0]) > $nTimestamp) {
85 85
             return $params['winter'];
86 86
         } //'';
Please login to merge, or discard this patch.
htdocs/okapi_settings.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
34 34
         'DEBUG'            => ($opt['debug'] & DEBUG_DEVELOPER != 0),
35 35
         'DEBUG_PREVENT_SEMAPHORES'
36
-                           => !$opt['php']['semaphores'],  # not available on old developer system
36
+                            => !$opt['php']['semaphores'],  # not available on old developer system
37 37
         'DB_SERVER'        => $opt['db']['servername'],
38 38
         'DB_NAME'          => $opt['db']['placeholder']['db'],
39 39
         'DB_USERNAME'      => $opt['db']['username'],
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         'OC_NODE_ID'       => $opt['logic']['node']['id'],
55 55
         'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
56 56
         'OCDE_HTML_PURIFIER_SETTINGS'
57
-                           => $opt['html_purifier'],
57
+                            => $opt['html_purifier'],
58 58
         'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'],
59 59
     );
60 60
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
     # [3] http://code.google.com/p/opencaching-api/issues/detail?id=132
17 17
 
18 18
     $opt['rootpath'] = $GLOBALS['rootpath'];
19
-    require $opt['rootpath'] . 'lib2/const.inc.php';   # (into the *local* scope!)
20
-    require $opt['rootpath'] . 'config2/settings-dist.inc.php';
21
-    require $opt['rootpath'] . 'config2/settings.inc.php';
19
+    require $opt['rootpath'].'lib2/const.inc.php'; # (into the *local* scope!)
20
+    require $opt['rootpath'].'config2/settings-dist.inc.php';
21
+    require $opt['rootpath'].'config2/settings.inc.php';
22 22
     
23 23
     return array(
24 24
 
25 25
         # Settings which ARE NOT present in settings.inc.php:
26 26
 
27
-        'OC_BRANCH' => 'oc.de',  # Tell OKAPI to work in "OCDE mode".
27
+        'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
28 28
 
29 29
         # Settings which ARE present in settings.inc.php:
30 30
 
31 31
         'ADMINS'           => array($opt['db']['warn']['mail'], '[email protected]'),
32 32
         'FROM_FIELD'       => $opt['mail']['contact'],
33
-        'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
33
+        'DATA_LICENSE_URL' => $opt['page']['absolute_url'].$opt['logic']['license']['terms'],
34 34
         'DEBUG'            => ($opt['debug'] & DEBUG_DEVELOPER != 0),
35 35
         'DEBUG_PREVENT_SEMAPHORES'
36
-                           => !$opt['php']['semaphores'],  # not available on old developer system
36
+                           => !$opt['php']['semaphores'], # not available on old developer system
37 37
         'DB_SERVER'        => $opt['db']['servername'],
38 38
         'DB_NAME'          => $opt['db']['placeholder']['db'],
39 39
         'DB_USERNAME'      => $opt['db']['username'],
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         'TIMEZONE'         => $opt['php']['timezone'],
44 44
         'SITE_URL'         => $opt['page']['absolute_url'],
45 45
         'REGISTRATION_URL' => $opt['page']['https']['mode'] != HTTPS_DISABLED
46
-                                  ? 'https://' . $opt['page']['domain'] . '/register.php'
47
-                                  : $opt['page']['absolute_url'] . 'register.php',
46
+                                  ? 'https://'.$opt['page']['domain'].'/register.php'
47
+                                  : $opt['page']['absolute_url'].'register.php',
48 48
         'VAR_DIR'          => $opt['okapi']['var_dir'],
49 49
         'IMAGES_DIR'       => rtrim($opt['logic']['pictures']['dir'], '/'),
50 50
         'IMAGES_URL'       => rtrim($opt['logic']['pictures']['url'], '/').'/',
51 51
         'IMAGE_MAX_UPLOAD_SIZE' => 2 * $opt['logic']['pictures']['maxsize'],
52
-        'IMAGE_MAX_PIXEL_COUNT' => 786432,  # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
53
-        'SITE_LOGO'        => $opt['page']['absolute_url'] . 'resource2/' . $opt['template']['default']['style'] . '/images/oclogo/oc_logo_alpha3.png',
52
+        'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
53
+        'SITE_LOGO'        => $opt['page']['absolute_url'].'resource2/'.$opt['template']['default']['style'].'/images/oclogo/oc_logo_alpha3.png',
54 54
         'OC_NODE_ID'       => $opt['logic']['node']['id'],
55
-        'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
55
+        'OC_COOKIE_NAME'   => $opt['session']['cookiename'].'data',
56 56
         'OCDE_HTML_PURIFIER_SETTINGS'
57 57
                            => $opt['html_purifier'],
58 58
         'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'],
Please login to merge, or discard this patch.
htdocs/resource2/tinymce/config/log.js.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2
-  if (isset($_REQUEST['lang'])) {
2
+    if (isset($_REQUEST['lang'])) {
3 3
     $lang = $_REQUEST['lang'];
4
-  }
5
-  else {
4
+    }
5
+    else {
6 6
     $lang = 'de';
7
-  }
7
+    }
8 8
 ?>
9 9
 tinyMCE_GZ.init({
10 10
     plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
 function imageBrowser(field_name, url, type, win)
49 49
 {
50
-  window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid']+0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent');
50
+  window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid'] + 0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent');
51 51
   fileBrowserWin = win;
52 52
   fileBrowserFieldName = field_name;
53 53
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
   if (isset($_REQUEST['lang'])) {
3 3
     $lang = $_REQUEST['lang'];
4
-  }
5
-  else {
4
+  } else {
6 5
     $lang = 'de';
7 6
   }
8 7
 ?>
Please login to merge, or discard this patch.
htdocs/resource2/tinymce/config/desc.js.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2
-  if (isset($_REQUEST['cacheid'])) {
2
+    if (isset($_REQUEST['cacheid'])) {
3 3
     $cacheID = $_REQUEST['cacheid'];
4
-  }
5
-  else {
4
+    }
5
+    else {
6 6
     $cacheID = 0;
7
-  }
8
-  if (isset($_REQUEST['lang'])) {
7
+    }
8
+    if (isset($_REQUEST['lang'])) {
9 9
     $lang = $_REQUEST['lang'];
10
-  }
11
-  else {
10
+    }
11
+    else {
12 12
     $lang = 'de';
13
-  }
13
+    }
14 14
 ?>
15 15
 tinyMCE_GZ.init({
16 16
     plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
 function imageBrowser(field_name, url, type, win)
55 55
 {
56
-  window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID+0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent');
56
+  window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID + 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent');
57 57
   fileBrowserWin = win;
58 58
   fileBrowserFieldName = field_name;
59 59
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,14 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
   if (isset($_REQUEST['cacheid'])) {
3 3
     $cacheID = $_REQUEST['cacheid'];
4
-  }
5
-  else {
4
+  } else {
6 5
     $cacheID = 0;
7 6
   }
8 7
   if (isset($_REQUEST['lang'])) {
9 8
     $lang = $_REQUEST['lang'];
10
-  }
11
-  else {
9
+  } else {
12 10
     $lang = 'de';
13 11
   }
14 12
 ?>
Please login to merge, or discard this patch.
htdocs/resource2/tinymce/config/user.js.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-  if (isset($_REQUEST['lang']))
2
+    if (isset($_REQUEST['lang']))
3 3
     $lang = $_REQUEST['lang'];
4
-  else
4
+    else
5 5
     $lang = 'de';
6 6
 ?>
7 7
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,10 @@
 block discarded – undo
1 1
 <?php
2
-  if (isset($_REQUEST['lang']))
3
-    $lang = $_REQUEST['lang'];
4
-  else
5
-    $lang = 'de';
6
-?>
2
+  if (isset($_REQUEST['lang'])) {
3
+      $lang = $_REQUEST['lang'];
4
+  } else {
5
+      $lang = 'de';
6
+  }
7
+  ?>
7 8
 
8 9
 tinyMCE_GZ.init({
9 10
     plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table',
Please login to merge, or discard this patch.
htdocs/mailto.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
 $text = isset($_REQUEST['text']) ? $_REQUEST['text'] : '';
56 56
 if (isset($_REQUEST['emailaddress'])) {
57 57
     $bEmailaddress = ($_REQUEST['emailaddress'] == 1);
58
-}
59
-else {
58
+} else {
60 59
     $own_user = new user($login->userid);
61 60
     $bEmailaddress = $own_user->getUsermailSendAddress();
62 61
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'mailto';
11 11
 $tpl->menuitem = MNU_USER_MAILTO;
12 12
 
13 13
 $login->verify();
14 14
 if ($login->userid == 0) {
15
-    $tpl->redirect('login.php?target=' . urlencode($tpl->target));
15
+    $tpl->redirect('login.php?target='.urlencode($tpl->target));
16 16
 }
17 17
 
18 18
 $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0;
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     $wp = $_REQUEST['wp'];
37 37
     $cachename = trim(sql_value("SELECT `name` FROM `caches` WHERE `wp_oc`='&1'", '', $wp));
38 38
     if ($cachename) {
39
-        $subject = $translate->t('Your geocache', '', 0, 0) . ' "' . $cachename . '" (' . $wp . ')';
39
+        $subject = $translate->t('Your geocache', '', 0, 0).' "'.$cachename.'" ('.$wp.')';
40 40
     }
41 41
 } elseif (isset($_REQUEST['reportid']) && $login->admin) {
42 42
     $rs = sql(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $_REQUEST['reportid']
48 48
     );
49 49
     if ($r = sql_fetch_assoc($rs)) {
50
-        $subject = $translate->t('Your geocache report for', '', 0, 0) . ' ' . $r['wp_oc'] . ' (' . $r['name'] . ')';
50
+        $subject = $translate->t('Your geocache report for', '', 0, 0).' '.$r['wp_oc'].' ('.$r['name'].')';
51 51
     }
52 52
     sql_free_result($rs);
53 53
 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/logpics.class.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         global $login;
31 31
 
32 32
         $fields =
33
-          "`pics`.`uuid` AS `pic_uuid`,
33
+            "`pics`.`uuid` AS `pic_uuid`,
34 34
            `pics`.`url` AS `pic_url`,
35 35
            `pics`.`title`,
36 36
            `pics`.`date_created`,
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
     const FOR_STARTPAGE_GALLERY = 1;
18 18
     const FOR_NEWPICS_GALLERY = 2;
19 19
     const FOR_USER_STAT = 3;
20
-    const FOR_USER_GALLERY = 4;   // params: userid
20
+    const FOR_USER_GALLERY = 4; // params: userid
21 21
     const FOR_MYHOME_GALLERY = 5;
22
-    const FOR_CACHE_STAT = 6;     // params: cacheid
23
-    const FOR_CACHE_GALLERY = 7;  // params: cacheid
22
+    const FOR_CACHE_STAT = 6; // params: cacheid
23
+    const FOR_CACHE_GALLERY = 7; // params: cacheid
24 24
 
25
-    const MAX_PICTURES_PER_GALLERY_PAGE = 48;   // must be multiple of 6
25
+    const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6
26 26
 
27 27
 
28 28
     public static function get($purpose, $userid = 0, $cacheid = 0)
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $pictures = self::get($purpose, $userid, $cacheid);
233 233
         $tpl->assign('pictures', array_slice($pictures, $startat, self::MAX_PICTURES_PER_GALLERY_PAGE));
234 234
 
235
-        $pager = new pager($url . "&startat={offset}");
235
+        $pager = new pager($url."&startat={offset}");
236 236
         $pager->make_from_offset($startat, count($pictures), self::MAX_PICTURES_PER_GALLERY_PAGE);
237 237
     }
238 238
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 // only a few percent of caches. We must rely on fast data caching.
64 64
 
65 65
                 $rs = sql_slave(
66
-                    "SELECT
66
+                    "select
67 67
                         $fields,
68 68
                         `user`.`username`,
69 69
                         `pics`.`date_created` AS `picdate`
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 // This saves us one grouped subquery.
100 100
 
101 101
                 $rs = sql_slave(
102
-                    "SELECT $fields, `user`.`username`, `pics`.`date_created` AS `picdate`
102
+                    "select $fields, `user`.`username`, `pics`.`date_created` AS `picdate`
103 103
                      FROM
104 104
                         (SELECT `uuid`, `url`, `title`, `date_created`, `object_id`
105 105
                          FROM `pictures`
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 // all pics of one user, except spoilers and invisibles
139 139
 
140 140
                 $rs = sql(
141
-                    "SELECT $fields, `logs`.`date` AS `picdate`
141
+                    "select $fields, `logs`.`date` AS `picdate`
142 142
                      FROM `pictures` `pics`
143 143
                      $join_logs
144 144
                      $join_caches
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 // by an old log deletion (we should remove those ...)
155 155
 
156 156
                 $rs = sql(
157
-                    "SELECT $fields, `logs`.`date` AS `picdate`
157
+                    "select $fields, `logs`.`date` AS `picdate`
158 158
                      FROM `pictures` AS `pics`
159 159
                      $join_logs
160 160
                      WHERE `object_type`=1 AND `logs`.`user_id`='&1'
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
                 // in listing view
192 192
 
193 193
                 $rs = sql(
194
-                    "SELECT $fields, `user`.`username`, `logs`.`date` AS `picdate`
194
+                    "select $fields, `user`.`username`, `logs`.`date` AS `picdate`
195 195
                      FROM `pictures` AS `pics`
196 196
                      $join_logs
197 197
                      $join_user
Please login to merge, or discard this patch.
htdocs/lib2/logic/gis.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         // number of points in the polygon
30 30
         $n = count($polygon);
31 31
         $poly1 = $polygon[0];
32
-        for ($i = 1; $i <= $n; $i ++) {
32
+        for ($i = 1; $i <= $n; $i++) {
33 33
             $poly1XY = explode(' ', $poly1);
34 34
             $poly1x = $poly1XY[0];
35 35
             $poly1y = $poly1XY[1];
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                         if ($poly1y != $poly2y) {
45 45
                             $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x;
46 46
                             if ($poly1x == $poly2x || $px <= $xinters) {
47
-                                $counter ++;
47
+                                $counter++;
48 48
                             }
49 49
                         }
50 50
                     }
Please login to merge, or discard this patch.
htdocs/lib2/logic/cracklib.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     // min. 4 different chars
36 36
     $chars = array();
37
-    for ($i = 0; $i < mb_strlen($pw); $i ++) {
37
+    for ($i = 0; $i < mb_strlen($pw); $i++) {
38 38
         $chars[mb_substr($pw, $i, 1)] = true;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,8 @@
 block discarded – undo
75 75
 
76 76
     // $pw may not contain one of $addwords[]
77 77
     foreach ($wordlist as $v) {
78
-        if (mb_stripos($pw_lc, $v) !== false) {// mb_stripos needs PHP 5.2
78
+        if (mb_stripos($pw_lc, $v) !== false) {
79
+// mb_stripos needs PHP 5.2
79 80
             return false;
80 81
         }
81 82
     }
Please login to merge, or discard this patch.