Completed
Push — master ( c2d7ad...3f78da )
by Thomas
07:29
created
htdocs/oconly81.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
9
-require __DIR__ . '/lib2/logic/oconly81.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9
+require __DIR__.'/lib2/logic/oconly81.inc.php';
10 10
 
11 11
 $showall = (@$_REQUEST['showall'] == 1);
12 12
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     INNER JOIN &oconly81 ON &oconly81.`user_id`=`user`.`user_id`
47 47
     GROUP BY `user`.`user_id`
48 48
     ORDER BY `count` DESC, `username` ASC " .
49
-    ($showall ? "" : "LIMIT " . sql_escape($opt['logic']['oconly81']['default_maxusers'] + 1))
49
+    ($showall ? "" : "LIMIT ".sql_escape($opt['logic']['oconly81']['default_maxusers'] + 1))
50 50
 );
51 51
 
52 52
 $tpl->assign_rs('users', $rs);
Please login to merge, or discard this patch.
htdocs/search.php 1 patch
Spacing   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
  * - wtf is "expert mode"?
56 56
  ****************************************************************************/
57 57
 
58
-require __DIR__ . '/lib2/web.inc.php';
59
-require __DIR__ . '/lib2/logic/data-license.inc.php';
60
-require __DIR__ . '/lib2/search/search.inc.php';
61
-require __DIR__ . '/templates2/' . $opt['template']['style'] . '/search.tpl.inc.php';
58
+require __DIR__.'/lib2/web.inc.php';
59
+require __DIR__.'/lib2/logic/data-license.inc.php';
60
+require __DIR__.'/lib2/search/search.inc.php';
61
+require __DIR__.'/templates2/'.$opt['template']['style'].'/search.tpl.inc.php';
62 62
 
63 63
 
64 64
 //=========================================================
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     }
129 129
 }
130 130
 
131
-$queryid += 0;  // safety measure: force $queryid to be numeric
131
+$queryid += 0; // safety measure: force $queryid to be numeric
132 132
 
133 133
 
134 134
 //=========================================================
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     if (sql_num_rows($query_rs) == 0) {
150 150
         // can happen if logged out after query was created (fix for RT #3915)
151 151
         $queryid = 0;
152
-        goto newquery;  // goto needs PHP 5.3
152
+        goto newquery; // goto needs PHP 5.3
153 153
         /*
154 154
         $tpl->error($error_query_not_found);
155 155
         */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         // get findername from finderid
188
-        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0;  // Ocprop
188
+        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop
189 189
         if (isset($options['finder']) && $options['finderid'] > 0) {
190 190
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']);
191 191
             if (sql_num_rows($rs_name) == 1) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         }
198 198
 
199 199
         // get ownername from ownerid
200
-        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0;  // Ocprop
200
+        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop
201 201
         if (isset($options['owner']) && $options['ownerid'] > 0) {
202 202
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']);
203 203
             if (sql_num_rows($rs_name) == 1) {
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
     }
227 227
 
228 228
     // get the search options parameters and store them in the queries table (to view "the next page")
229
-    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0;  // Ocprop
230
-    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0;  // Ocprop
229
+    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0; // Ocprop
230
+    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0; // Ocprop
231 231
     $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? $_REQUEST['f_disabled'] : 0;
232
-    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1;  // Ocprop
232
+    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1; // Ocprop
233 233
     // f_inactive formerly was used for both, archived and disabled caches.
234 234
     // After adding the separate f_disabled option, it is used only for archived
235 235
     // caches, but keeps its name for compatibility with existing stored or
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
     $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? $_REQUEST['f_ignored'] : 1;
238 238
     $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? $_REQUEST['f_otherPlatforms'] : 0;
239 239
     $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? $_REQUEST['f_geokrets'] : 0;
240
-    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0;  // Ocprop: 0
240
+    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0; // Ocprop: 0
241 241
     $options['showresult'] = isset($_REQUEST['showresult']) ? $_REQUEST['showresult'] : 0;
242
-    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML';  // Ocprop: HTML
242
+    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
243 243
     $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
244 244
 
245 245
     if (isset($_REQUEST['cache_attribs'])) {
246 246
         if ($_REQUEST['cache_attribs'] != '') {
247 247
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs']);
248
-            for ($i = 0; $i < count($aAttribs); $i ++) {
248
+            for ($i = 0; $i < count($aAttribs); $i++) {
249 249
                 $options['cache_attribs'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
250 250
             }
251 251
             unset($aAttribs);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     if (isset($_REQUEST['cache_attribs_not'])) {
260 260
         if ($_REQUEST['cache_attribs_not'] != '') {
261 261
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs_not']);
262
-            for ($i = 0; $i < count($aAttribs); $i ++) {
262
+            for ($i = 0; $i < count($aAttribs); $i++) {
263 263
                 $options['cache_attribs_not'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
264 264
             }
265 265
             unset($aAttribs);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
         $options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0;
299 299
         $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
300
-        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7';  // Ocprop
300
+        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
301 301
     } elseif (isset($_REQUEST['searchbyortplz'])) {
302 302
         $onlydigits = is_numeric($_REQUEST['ortplz']);
303 303
         if ($onlydigits == true) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         if (!$list->allowView($password)) {
364 364
             $tpl->redirect("cachelists.php");
365 365
         }
366
-        $options['cachelist'] = cachelist::getListById($options['listid']);  // null for invalid ID
366
+        $options['cachelist'] = cachelist::getListById($options['listid']); // null for invalid ID
367 367
         $options['cachelist_pw'] = $password;
368 368
     } elseif (isset($_REQUEST['searchall'])) {
369 369
         if (!$login->logged_in() &&
@@ -538,17 +538,17 @@  discard block
 block discarded – undo
538 538
         if ($options['searchtype'] == 'byname') {
539 539
             $sql_select[] = '`caches`.`cache_id` `cache_id`';
540 540
             $sql_from = '`caches`';
541
-            $sql_where[] = '`caches`.`name` LIKE \'%' . sql_escape($options['cachename']) . '%\'';
541
+            $sql_where[] = '`caches`.`name` LIKE \'%'.sql_escape($options['cachename']).'%\'';
542 542
         } elseif ($options['searchtype'] == 'byowner') {
543 543
             if ($options['ownerid'] != 0) {
544 544
                 $sql_select[] = '`caches`.`cache_id` `cache_id`';
545 545
                 $sql_from = '`caches`';
546
-                $sql_where[] = '`user_id`=\'' . sql_escape($options['ownerid']) . '\'';
546
+                $sql_where[] = '`user_id`=\''.sql_escape($options['ownerid']).'\'';
547 547
             } else {
548 548
                 $sql_select[] = '`caches`.`cache_id` `cache_id`';
549 549
                 $sql_from = '`caches`';
550 550
                 $sql_innerjoin[] = '`user` ON `caches`.`user_id`=`user`.`user_id`';
551
-                $sql_where[] = '`user`.`username`=\'' . sql_escape($options['owner']) . '\'';
551
+                $sql_where[] = '`user`.`username`=\''.sql_escape($options['owner']).'\'';
552 552
             }
553 553
         } elseif (($options['searchtype'] == 'byplz') || ($options['searchtype'] == 'byort')) {
554 554
             $locid = $options['locid'];
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                     $sql =
564 564
                         "SELECT `loc_id`
565 565
                          FROM `geodb_textdata`
566
-                         WHERE `text_type`=500300000 AND `text_val`='" . sql_escape($plz) . "'";
566
+                         WHERE `text_type`=500300000 AND `text_val`='" . sql_escape($plz)."'";
567 567
                     $rs = sql($sql);
568 568
                     if (sql_num_rows($rs) == 0) {
569 569
                         sql_free_result($rs);
@@ -638,9 +638,9 @@  discard block
 block discarded – undo
638 638
                                 if ($sqlhashes != '') {
639 639
                                     $sqlhashes .= ' OR ';
640 640
                                 }
641
-                                $sqlhashes .= '`gns_search`.`simplehash`=' . sprintf("%u", crc32($searchstring));
641
+                                $sqlhashes .= '`gns_search`.`simplehash`='.sprintf("%u", crc32($searchstring));
642 642
 
643
-                                $wordscount ++;
643
+                                $wordscount++;
644 644
                             }
645 645
                         }
646 646
 
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
             // needs distinct because there can be multiple matching logs per cache
923 923
             $sql_from = '`caches`';
924 924
             $sql_innerjoin[] = '`cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id`';
925
-            $sql_where[] = '`cache_logs`.`user_id`=\'' . sql_escape($finder_id) . '\'';
925
+            $sql_where[] = '`cache_logs`.`user_id`=\''.sql_escape($finder_id).'\'';
926 926
 
927 927
             if ($options['logtype'] != '0') { // 0 = all types
928 928
                 $ids = explode(',', $options['logtype']);
@@ -933,18 +933,18 @@  discard block
 block discarded – undo
933 933
                     }
934 934
                     $idNumbers .= ($id + 0);
935 935
                 }
936
-                $sql_where[] = '`cache_logs`.`type` IN (' . $idNumbers . ')';
936
+                $sql_where[] = '`cache_logs`.`type` IN ('.$idNumbers.')';
937 937
             }
938 938
         } elseif ($options['searchtype'] == 'bycacheid') {
939 939
             $sql_select[] = '`caches`.`cache_id` `cache_id`';
940 940
             $sql_from = '`caches`';
941
-            $sql_where[] = '`caches`.`cache_id`=\'' . sql_escape($options['cacheid']) . '\'';
941
+            $sql_where[] = '`caches`.`cache_id`=\''.sql_escape($options['cacheid']).'\'';
942 942
         } elseif ($options['searchtype'] == 'bywp') {
943 943
             $sql_select[] = '`caches`.`cache_id` `cache_id`';
944 944
             $sql_from = '`caches`';
945
-            $sql_where[] = '`caches`.`wp_oc`=\'' . sql_escape($options['wp']) . '\'';
945
+            $sql_where[] = '`caches`.`wp_oc`=\''.sql_escape($options['wp']).'\'';
946 946
         } elseif ($options['searchtype'] == 'byfulltext') {
947
-            require_once $opt['rootpath'] . 'lib2/search/ftsearch.inc.php';
947
+            require_once $opt['rootpath'].'lib2/search/ftsearch.inc.php';
948 948
 
949 949
             $fulltext = $options['fulltext'];
950 950
             $hashes = ftsearch_hash($fulltext);
@@ -982,27 +982,27 @@  discard block
 block discarded – undo
982 982
             $n = 1;
983 983
             foreach ($hashes as $k => $h) {
984 984
                 if ($n > 1) {
985
-                    $sql_innerjoin[] = '`search_index` AS `s' . $n . '` ON `s' . ($n - 1) . '`.`cache_id`=`s' . $n . '`.`cache_id`';
985
+                    $sql_innerjoin[] = '`search_index` AS `s'.$n.'` ON `s'.($n - 1).'`.`cache_id`=`s'.$n.'`.`cache_id`';
986 986
                 } else {
987 987
                     $sql_innerjoin[] = '`search_index` AS `s1` ON `s1`.`cache_id`=`caches`.`cache_id`';
988 988
                 }
989 989
 
990
-                $sql_where[] = '`s' . $n . '`.`hash`=\'' . sql_escape($h) . '\'';
991
-                $sql_where[] = '`s' . $n . '`.`object_type` IN (' . implode(',', $ft_types) . ')';
990
+                $sql_where[] = '`s'.$n.'`.`hash`=\''.sql_escape($h).'\'';
991
+                $sql_where[] = '`s'.$n.'`.`object_type` IN ('.implode(',', $ft_types).')';
992 992
 
993
-                $n ++;
993
+                $n++;
994 994
             }
995 995
 
996 996
             $sqlFilter =
997
-                'SELECT DISTINCT ' . implode(',', $sql_select) .
998
-                ' FROM ' . $sql_from .
999
-                ' INNER JOIN ' . implode(' INNER JOIN ', $sql_innerjoin) .
1000
-                ' WHERE ' . implode(' AND ', $sql_where);
997
+                'SELECT DISTINCT '.implode(',', $sql_select).
998
+                ' FROM '.$sql_from.
999
+                ' INNER JOIN '.implode(' INNER JOIN ', $sql_innerjoin).
1000
+                ' WHERE '.implode(' AND ', $sql_where);
1001 1001
 
1002 1002
             sql_drop_temp_table_slave('tmpFTCaches');
1003 1003
             sql_temp_table_slave('tmpFTCaches');
1004 1004
             sql_slave(
1005
-                "CREATE TEMPORARY TABLE &tmpFTCaches (`cache_id` int (11) PRIMARY KEY) " . $sqlFilter
1005
+                "CREATE TEMPORARY TABLE &tmpFTCaches (`cache_id` int (11) PRIMARY KEY) ".$sqlFilter
1006 1006
             );
1007 1007
 
1008 1008
             $sql_select = [];
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
                         SELECT `cache_id`
1027 1027
                         FROM `cache_list_items`
1028 1028
                         LEFT JOIN `cache_lists` ON `cache_lists`.`id`=`cache_list_items`.`cache_list_id`
1029
-                        WHERE `cache_list_id`='" . sql_escape($options['listid']) . "'";
1029
+                        WHERE `cache_list_id`='" . sql_escape($options['listid'])."'";
1030 1030
                 sql_slave($cachesFilter);
1031 1031
                 sql_slave('ALTER TABLE &result_caches ADD PRIMARY KEY (`cache_id`)');
1032 1032
 
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
             $options['f_userowner'] = '0';
1055 1055
         }   // Ocprop
1056 1056
         if ($options['f_userowner'] != 0) {
1057
-            $sql_where[] = '`caches`.`user_id`!=\'' . $login->userid . '\'';
1057
+            $sql_where[] = '`caches`.`user_id`!=\''.$login->userid.'\'';
1058 1058
         }
1059 1059
 
1060 1060
         if (!isset($options['f_userfound'])) {
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
                     (SELECT `cache_logs`.`cache_id`
1067 1067
                      FROM `cache_logs`
1068 1068
                      WHERE
1069
-                        `cache_logs`.`user_id`='" . sql_escape($login->userid) . "'
1069
+                        `cache_logs`.`user_id`='" . sql_escape($login->userid)."'
1070 1070
                         AND `cache_logs`.`type` IN (1, 7))";
1071 1071
         }
1072 1072
         if (!isset($options['f_inactive'])) {
@@ -1093,14 +1093,14 @@  discard block
 block discarded – undo
1093 1093
             if ($options['f_ignored'] != 0) {
1094 1094
                 // only use this filter, if it is realy needed - this enables better caching in map2.php with ignored-filter
1095 1095
                 if (sql_value_slave(
1096
-                    "SELECT COUNT(*) FROM `cache_ignore` WHERE `user_id`='" . sql_escape($login->userid) . "'",
1096
+                    "SELECT COUNT(*) FROM `cache_ignore` WHERE `user_id`='".sql_escape($login->userid)."'",
1097 1097
                     0
1098 1098
                 ) > 0) {
1099 1099
                     $sql_where[] =
1100 1100
                         "`caches`.`cache_id` NOT IN
1101 1101
                             (SELECT `cache_ignore`.`cache_id`
1102 1102
                              FROM `cache_ignore`
1103
-                             WHERE `cache_ignore`.`user_id`='" . sql_escape($login->userid) . "')";
1103
+                             WHERE `cache_ignore`.`user_id`='" . sql_escape($login->userid)."')";
1104 1104
                 }
1105 1105
             }
1106 1106
         }
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
             $options['country'] = '';
1123 1123
         }
1124 1124
         if ($options['country'] != '') {
1125
-            $sql_where[] = '`caches`.`country`=\'' . sql_escape($options['country']) . '\'';
1125
+            $sql_where[] = '`caches`.`country`=\''.sql_escape($options['country']).'\'';
1126 1126
         }
1127 1127
 
1128 1128
         if (!isset($options['language'])) {
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
             $sql_where[] = '`cache_desc`.`language`=\'' . sql_escape($options['language']) . '\'';
1135 1135
             */
1136 1136
             // optimized query:
1137
-            $sql_where[] = 'INSTR(`caches`.`desc_languages`,\'' . sql_escape($options['language']) . '\')';
1137
+            $sql_where[] = 'INSTR(`caches`.`desc_languages`,\''.sql_escape($options['language']).'\')';
1138 1138
         }
1139 1139
 
1140 1140
         if (!isset($options['adm2'])) {
@@ -1142,50 +1142,50 @@  discard block
 block discarded – undo
1142 1142
         }
1143 1143
         if ($options['adm2'] != '') {
1144 1144
             $sql_innerjoin[] = '`cache_location` ON `cache_location`.`cache_id`=`caches`.`cache_id`';
1145
-            $sql_where[] = '`cache_location`.`code2`=\'' . sql_escape($options['adm2']) . '\'';
1145
+            $sql_where[] = '`cache_location`.`code2`=\''.sql_escape($options['adm2']).'\'';
1146 1146
         }
1147 1147
 
1148 1148
         if ($options['cachetype'] != '') {
1149 1149
             $types = explode(';', $options['cachetype']);
1150 1150
             if (count($types) < sql_value_slave("SELECT COUNT(*) FROM `cache_type`", 0)) {
1151
-                for ($i = 0; $i < count($types); $i ++) {
1152
-                    $types[$i] = "'" . sql_escape($types[$i]) . "'";
1151
+                for ($i = 0; $i < count($types); $i++) {
1152
+                    $types[$i] = "'".sql_escape($types[$i])."'";
1153 1153
                 }
1154
-                $sql_where[] = '`caches`.`type` IN (' . implode(',', $types) . ')';
1154
+                $sql_where[] = '`caches`.`type` IN ('.implode(',', $types).')';
1155 1155
             }
1156 1156
         }
1157 1157
 
1158 1158
         if ($options['cachesize'] != '') {
1159 1159
             $sizes = explode(';', $options['cachesize']);
1160 1160
             if (count($sizes) < sql_value_slave("SELECT COUNT(*) FROM `cache_size`", 0)) {
1161
-                for ($i = 0; $i < count($sizes); $i ++) {
1162
-                    $sizes[$i] = "'" . sql_escape($sizes[$i]) . "'";
1161
+                for ($i = 0; $i < count($sizes); $i++) {
1162
+                    $sizes[$i] = "'".sql_escape($sizes[$i])."'";
1163 1163
                 }
1164
-                $sql_where[] = '`caches`.`size` IN (' . implode(',', $sizes) . ')';
1164
+                $sql_where[] = '`caches`.`size` IN ('.implode(',', $sizes).')';
1165 1165
             }
1166 1166
         }
1167 1167
 
1168 1168
         if ($options['difficultymin'] != 0) {
1169
-            $sql_where[] = '`caches`.`difficulty`>=\'' . sql_escape($options['difficultymin']) . '\'';
1169
+            $sql_where[] = '`caches`.`difficulty`>=\''.sql_escape($options['difficultymin']).'\'';
1170 1170
         }
1171 1171
         if ($options['difficultymax'] != 0) {
1172
-            $sql_where[] = '`caches`.`difficulty`<=\'' . sql_escape($options['difficultymax']) . '\'';
1172
+            $sql_where[] = '`caches`.`difficulty`<=\''.sql_escape($options['difficultymax']).'\'';
1173 1173
         }
1174 1174
         if ($options['terrainmin'] != 0) {
1175
-            $sql_where[] = '`caches`.`terrain`>=\'' . sql_escape($options['terrainmin']) . '\'';
1175
+            $sql_where[] = '`caches`.`terrain`>=\''.sql_escape($options['terrainmin']).'\'';
1176 1176
         }
1177 1177
         if ($options['terrainmax'] != 0) {
1178
-            $sql_where[] = '`caches`.`terrain`<=\'' . sql_escape($options['terrainmax']) . '\'';
1178
+            $sql_where[] = '`caches`.`terrain`<=\''.sql_escape($options['terrainmax']).'\'';
1179 1179
         }
1180 1180
         if ($options['recommendationmin'] > 0) {
1181 1181
             $sql_innerjoin[] = '`stat_caches` ON `caches`.`cache_id`=`stat_caches`.`cache_id`';
1182
-            $sql_where[] = '`stat_caches`.`toprating`>=\'' . sql_escape($options['recommendationmin']) . '\'';
1182
+            $sql_where[] = '`stat_caches`.`toprating`>=\''.sql_escape($options['recommendationmin']).'\'';
1183 1183
         }
1184 1184
 
1185 1185
         if (isset($options['cache_attribs']) && count($options['cache_attribs']) > 0) {
1186 1186
             foreach ($options['cache_attribs'] as $attr) {
1187
-                $sql_innerjoin[] = '`caches_attributes` AS `a' . ($attr + 0) . '` ON `a' . ($attr + 0) . '`.`cache_id`=`caches`.`cache_id`';
1188
-                $sql_where[] = '`a' . ($attr + 0) . '`.`attrib_id`=' . ($attr + 0);
1187
+                $sql_innerjoin[] = '`caches_attributes` AS `a'.($attr + 0).'` ON `a'.($attr + 0).'`.`cache_id`=`caches`.`cache_id`';
1188
+                $sql_where[] = '`a'.($attr + 0).'`.`attrib_id`='.($attr + 0);
1189 1189
             }
1190 1190
         }
1191 1191
 
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
                          FROM `caches_attributes`
1198 1198
                          WHERE
1199 1199
                             `caches_attributes`.`cache_id`=`caches`.`cache_id`
1200
-                            AND `caches_attributes`.`attrib_id`='" . sql_escape($attr + 0) . "'
1200
+                            AND `caches_attributes`.`attrib_id`='" . sql_escape($attr + 0)."'
1201 1201
                         )";
1202 1202
             }
1203 1203
         }
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
             // bbox=<lon_from>,<lat_from>,<lon_to>,<lat_to>
1207 1207
             $coords = explode(',', $options['bbox']);
1208 1208
             if (count($coords) == 4) {
1209
-                $sql_where[] = '`caches`.`longitude`>=' . ($coords[0] + 0) . ' AND `caches`.`latitude`>=' . ($coords[1] + 0) . ' AND `caches`.`longitude`<=' . ($coords[2] + 0) . ' AND `caches`.`latitude`<=' . ($coords[3] + 0);
1209
+                $sql_where[] = '`caches`.`longitude`>='.($coords[0] + 0).' AND `caches`.`latitude`>='.($coords[1] + 0).' AND `caches`.`longitude`<='.($coords[2] + 0).' AND `caches`.`latitude`<='.($coords[3] + 0);
1210 1210
             }
1211 1211
         }
1212 1212
 
@@ -1215,23 +1215,23 @@  discard block
 block discarded – undo
1215 1215
             $sql_where[] =
1216 1216
                 '(`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='
1217 1217
                 . sql_escape($login->userid)
1218
-                . ' OR (`caches`.`status`<>5 AND ' . ($login->hasAdminPriv(ADMIN_USER) ? '1' : '0') . '))';
1218
+                . ' OR (`caches`.`status`<>5 AND '.($login->hasAdminPriv(ADMIN_USER) ? '1' : '0').'))';
1219 1219
         } else {
1220 1220
             $sql_where[] = '`cache_status`.`allow_user_view`=1';
1221 1221
         }
1222 1222
 
1223 1223
         //do the search
1224
-        $innerjoin = sizeof($sql_innerjoin) ? ' INNER JOIN ' . implode(' INNER JOIN ', $sql_innerjoin) : '';
1225
-        $leftjoin = sizeof($sql_leftjoin) ? ' LEFT JOIN ' . implode(' LEFT JOIN ', $sql_leftjoin) : '';
1226
-        $group = sizeof($sql_group) ? ' GROUP BY ' . implode(', ', $sql_group) : '';
1227
-        $having = sizeof($sql_having) ? ' HAVING ' . implode(' AND ', $sql_having) : '';
1228
-
1229
-        $sqlFilter = 'SELECT ' . implode(',', $sql_select) .
1230
-            ' FROM ' . $sql_from .
1231
-            $innerjoin .
1232
-            $leftjoin .
1233
-            ' WHERE ' . implode(' AND ', $sql_where) .
1234
-            $group .
1224
+        $innerjoin = sizeof($sql_innerjoin) ? ' INNER JOIN '.implode(' INNER JOIN ', $sql_innerjoin) : '';
1225
+        $leftjoin = sizeof($sql_leftjoin) ? ' LEFT JOIN '.implode(' LEFT JOIN ', $sql_leftjoin) : '';
1226
+        $group = sizeof($sql_group) ? ' GROUP BY '.implode(', ', $sql_group) : '';
1227
+        $having = sizeof($sql_having) ? ' HAVING '.implode(' AND ', $sql_having) : '';
1228
+
1229
+        $sqlFilter = 'SELECT '.implode(',', $sql_select).
1230
+            ' FROM '.$sql_from.
1231
+            $innerjoin.
1232
+            $leftjoin.
1233
+            ' WHERE '.implode(' AND ', $sql_where).
1234
+            $group.
1235 1235
             $having;
1236 1236
 
1237 1237
         // echo "DEBUG ".$sqlFilter." DEBUG<br>";
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
     //  X6. load output module and output-dependent options
1244 1244
     //=================================================================
1245 1245
 
1246
-    $output_module = mb_strtolower($options['output']);  // Ocprop: HTML, gpx
1246
+    $output_module = mb_strtolower($options['output']); // Ocprop: HTML, gpx
1247 1247
 
1248 1248
     $map2_bounds = ($output_module == 'map2bounds');
1249 1249
     if ($map2_bounds) {
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
 
1253 1253
     if ($map2_bounds && $options['queryid'] == 0) {
1254 1254
         $tpl->error('map2bounds requires queryid');
1255
-    } elseif (!file_exists($opt['rootpath'] . 'lib2/search/search.' . $output_module . '.inc.php')) {
1255
+    } elseif (!file_exists($opt['rootpath'].'lib2/search/search.'.$output_module.'.inc.php')) {
1256 1256
         $tpl->error($outputformat_notexist);
1257 1257
     }
1258 1258
 
@@ -1278,7 +1278,7 @@  discard block
 block discarded – undo
1278 1278
     // (map2 module will execute and exit; it will use the variables
1279 1279
     // $cachesFilter, $sqlFilter and $map2_bounds and $options['queryid'].)
1280 1280
 
1281
-    require $opt['rootpath'] . 'lib2/search/search.' . $output_module . '.inc.php';
1281
+    require $opt['rootpath'].'lib2/search/search.'.$output_module.'.inc.php';
1282 1282
 
1283 1283
     if (!isset($search_output_file_download)) {
1284 1284
         die("search_output_file_download flag not set for '$output_module' search");
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
             $lat_rad * 180 / 3.14159,
1304 1304
             0,
1305 1305
             $multiplier[$distance_unit]
1306
-        ) . ' `distance`, ';
1306
+        ).' `distance`, ';
1307 1307
     } else {
1308 1308
         if (!$login->logged_in()) {
1309 1309
             $sql .= 'NULL distance, ';
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
                     $record_coords['latitude'],
1327 1327
                     0,
1328 1328
                     $multiplier[$distance_unit]
1329
-                ) . ' `distance`, ';
1329
+                ).' `distance`, ';
1330 1330
             }
1331 1331
             sql_free_result($rs_coords);
1332 1332
         }
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
         $sAddFields .= ', MAX(`cache_logs`.`date`) AS `lastLog`';
1337 1337
         $sAddJoin .= ' LEFT JOIN `cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id`';
1338 1338
         if ($options['sort'] == 'bymylastlog') {
1339
-            $sAddJoin .= ' AND `cache_logs`.`user_id`=' . sql_escape($login->userid);
1339
+            $sAddJoin .= ' AND `cache_logs`.`user_id`='.sql_escape($login->userid);
1340 1340
         }
1341 1341
         $sGroupBy .= ' GROUP BY `caches`.`cache_id`';
1342 1342
     }
@@ -1352,8 +1352,8 @@  discard block
 block discarded – undo
1352 1352
         . ' FROM `caches`
1353 1353
           LEFT JOIN `stat_caches` ON `caches`.`cache_id`=`stat_caches`.`cache_id`' .
1354 1354
         $sAddJoin
1355
-        . ' WHERE `caches`.`cache_id` IN (' . $sqlFilter . ')' .
1356
-        $sAddWhere . ' ' .
1355
+        . ' WHERE `caches`.`cache_id` IN ('.$sqlFilter.')'.
1356
+        $sAddWhere.' '.
1357 1357
         $sGroupBy;
1358 1358
     $sortby = $options['sort'];
1359 1359
 
@@ -1418,7 +1418,7 @@  discard block
 block discarded – undo
1418 1418
         $count = 500;
1419 1419
     }
1420 1420
 
1421
-    $sqlLimit = ' LIMIT ' . $startat . ', ' . $count;
1421
+    $sqlLimit = ' LIMIT '.$startat.', '.$count;
1422 1422
 
1423 1423
     if ($search_output_file_download) {
1424 1424
         //===================================================================
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
         // for the case something went wrong and it was not propery cleaned up
1430 1430
 
1431 1431
         sql_temp_table_slave('searchtmp');
1432
-        sql_slave("CREATE TEMPORARY TABLE &searchtmp SELECT " . $sql . $sqlLimit);
1432
+        sql_slave("CREATE TEMPORARY TABLE &searchtmp SELECT ".$sql.$sqlLimit);
1433 1433
 
1434 1434
         $count = sql_value_slave("SELECT COUNT(*) FROM &searchtmp", 0);
1435 1435
         if ($count == 1) {
@@ -1441,7 +1441,7 @@  discard block
 block discarded – undo
1441 1441
                 '?'
1442 1442
             );
1443 1443
         } else {
1444
-            $sFilebasename = 'ocde' . $options['queryid'];
1444
+            $sFilebasename = 'ocde'.$options['queryid'];
1445 1445
         }
1446 1446
 
1447 1447
         $bUseZip = ($count > $zip_threshold) ||
@@ -1452,11 +1452,11 @@  discard block
 block discarded – undo
1452 1452
 
1453 1453
         if (!$db['debug']) {
1454 1454
             if ($bUseZip) {
1455
-                header('Content-type: ' . $content_type_zipped);
1456
-                header('Content-disposition: attachment; filename="' . $sFilebasename . '.zip"');
1455
+                header('Content-type: '.$content_type_zipped);
1456
+                header('Content-disposition: attachment; filename="'.$sFilebasename.'.zip"');
1457 1457
             } else {
1458
-                header('Content-type: ' . $content_type_plain);
1459
-                header('Content-disposition: attachment; filename="' . $sFilebasename . '.' . $output_module . '"');
1458
+                header('Content-type: '.$content_type_plain);
1459
+                header('Content-disposition: attachment; filename="'.$sFilebasename.'.'.$output_module.'"');
1460 1460
             }
1461 1461
         }
1462 1462
 
@@ -1489,9 +1489,9 @@  discard block
 block discarded – undo
1489 1489
         // output zip file
1490 1490
         if ($bUseZip && !$db['debug']) {
1491 1491
             if ($add_to_zipfile) {
1492
-                $phpzip->add_data($sFilebasename . '.' . $output_module, $content);
1492
+                $phpzip->add_data($sFilebasename.'.'.$output_module, $content);
1493 1493
             }
1494
-            echo $phpzip->save($sFilebasename . '.zip', 'r');
1494
+            echo $phpzip->save($sFilebasename.'.zip', 'r');
1495 1495
         }
1496 1496
     } else {
1497 1497
         //===================================================================
@@ -1565,14 +1565,14 @@  discard block
 block discarded – undo
1565 1565
     $cachesFilter =
1566 1566
         "CREATE TEMPORARY TABLE &result_caches ENGINE=MEMORY
1567 1567
             SELECT
1568
-                (" . geomath::getSqlDistanceFormula($lon, $lat, $distance, $multiplier[$distance_unit]) . ") `distance`,
1568
+                (" . geomath::getSqlDistanceFormula($lon, $lat, $distance, $multiplier[$distance_unit]).") `distance`,
1569 1569
                 `caches`.`cache_id` `cache_id`
1570 1570
             FROM `caches` FORCE INDEX (`latitude`)
1571 1571
             WHERE
1572
-                `longitude` > " . ($lon - $max_lon_diff) . "
1573
-                AND `longitude` < " . ($lon + $max_lon_diff) . "
1574
-                AND `latitude` > " . ($lat - $max_lat_diff) . "
1575
-                AND `latitude` < " . ($lat + $max_lat_diff) . "
1572
+                `longitude` > " . ($lon - $max_lon_diff)."
1573
+                AND `longitude` < " . ($lon + $max_lon_diff)."
1574
+                AND `latitude` > " . ($lat - $max_lat_diff)."
1575
+                AND `latitude` < " . ($lat + $max_lat_diff)."
1576 1576
             HAVING `distance` < " . ($distance + 0);
1577 1577
     sql_slave($cachesFilter);
1578 1578
     sql_slave("ALTER TABLE &result_caches ADD PRIMARY KEY ( `cache_id` )");
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
             $rs = sql(
1688 1688
                 "SELECT `latitude`, `longitude`
1689 1689
                  FROM `user`
1690
-                 WHERE `user_id`='" . sql_escape($login->userid) . "'"
1690
+                 WHERE `user_id`='" . sql_escape($login->userid)."'"
1691 1691
             );
1692 1692
             $record = sql_fetch_array($rs);
1693 1693
             $lon = $record['longitude'];
@@ -1785,9 +1785,9 @@  discard block
 block discarded – undo
1785 1785
     }
1786 1786
     $tpl->assign('ortplz', $ortplz);
1787 1787
     if ($options['searchtype'] == 'byplz') {
1788
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz');  // Ocprop
1788
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz'); // Ocprop
1789 1789
     } elseif ($options['searchtype'] == 'byort') {
1790
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byort');  // Ocprop
1790
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byort'); // Ocprop
1791 1791
     } else {
1792 1792
         $dByOrtPlzChecked = false;
1793 1793
     }
@@ -1856,8 +1856,8 @@  discard block
 block discarded – undo
1856 1856
         $rCachetype['checked'] =
1857 1857
             ($options['cachetype'] == '')
1858 1858
             || (strpos(
1859
-                ';' . $options['cachetype'] . ';',
1860
-                ';' . $rCachetype['id'] . ';'
1859
+                ';'.$options['cachetype'].';',
1860
+                ';'.$rCachetype['id'].';'
1861 1861
             ) !== false);
1862 1862
         $rCachetype['unchecked'] = !$rCachetype['checked'];
1863 1863
     }
@@ -1870,8 +1870,8 @@  discard block
 block discarded – undo
1870 1870
     while ($r = sql_fetch_assoc($rs)) {
1871 1871
         $cachesizes[$r['id']]['checked'] =
1872 1872
             (strpos(
1873
-                ';' . $options['cachesize'] . ';',
1874
-                ';' . $r['id'] . ';'
1873
+                ';'.$options['cachesize'].';',
1874
+                ';'.$r['id'].';'
1875 1875
             ) !== false)
1876 1876
             || ($options['cachesize'] == '');
1877 1877
     }
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2023 2023
 
2024 2024
             $group_line .= $line;
2025
-            $nLineAttrCount2 ++;
2025
+            $nLineAttrCount2++;
2026 2026
         }
2027 2027
         sql_free_result($rs);
2028 2028
 
@@ -2133,7 +2133,7 @@  discard block
 block discarded – undo
2133 2133
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2134 2134
 
2135 2135
             $group_line .= $line;
2136
-            $nLineAttrCount1 ++;
2136
+            $nLineAttrCount1++;
2137 2137
         }
2138 2138
         sql_free_result($rs);
2139 2139
 
@@ -2255,7 +2255,7 @@  discard block
 block discarded – undo
2255 2255
             $pnew = '';
2256 2256
             foreach ($param as $p) {
2257 2257
                 if ($pnew != '') {
2258
-                    $pnew .= ';' . $p;
2258
+                    $pnew .= ';'.$p;
2259 2259
                 } else {
2260 2260
                     $pnew .= $p;
2261 2261
                 }
@@ -2265,9 +2265,9 @@  discard block
 block discarded – undo
2265 2265
         }
2266 2266
 
2267 2267
         if ($urlparamString != '') {
2268
-            $urlparamString .= '&' . $name . '=' . urlencode($param);
2268
+            $urlparamString .= '&'.$name.'='.urlencode($param);
2269 2269
         } else {
2270
-            $urlparamString = $name . '=' . urlencode($param);
2270
+            $urlparamString = $name.'='.urlencode($param);
2271 2271
         }
2272 2272
     }
2273 2273
     $urlparamString .= '';
@@ -2278,13 +2278,13 @@  discard block
 block discarded – undo
2278 2278
 
2279 2279
 function outputUniidSelectionForm($uniSql, $options)
2280 2280
 {
2281
-    global $tpl;  // settings
2281
+    global $tpl; // settings
2282 2282
     global $locline, $secondlocationname;
2283 2283
 
2284 2284
     $urlparamString = prepareLocSelectionForm($options);
2285 2285
 
2286 2286
     sql_temp_table_slave('uniids');
2287
-    sql_slave("CREATE TEMPORARY TABLE &uniids ENGINE=MEMORY " . $uniSql);
2287
+    sql_slave("CREATE TEMPORARY TABLE &uniids ENGINE=MEMORY ".$uniSql);
2288 2288
     sql_slave("ALTER TABLE &uniids ADD PRIMARY KEY (`uni_id`)");
2289 2289
 
2290 2290
     // locidsite
@@ -2297,7 +2297,7 @@  discard block
 block discarded – undo
2297 2297
     $tpl->assign('resultscount', $count);
2298 2298
 
2299 2299
     // create page browser
2300
-    $pager = new pager('search.php?' . $urlparamString . '&locidsite={offset}');
2300
+    $pager = new pager('search.php?'.$urlparamString.'&locidsite={offset}');
2301 2301
     $pager->make_from_offset($locidsite, ceil($count / 20), 1);
2302 2302
 
2303 2303
     // create locations list
@@ -2317,7 +2317,7 @@  discard block
 block discarded – undo
2317 2317
          FROM `gns_locations`, &uniids
2318 2318
          WHERE &uniids.`uni_id`=`gns_locations`.`uni`
2319 2319
          ORDER BY `gns_locations`.`full_name` ASC
2320
-         LIMIT " . ($locidsite * 20) . ", 20"
2320
+         LIMIT " . ($locidsite * 20).", 20"
2321 2321
     );
2322 2322
 
2323 2323
     $nr = $locidsite * 20 + 1;
@@ -2354,7 +2354,7 @@  discard block
 block discarded – undo
2354 2354
         $thislocation = mb_ereg_replace('{parentlocations}', $locString, $thislocation);
2355 2355
 
2356 2356
         // koordinaten ermitteln
2357
-        $coordString = help_latToDegreeStr($r['lat']) . ' ' . help_lonToDegreeStr($r['lon']);
2357
+        $coordString = help_latToDegreeStr($r['lat']).' '.help_lonToDegreeStr($r['lon']);
2358 2358
         $thislocation = mb_ereg_replace('{coords}', htmlspecialchars($coordString, ENT_COMPAT, 'UTF-8'), $thislocation);
2359 2359
 
2360 2360
         if ($r['olduni'] != 0) {
@@ -2384,12 +2384,12 @@  discard block
 block discarded – undo
2384 2384
             htmlspecialchars($r['full_name'], ENT_COMPAT, 'UTF-8'),
2385 2385
             $thislocation
2386 2386
         );
2387
-        $thislocation = mb_ereg_replace('{urlparams}', $urlparamString . '&locid={locid}', $thislocation);
2387
+        $thislocation = mb_ereg_replace('{urlparams}', $urlparamString.'&locid={locid}', $thislocation);
2388 2388
         $thislocation = mb_ereg_replace('{locid}', urlencode($r['uni_id']), $thislocation);
2389 2389
         $thislocation = mb_ereg_replace('{nr}', $nr, $thislocation);
2390 2390
 
2391
-        $nr ++;
2392
-        $locations .= $thislocation . "\n";
2391
+        $nr++;
2392
+        $locations .= $thislocation."\n";
2393 2393
     }
2394 2394
     sql_free_result($rs);
2395 2395
     sql_drop_temp_table_slave('uniids');
@@ -2406,12 +2406,12 @@  discard block
 block discarded – undo
2406 2406
     global $tpl;
2407 2407
     global $locline, $bgcolor1, $bgcolor2;
2408 2408
 
2409
-    require_once __DIR__ . '/lib2/logic/geodb.inc.php';
2409
+    require_once __DIR__.'/lib2/logic/geodb.inc.php';
2410 2410
 
2411
-    $urlparamString = prepareLocSelectionForm($options) . '&locid={locid}';
2411
+    $urlparamString = prepareLocSelectionForm($options).'&locid={locid}';
2412 2412
 
2413 2413
     sql_temp_table_slave('locids');
2414
-    sql_slave("CREATE TEMPORARY TABLE &locids ENGINE=MEMORY " . $locSql);
2414
+    sql_slave("CREATE TEMPORARY TABLE &locids ENGINE=MEMORY ".$locSql);
2415 2415
     sql_slave("ALTER TABLE &locids ADD PRIMARY KEY (`loc_id`)");
2416 2416
 
2417 2417
     $rs = sql_slave(
@@ -2439,12 +2439,12 @@  discard block
 block discarded – undo
2439 2439
 
2440 2440
         $rb = GeoDb::regierungsbezirkFromLocid($r['loc_id']);
2441 2441
         if ($rb != '') {
2442
-            $locString .= ' &gt; ' . htmlspecialchars($rb, ENT_COMPAT, 'UTF-8');
2442
+            $locString .= ' &gt; '.htmlspecialchars($rb, ENT_COMPAT, 'UTF-8');
2443 2443
         }
2444 2444
 
2445 2445
         $lk = GeoDb::landkreisFromLocid($r['loc_id']);
2446 2446
         if ($lk != '') {
2447
-            $locString .= ' &gt; ' . htmlspecialchars($lk, ENT_COMPAT, 'UTF-8');
2447
+            $locString .= ' &gt; '.htmlspecialchars($lk, ENT_COMPAT, 'UTF-8');
2448 2448
         }
2449 2449
 
2450 2450
         $thislocation = mb_ereg_replace('{parentlocations}', $locString, $thislocation);
@@ -2459,9 +2459,9 @@  discard block
 block discarded – undo
2459 2459
             $r['loc_id']
2460 2460
         );
2461 2461
         if ($rCoords = sql_fetch_array($rsCoords)) {
2462
-            $coordString = help_latToDegreeStr($rCoords['lat']) . ' ' . help_lonToDegreeStr($rCoords['lon']);
2462
+            $coordString = help_latToDegreeStr($rCoords['lat']).' '.help_lonToDegreeStr($rCoords['lon']);
2463 2463
         } else {
2464
-            $coordString = '[' . $no_location_coords . ']';
2464
+            $coordString = '['.$no_location_coords.']';
2465 2465
         }
2466 2466
 
2467 2467
         $thislocation = mb_ereg_replace('{coords}', htmlspecialchars($coordString, ENT_COMPAT, 'UTF-8'), $thislocation);
@@ -2481,8 +2481,8 @@  discard block
 block discarded – undo
2481 2481
             $thislocation = mb_ereg_replace('{bgcolor}', $bgcolor2, $thislocation);
2482 2482
         }
2483 2483
 
2484
-        $nr ++;
2485
-        $locations .= $thislocation . "\n";
2484
+        $nr++;
2485
+        $locations .= $thislocation."\n";
2486 2486
     }
2487 2487
 
2488 2488
     $tpl->assign('locations', $locations);
Please login to merge, or discard this patch.
htdocs/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  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
 $sUserCountry = $login->getUserCountry();
11 11
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 $tpl->caching = true;
19 19
 $tpl->cache_lifetime = 300;
20
-$tpl->cache_id = $sUserCountry . '|' . $opt['page']['protocol'];
20
+$tpl->cache_id = $sUserCountry.'|'.$opt['page']['protocol'];
21 21
 
22 22
 if (!$tpl->is_cached()) {
23 23
     // welcome message
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         // build static maps url by inserting api key
119
-        $url = $opt['page']['protocol'] . strstr($opt['logic']['minimapurl'], '://');
119
+        $url = $opt['page']['protocol'].strstr($opt['logic']['minimapurl'], '://');
120 120
         $url = mb_ereg_replace('{gmkey}', $gmkey, $url);
121 121
 
122 122
         // put into template
Please login to merge, or discard this patch.
htdocs/xml/csv/cache.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-$opt['rootpath'] = __DIR__ . '/../../';
9
-require_once $opt['rootpath'] . 'lib2/web.inc.php';
10
-require_once $opt['rootpath'] . 'lib2/logic/cache.class.php';
8
+$opt['rootpath'] = __DIR__.'/../../';
9
+require_once $opt['rootpath'].'lib2/web.inc.php';
10
+require_once $opt['rootpath'].'lib2/logic/cache.class.php';
11 11
 
12 12
 header('Content-type: text/html; charset=utf-8');
13 13
 
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
     } else {
36 36
         echo $cache->getCacheId();
37 37
         echo ';';
38
-        echo '"' . mb_ereg_replace('"', '\"', $cache->getName()) . '"';
38
+        echo '"'.mb_ereg_replace('"', '\"', $cache->getName()).'"';
39 39
         echo ';';
40
-        echo '"' . mb_ereg_replace('"', '\"', $cache->getUsername()) . '"';
40
+        echo '"'.mb_ereg_replace('"', '\"', $cache->getUsername()).'"';
41 41
         echo ';';
42
-        echo '"' . mb_ereg_replace('"', '\"', $cache->getWPOC()) . '"';
42
+        echo '"'.mb_ereg_replace('"', '\"', $cache->getWPOC()).'"';
43 43
         echo ';';
44
-        echo '"' . mb_ereg_replace('"', '\"', $cache->getWPGC()) . '"';
44
+        echo '"'.mb_ereg_replace('"', '\"', $cache->getWPGC()).'"';
45 45
         echo ';';
46
-        echo '""';  // obsolete Navicache WP
46
+        echo '""'; // obsolete Navicache WP
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
htdocs/editlog.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
  *  Unicode Reminder メモ
14 14
  *****************************************************************************/
15 15
 
16
-require_once __DIR__ . '/lib/consts.inc.php';
16
+require_once __DIR__.'/lib/consts.inc.php';
17 17
 $opt['gui'] = GUI_HTML;
18
-require_once __DIR__ . '/lib/common.inc.php';
19
-require_once __DIR__ . '/lib2/logic/logtypes.inc.php';
20
-require_once __DIR__ . '/lib/recommendation.inc.php';
21
-require_once __DIR__ . '/lib2/edithelper.inc.php';
18
+require_once __DIR__.'/lib/common.inc.php';
19
+require_once __DIR__.'/lib2/logic/logtypes.inc.php';
20
+require_once __DIR__.'/lib/recommendation.inc.php';
21
+require_once __DIR__.'/lib2/edithelper.inc.php';
22 22
 
23 23
 //Preprocessing
24 24
 if ($error == false) {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         tpl_set_var('username', '');
35 35
         tpl_set_var('message_start', '');
36 36
         tpl_set_var('message_end', '');
37
-        tpl_set_var('target', 'editlog.php?logid=' . urlencode($log_id));
37
+        tpl_set_var('target', 'editlog.php?logid='.urlencode($log_id));
38 38
         tpl_set_var('message', $login_required);
39 39
         tpl_set_var('helplink', helppagelink('login'));
40 40
     } else {
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
         if (($log_record !== false && (($log_record['status'] != 6) || ($log_record['cache_user_id'] == $login->userid && $log_record['user_id'] == $login->userid)) &&
73 73
                 $log_record['status'] != 7) || $useradmin
74 74
         ) {
75
-            require $stylepath . '/editlog.inc.php';
76
-            require $stylepath . '/rating.inc.php';
75
+            require $stylepath.'/editlog.inc.php';
76
+            require $stylepath.'/rating.inc.php';
77 77
 
78 78
             if ($log_record['node'] != $oc_nodeid) {
79 79
                 tpl_errorMsg('editlog', $error_wrong_node);
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 
134 134
                 // check if user has exceeded his top 10% limit
135 135
                 $is_top = sqlValue(
136
-                    "SELECT COUNT(`cache_id`) FROM `cache_rating` WHERE `user_id`='" . sql_escape(
136
+                    "SELECT COUNT(`cache_id`) FROM `cache_rating` WHERE `user_id`='".sql_escape(
137 137
                         $usr['userid']
138
-                    ) . "' AND `cache_id`='" . sql_escape($log_record['cache_id']) . "'",
138
+                    )."' AND `cache_id`='".sql_escape($log_record['cache_id'])."'",
139 139
                     0
140 140
                 );
141 141
                 $user_founds = sqlValue(
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
                      LEFT JOIN `stat_user` ON `user`.`user_id`=`stat_user`.`user_id`
145 145
                      WHERE `user`.`user_id`='" . sql_escape(
146 146
                         $usr['userid']
147
-                    ) . "'",
147
+                    )."'",
148 148
                     0
149 149
                 );
150 150
                 $user_tops = sqlValue(
151
-                    "SELECT COUNT(`user_id`) FROM `cache_rating` WHERE `user_id`='" . sql_escape($usr['userid']) . "'",
151
+                    "SELECT COUNT(`user_id`) FROM `cache_rating` WHERE `user_id`='".sql_escape($usr['userid'])."'",
152 152
                     0
153 153
                 );
154 154
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     $rating_msg = mb_ereg_replace(
157 157
                         '{chk_sel}',
158 158
                         ($is_top ? 'checked' : ''),
159
-                        $rating_allowed . '<br />' . $rating_stat
159
+                        $rating_allowed.'<br />'.$rating_stat
160 160
                     );
161 161
                     $rating_msg = mb_ereg_replace('{max}', floor($user_founds * rating_percentage / 100), $rating_msg);
162 162
                     $rating_msg = mb_ereg_replace('{curr}', $user_tops, $rating_msg);
@@ -169,14 +169,14 @@  discard block
 block discarded – undo
169 169
                     }
170 170
 
171 171
                     if ($user_tops) {
172
-                        $rating_msg .= '<br />' . $rating_maywithdraw;
172
+                        $rating_msg .= '<br />'.$rating_maywithdraw;
173 173
                     }
174 174
                 }
175 175
 
176 176
                 tpl_set_var('rating_message', mb_ereg_replace('{rating_msg}', $rating_msg, $rating_tpl));
177 177
 
178 178
                 if (isset($_POST['descMode'])) {
179
-                    $descMode = $_POST['descMode'] + 0;  // Ocprop: 2
179
+                    $descMode = $_POST['descMode'] + 0; // Ocprop: 2
180 180
                     if (($descMode < 1) || ($descMode > 3)) {
181 181
                         $descMode = 3;
182 182
                     }
@@ -325,14 +325,14 @@  discard block
 block discarded – undo
325 325
                     if (is_latest_log($log_record['cache_id'], $log_record['log_id'])) {
326 326
                         $newstatus = sqlValue(
327 327
                             "SELECT `cache_status` FROM `log_types`
328
-                             WHERE `id`='" . sql_escape($log_type) . "'",
328
+                             WHERE `id`='" . sql_escape($log_type)."'",
329 329
                             false
330 330
                         );
331 331
                         if ($newstatus && $newstatus != $log_record['status']) {
332 332
                             sql("SET @STATUS_CHANGE_USER_ID='&1'", $login->userid);
333 333
                             sql(
334
-                                "UPDATE `caches` SET `status`='" . sql_escape($newstatus) . "'
335
-                                 WHERE `cache_id`='" . sql_escape($log_record['cache_id']) . "'"
334
+                                "UPDATE `caches` SET `status`='".sql_escape($newstatus)."'
335
+                                 WHERE `cache_id`='" . sql_escape($log_record['cache_id'])."'"
336 336
                             );
337 337
                         }
338 338
                     }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
                     //update user-stat if type changed
341 341
                     if ($log_record['logtype'] != $log_type) {
342 342
                         //call eventhandler
343
-                        require_once $opt['rootpath'] . 'lib/eventhandler.inc.php';
343
+                        require_once $opt['rootpath'].'lib/eventhandler.inc.php';
344 344
                         event_change_log_type($log_record['cache_id'], $usr['userid'] + 0);
345 345
                     }
346 346
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 
382 382
                     //display cache page
383 383
                     tpl_redirect(
384
-                        'viewcache.php?cacheid=' . urlencode($log_record['cache_id']) . '&log=A#log' . urlencode(
384
+                        'viewcache.php?cacheid='.urlencode($log_record['cache_id']).'&log=A#log'.urlencode(
385 385
                             $log_id
386 386
                         )
387 387
                     );
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
                 $logtypeoptions = '';
404 404
                 foreach ($allowed_logtypes as $logtype) {
405 405
                     $selected = ($log_record['logtype'] == $logtype ? ' selected="selected"' : '');
406
-                    $logtypeoptions .= '<option value="' . $logtype . '"' . $selected . '>';
406
+                    $logtypeoptions .= '<option value="'.$logtype.'"'.$selected.'>';
407 407
                     $logtypeoptions .= htmlspecialchars($logtype_names[$logtype], ENT_COMPAT, 'UTF-8');
408
-                    $logtypeoptions .= '</option>' . "\n";
408
+                    $logtypeoptions .= '</option>'."\n";
409 409
                 }
410 410
                 $disable_typechange = $disable_statuschange && $log_record['is_status_log'];
411 411
                 tpl_set_var('type_edit_disabled', $disable_typechange ? $type_edit_disabled : '');
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                 tpl_set_var('logminute', htmlspecialchars($log_time_minute, ENT_COMPAT, 'UTF-8'));
435 435
                 tpl_set_var('cachename', htmlspecialchars($cache_name, ENT_COMPAT, 'UTF-8'));
436 436
                 tpl_set_var('cacheid', $log_record['cache_id']);
437
-                tpl_set_var('reset', $reset);  // obsolete
437
+                tpl_set_var('reset', $reset); // obsolete
438 438
                 tpl_set_var('submit', $submit);
439 439
                 tpl_set_var('logid', $log_id);
440 440
                 tpl_set_var('date_message', !$date_ok ? $date_message : '');
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
                 // Text / normal HTML / HTML editor
449 449
                 tpl_set_var('use_tinymce', (($descMode == 3) ? 1 : 0));
450 450
 
451
-                $headers = tpl_get_var('htmlheaders') . "\n";
451
+                $headers = tpl_get_var('htmlheaders')."\n";
452 452
                 if ($descMode == 1) {
453 453
                     tpl_set_var('descMode', 1);
454 454
                 } else {
@@ -456,15 +456,15 @@  discard block
 block discarded – undo
456 456
                         tpl_set_var('descMode', 2);
457 457
                     } else {
458 458
                         // TinyMCE
459
-                        $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n";
460
-                        $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/log.js.php?logid=0&lang=' .
459
+                        $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n";
460
+                        $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/log.js.php?logid=0&lang='.
461 461
                             strtolower(
462 462
                                 $locale
463
-                            ) . '"></script>' . "\n";
463
+                            ).'"></script>'."\n";
464 464
                         tpl_set_var('descMode', 3);
465 465
                     }
466 466
                 }
467
-                $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
467
+                $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n";
468 468
                 tpl_set_var('htmlheaders', $headers);
469 469
 
470 470
                 if ($use_log_pw == true && $log_pw != '') {
@@ -485,12 +485,12 @@  discard block
 block discarded – undo
485 485
                             $tmp_smiley = $smiley_link;
486 486
                             $tmp_smiley = mb_ereg_replace('{smiley_image}', $smiley['image'][$i], $tmp_smiley);
487 487
                             $tmp_smiley = mb_ereg_replace('{smiley_symbol}', $smiley['text'][$i], $tmp_smiley);
488
-                            $smilies = $smilies . '&nbsp;' .
488
+                            $smilies = $smilies.'&nbsp;'.
489 489
                                 mb_ereg_replace(
490 490
                                     '{smiley_file}',
491 491
                                     $smiley['file'][$i],
492 492
                                     $tmp_smiley
493
-                                ) . '&nbsp;';
493
+                                ).'&nbsp;';
494 494
                         }
495 495
                     }
496 496
                     tpl_set_var('smileypath', $opt['template']['smiley']);
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
     $lastest_log_id = sqlValue(
518 518
         "
519 519
         SELECT `id` FROM `cache_logs`
520
-        WHERE `cache_id`='" . sql_escape($cache_id) . "'
520
+        WHERE `cache_id`='" . sql_escape($cache_id)."'
521 521
         ORDER BY `order_date` DESC, `date_created` DESC, `id` DESC
522 522
         LIMIT 1",
523 523
         0,
Please login to merge, or discard this patch.
htdocs/newcaches.php 1 patch
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,15 +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 = 'newcaches';
11 11
 $tpl->menuitem = MNU_START_NEWCACHES;
12 12
 $tpl->change_country_inpage = true;
13 13
 
14 14
 $startat = isset($_REQUEST['startat']) ? floor($_REQUEST['startat'] + 0) : 0;
15
-$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] :
16
-    (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
15
+$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
17 16
 $cachetype = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] + 0 : 0;
18 17
 $bEvents = ($cachetype == 6);
19 18
 
@@ -24,14 +23,14 @@  discard block
 block discarded – undo
24 23
 }
25 24
 
26 25
 $tpl->caching = true;
27
-$tpl->cache_id = $startat . "-" . $country . "-" . $cachetype;
26
+$tpl->cache_id = $startat."-".$country."-".$cachetype;
28 27
 $tpl->cache_lifetime = 300;
29 28
 if ($startat > 10 * $perpage) {
30 29
     $tpl->cache_lifetime = 3600;
31 30
 }
32 31
 
33 32
 if (!$tpl->is_cached()) {
34
-    $cachetype_condition = ($cachetype ? " AND `caches`.`type` = " . sql_escape($cachetype) : "");
33
+    $cachetype_condition = ($cachetype ? " AND `caches`.`type` = ".sql_escape($cachetype) : "");
35 34
     if ($bEvents) {
36 35
         $cachetype_condition .= " AND `date_hidden` >= curdate()";
37 36
     }
@@ -50,14 +49,14 @@  discard block
 block discarded – undo
50 49
             INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id`
51 50
              LEFT JOIN `countries` ON `countries`.`short` = `caches`.`country`
52 51
              LEFT JOIN `sys_trans_text` ON `sys_trans_text`.`trans_id` = `countries`.`trans_id`
53
-                       AND `sys_trans_text`.`lang` = '" . sql_escape($opt['template']['locale']) . "'
52
+                       AND `sys_trans_text`.`lang` = '".sql_escape($opt['template']['locale'])."'
54 53
              LEFT JOIN `caches_attributes` `ca`
55 54
                   ON `ca`.`cache_id`=`caches`.`cache_id`
56 55
                   AND `ca`.`attrib_id`=6
57
-             WHERE `caches`.`status` = 1" . ($country ? " AND `caches`.`country`='" . sql_escape($country) . "'" : "") .
58
-        $cachetype_condition . "
56
+             WHERE `caches`.`status` = 1" . ($country ? " AND `caches`.`country`='".sql_escape($country)."'" : "").
57
+        $cachetype_condition."
59 58
               ORDER BY `caches`.`$date_field` $sort_order
60
-                   LIMIT " . sprintf("%d", $startat) . ',
59
+                   LIMIT ".sprintf("%d", $startat).',
61 60
                    ' . ($perpage + 0)
62 61
     );
63 62
     // see also write_newcaches_urls() in sitemap.class.php
@@ -70,8 +69,8 @@  discard block
 block discarded – undo
70 69
     $startat = isset($_REQUEST['startat']) ? $_REQUEST['startat'] + 0 : 0;
71 70
     $cacheype_par = ($cachetype ? "&cachetype=$cachetype" : "");
72 71
     if ($country == '') {
73
-        $count = sql_value_slave("SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1" . $cachetype_condition, 0);
74
-        $pager = new pager("newcaches.php?startat={offset}" . $cacheype_par);
72
+        $count = sql_value_slave("SELECT COUNT(*) FROM `caches` WHERE `caches`.`status`=1".$cachetype_condition, 0);
73
+        $pager = new pager("newcaches.php?startat={offset}".$cacheype_par);
75 74
     } else {
76 75
         $count = sql_value_slave(
77 76
             "SELECT COUNT(*)
@@ -81,7 +80,7 @@  discard block
 block discarded – undo
81 80
             0,
82 81
             $country
83 82
         );
84
-        $pager = new pager("newcaches.php?country=" . $country . "&startat={offset}" . $cacheype_par);
83
+        $pager = new pager("newcaches.php?country=".$country."&startat={offset}".$cacheype_par);
85 84
     }
86 85
     $pager->make_from_offset($startat, $count, 100);
87 86
 
Please login to merge, or discard this patch.
htdocs/okapi_settings.php 1 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/a.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,4 @@
 block discarded – undo
7 7
  *  Activation page shortcut to keep URLs in activation Emails short
8 8
  ***************************************************************************/
9 9
 
10
-require __DIR__ . '/activation.php';
10
+require __DIR__.'/activation.php';
Please login to merge, or discard this patch.
htdocs/log.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 }
12 12
 
13 13
 // include librarys
14
-require __DIR__ . '/lib2/web.inc.php';
15
-require_once __DIR__ . '/lib2/logic/cache.class.php';
16
-require_once __DIR__ . '/lib2/logic/user.class.php';
17
-require_once __DIR__ . '/lib2/logic/cachelog.class.php';
18
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require __DIR__.'/lib2/web.inc.php';
15
+require_once __DIR__.'/lib2/logic/cache.class.php';
16
+require_once __DIR__.'/lib2/logic/user.class.php';
17
+require_once __DIR__.'/lib2/logic/cachelog.class.php';
18
+require_once __DIR__.'/lib2/edithelper.inc.php';
19 19
 
20 20
 // prepare template and menue
21 21
 $tpl->name = 'log_cache';
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     // get logtext editormode (from form or from userprofile)
122 122
     // 1 = text; 2 = HTML; 3 = tinyMCE
123 123
     if (isset($_POST['descMode'])) {
124
-        $descMode = $_POST['descMode'] + 0;  // Ocprop: 2
124
+        $descMode = $_POST['descMode'] + 0; // Ocprop: 2
125 125
         if (($descMode < 1) || ($descMode > 3)) {
126 126
             $descMode = 3;
127 127
         }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     if ($descMode == 3) {
147 147
         $tpl->add_header_javascript('resource2/tinymce/tiny_mce_gzip.js');
148 148
         $tpl->add_header_javascript(
149
-            'resource2/tinymce/config/log.js.php?lang=' . strtolower($opt['template']['locale'])
149
+            'resource2/tinymce/config/log.js.php?lang='.strtolower($opt['template']['locale'])
150 150
         );
151 151
     }
152 152
     $tpl->add_header_javascript(editorJsPath());
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     if (is_numeric($logDateMonth)
159 159
         && is_numeric($logDateDay)
160 160
         && is_numeric($logDateYear)
161
-        && ($logTimeHour . $logTimeMinute == "" || is_numeric($logTimeHour))
161
+        && ($logTimeHour.$logTimeMinute == "" || is_numeric($logTimeHour))
162 162
         && ($logTimeMinute == "" || is_numeric($logTimeMinute))
163 163
     ) {
164 164
         $validate['dateOk'] = checkdate($logDateMonth, $logDateDay, $logDateYear)
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
          * set seconds 00:00:01, means "00:00 was logged"
224 224
          * set seconds 00:00:00, means "no time was logged"
225 225
          */
226
-        $logTimeSecond = ($logTimeHour . $logTimeMinute != ""
226
+        $logTimeSecond = ($logTimeHour.$logTimeMinute != ""
227 227
                 && $logTimeHour == 0
228 228
                 && $logTimeMinute == 0) + 0;
229 229
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         }
280 280
 
281 281
         // finished, redirect to listing
282
-        $tpl->redirect('viewcache.php?cacheid=' . $cache->getCacheId());
282
+        $tpl->redirect('viewcache.php?cacheid='.$cache->getCacheId());
283 283
     }
284 284
 
285 285
     // assign values to template
Please login to merge, or discard this patch.