Passed
Pull Request — development (#357)
by Mirko
08:27
created
htdocs/lib2/cookie.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
             if ($opt['session']['check_referer']) {
53 53
                 if (isset($_SERVER['REFERER'])) {
54
-                    if (strtolower(substr('http' + strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) {
54
+                    if (strtolower(substr('http' +strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) {
55 55
                         $this->createNewSession();
56 56
                     }
57 57
                 }
Please login to merge, or discard this patch.
htdocs/lib2/logic/logpics.class.php 2 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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 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)
Please login to merge, or discard this patch.
htdocs/lib2/logic/logtypes.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -91,28 +91,28 @@  discard block
 block discarded – undo
91 91
 
92 92
     $allowed_logtypes = array();
93 93
     if ($owner || $admin_report || $admin_locked) {
94
-        $allowed_logtypes[] = 3;   // note
94
+        $allowed_logtypes[] = 3; // note
95 95
     }
96 96
     if (($owner && $statuslogs) || $admin_report) {
97 97
         if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) {
98
-            $allowed_logtypes[] = 10;  // ready for search
99
-            $allowed_logtypes[] = 11;  // temporarily not available
100
-            $allowed_logtypes[] = 9;   // archived
101
-            $allowed_logtypes[] = 13;  // locked
98
+            $allowed_logtypes[] = 10; // ready for search
99
+            $allowed_logtypes[] = 11; // temporarily not available
100
+            $allowed_logtypes[] = 9; // archived
101
+            $allowed_logtypes[] = 13; // locked
102 102
         }
103 103
         if ($admin_report || $old_logtype == 14) {
104 104
             $allowed_logtypes[] = 14;
105 105
         }  // locked, invisible
106 106
     }
107 107
     if ($cache_type == 6) { // event
108
-        $allowed_logtypes[] = 8;   // will attend
109
-        $allowed_logtypes[] = 7;   // attended
108
+        $allowed_logtypes[] = 8; // will attend
109
+        $allowed_logtypes[] = 7; // attended
110 110
     } else {
111
-        $allowed_logtypes[] = 1;   // found
112
-        $allowed_logtypes[] = 2;   // not found
111
+        $allowed_logtypes[] = 1; // found
112
+        $allowed_logtypes[] = 2; // not found
113 113
     }
114 114
     if (!($owner || $admin_report || $admin_locked)) {
115
-        $allowed_logtypes[] = 3;   // note
115
+        $allowed_logtypes[] = 3; // note
116 116
     }
117 117
 
118 118
     // always allow to keep the existing logtype when the log is edited by an admin
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) {
152 152
                 // allowed for report processing by admins
153 153
                 $allowed = true;
154
-            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) {
154
+            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) {
155 155
                 // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517
156 156
                 $allowed = true;
157 157
             } else {
Please login to merge, or discard this patch.
htdocs/lib2/logic/cacheIcon.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname)
12 12
     {
13
-        $iconname = mb_eregi_replace("cache/", "", $iconname);   // for old cache_type table contents
13
+        $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents
14 14
         $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname);
15 15
         $iconname = mb_eregi_replace("\..*", "", $iconname);
16 16
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 break;
31 31
             case 5:
32 32
                 $iconname .= "-s";
33
-                break;      // fix for RT ticket #3403
33
+                break; // fix for RT ticket #3403
34 34
             case 6:
35 35
                 $iconname .= "-a";
36 36
                 break;
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 1 patch
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.
htdocs/lib2/search/search.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
     }
157 157
 
158 158
     // doppelte chars ersetzen
159
-    for ($c = ord('a'); $c <= ord('z'); $c ++) {
159
+    for ($c = ord('a'); $c <= ord('z'); $c++) {
160 160
         $str = mb_ereg_replace(chr($c) . chr($c), chr($c), $str);
161 161
     }
162 162
 
Please login to merge, or discard this patch.
htdocs/lib2/error.inc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@
 block discarded – undo
7 7
  *  Common error messages
8 8
  ***************************************************************************/
9 9
 
10
- define('ERROR_UNKNOWN', 1000);
11
- define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
- define('ERROR_COMPILATION_FAILED', 1002);
13
- define('ERROR_NO_ACCESS', 1003);
14
- define('ERROR_INVALID_OPERATION', 1004);
15
- define('ERROR_LOGIN_REQUIRED', 1005);
16
- define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
- define('ERROR_NO_COOKIES', 1007);
18
- define('ERROR_ALREADY_LOGGEDIN', 1008);
19
- define('ERROR_USER_NOT_ACTIVE', 1009);
20
- define('ERROR_USER_NO_EMAIL', 1010);
21
- define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
- define('ERROR_CACHE_LOCKED', 1012);
10
+    define('ERROR_UNKNOWN', 1000);
11
+    define('ERROR_TEMPLATE_NOT_FOUND', 1001);
12
+    define('ERROR_COMPILATION_FAILED', 1002);
13
+    define('ERROR_NO_ACCESS', 1003);
14
+    define('ERROR_INVALID_OPERATION', 1004);
15
+    define('ERROR_LOGIN_REQUIRED', 1005);
16
+    define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
17
+    define('ERROR_NO_COOKIES', 1007);
18
+    define('ERROR_ALREADY_LOGGEDIN', 1008);
19
+    define('ERROR_USER_NOT_ACTIVE', 1009);
20
+    define('ERROR_USER_NO_EMAIL', 1010);
21
+    define('ERROR_CACHE_NOT_PUBLISHED', 1011);
22
+    define('ERROR_CACHE_LOCKED', 1012);
23 23
 
24
- define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
- define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
- define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
24
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
25
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
26
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
27 27
  
28
- define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
- define('ERROR_DB_NO_ROOT', 1017);
28
+    define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
29
+    define('ERROR_DB_NO_ROOT', 1017);
30 30
 
31
- define('ERROR_USER_NOT_EXISTS', 1018);
32
- define('ERROR_CACHE_NOT_EXISTS', 1019);
33
- define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
- define('ERROR_PICTURE_NOT_EXISTS', 1021);
31
+    define('ERROR_USER_NOT_EXISTS', 1018);
32
+    define('ERROR_CACHE_NOT_EXISTS', 1019);
33
+    define('ERROR_CACHELOG_NOT_EXISTS', 1020);
34
+    define('ERROR_PICTURE_NOT_EXISTS', 1021);
35 35
 
36
- define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
- define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
- define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
- define('ERROR_UPLOAD_UNKNOWN', 1025);
40
- define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
36
+    define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
37
+    define('ERROR_UPLOAD_ERR_SIZE', 1023);
38
+    define('ERROR_UPLOAD_ERR_TYPE', 1024);
39
+    define('ERROR_UPLOAD_UNKNOWN', 1025);
40
+    define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
Please login to merge, or discard this patch.
htdocs/lib2/login.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
  *
21 21
  ***************************************************************************/
22 22
 
23
-define('LOGIN_UNKNOWN_ERROR', - 1);     // unkown error occured
24
-define('LOGIN_OK', 0);                 // login succeeded
25
-define('LOGIN_BADUSERPW', 1);          // bad username or password
26
-define('LOGIN_TOOMUCHLOGINS', 2);      // too many logins in short time
27
-define('LOGIN_USERNOTACTIVE', 3);      // the useraccount locked
23
+define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured
24
+define('LOGIN_OK', 0); // login succeeded
25
+define('LOGIN_BADUSERPW', 1); // bad username or password
26
+define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time
27
+define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked
28 28
 define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty
29
-define('LOGIN_LOGOUT_OK', 5);          // logout was successfull
29
+define('LOGIN_LOGOUT_OK', 5); // logout was successfull
30 30
 
31 31
 // login times in seconds
32 32
 define('LOGIN_TIME', 60 * 60);
Please login to merge, or discard this patch.