Completed
Push — master ( c2d7ad...3f78da )
by Thomas
07:29
created
htdocs/lib/eventhandler.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     $userid = $userid + 0;
22 22
 
23 23
     // data changed - delete statpic of user, if exists - will be recreated on next request
24
-    if (file_exists('./images/statpics/statpic' . $userid . '.jpg')) {
25
-        unlink('./images/statpics/statpic' . $userid . '.jpg');
24
+    if (file_exists('./images/statpics/statpic'.$userid.'.jpg')) {
25
+        unlink('./images/statpics/statpic'.$userid.'.jpg');
26 26
     }
27 27
 }
28 28
 
Please login to merge, or discard this patch.
htdocs/lib/settings-dist.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $style = 'ocstyle';
32 32
 
33 33
 // include common settings of lib1 and lib2
34
-require_once $rootpath . 'config2/settings-dist-common.inc.php';
34
+require_once $rootpath.'config2/settings-dist-common.inc.php';
35 35
 
36 36
 //id of the node; see list in config2/settings-dist.inc.php
37 37
 $oc_nodeid = 0;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 // sql debugging
128 128
 $sql_allow_debug = 0;
129
-$sql_debug_cryptkey = 'this is my very, very secret \'secret key\'';  // min. 24 chars
129
+$sql_debug_cryptkey = 'this is my very, very secret \'secret key\''; // min. 24 chars
130 130
 
131 131
 // replacements for sql()
132 132
 $sql_replacements['db'] = $dbname;
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 
149 149
 /* default locale
150 150
  */
151
-$opt['template']['default']['locale'] = 'DE';   // can be overwritten by $opt['domain'][<domain>]['locale']
151
+$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale']
152 152
 
153 153
 // include all locale settings
154
-require_once $rootpath . 'config2/locale.inc.php';
154
+require_once $rootpath.'config2/locale.inc.php';
155 155
 
156 156
 /* replicated slave databases
157 157
  * use same config as in config2/settings.inc.php (!)
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         'menustring' => t('Geokrety'),
199 199
         'siteid' => 'geokrety',
200 200
         'visible' => true,
201
-        'filename' => 'http://geokrety.org/index.php?lang=' . (isset($locale) ? strtolower($locale) : 'de')
201
+        'filename' => 'http://geokrety.org/index.php?lang='.(isset($locale) ? strtolower($locale) : 'de')
202 202
     ];
203 203
 
204 204
     $menu[] = [
Please login to merge, or discard this patch.
htdocs/lib/auth.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * Dont include this file by hand - it will be included from common.inc.php
17 17
  ****************************************************************************/
18 18
 
19
-require $opt['rootpath'] . 'lib/login.class.php';
19
+require $opt['rootpath'].'lib/login.class.php';
20 20
 
21 21
 $autherr = 0;
22 22
 define('AUTHERR_NOERROR', 0);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     if ($login->userid != 0) {
37 37
         //set up $usr array
38 38
         $usr['userid'] = $login->userid;
39
-        $usr['email'] = sqlValue("SELECT `email` FROM `user` WHERE `user_id`='" . sql_escape($login->userid) . "'", '');
39
+        $usr['email'] = sqlValue("SELECT `email` FROM `user` WHERE `user_id`='".sql_escape($login->userid)."'", '');
40 40
         $usr['username'] = $login->username;
41 41
         $usr['admin'] = $login->admin;
42 42
     } else {
Please login to merge, or discard this patch.
htdocs/lib/settings-dev.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 //relative path to the root directory
21 21
 if (!isset($rootpath)) {
22
-    $rootpath = dirname(__FILE__) . '/../';
22
+    $rootpath = dirname(__FILE__).'/../';
23 23
 }
24 24
 
25 25
 //default used language
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $style = 'ocstyle';
37 37
 
38 38
 // include common settings of lib1 and lib2
39
-require_once $rootpath . 'config2/settings-dist-common.inc.php';
39
+require_once $rootpath.'config2/settings-dist-common.inc.php';
40 40
 
41 41
 //id of the node; see config2/settings-dist.inc.php
42 42
 $oc_nodeid = 4;
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
     $maildomain = 'local.opencaching.de';
75 75
 }
76 76
 if (!isset($emailaddr)) {
77
-    $emailaddr = 'root@' . $maildomain;
77
+    $emailaddr = 'root@'.$maildomain;
78 78
 }
79 79
 if (!isset($opt['mail']['contact'])) {
80
-    $opt['mail']['contact'] = 'contact@' . $maildomain;
80
+    $opt['mail']['contact'] = 'contact@'.$maildomain;
81 81
 }
82 82
 
83 83
 // news settings
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 // safemode_zip-binary
108 108
 $safemode_zip = '/var/www/bin/phpzip.php';
109
-$zip_basedir = $dev_basepath . ($dev_codepath == '*' ? '' : $dev_codepath . 'htdocs/') . 'download/zip/';
109
+$zip_basedir = $dev_basepath.($dev_codepath == '*' ? '' : $dev_codepath.'htdocs/').'download/zip/';
110 110
 $zip_wwwdir = 'download/zip/';
111 111
 
112 112
 $googlemap_key = "<key>";
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
 /* maximum number of failed logins per hour before that IP address is blocked
118 118
  * (used to prevent brute-force-attacks)
119 119
  */
120
-$opt['page']['max_logins_per_hour'] = 1000;    // for development ...
120
+$opt['page']['max_logins_per_hour'] = 1000; // for development ...
121 121
 $opt['page']['headoverlay'] = 'oc_head_alpha3';
122 122
 
123 123
 // data license
124
-$opt['logic']['license']['disclaimer'] = true;   // also in lib2/settings-dist.inc.php
125
-$opt['logic']['license']['terms'] = $absolute_server_URI . 'articles.php?page=impressum#datalicense';
124
+$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php
125
+$opt['logic']['license']['terms'] = $absolute_server_URI.'articles.php?page=impressum#datalicense';
126 126
 
127 127
 $opt['logic']['admin']['listingadmin_notification'] = 'root';
128 128
 
129 129
 // include all locale settings
130
-require_once $rootpath . 'config2/locale.inc.php';
130
+require_once $rootpath.'config2/locale.inc.php';
131 131
 
132 132
 /* replicated slave databases
133 133
  * use same config as in config2/settings.inc.php (!)
Please login to merge, or discard this patch.
htdocs/lib/settings-sample-vagrant.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
 // database names
20 20
 $dbname = 'opencaching';
21
-$tmpdbname = 'octmp';   // empty db with CREATE and DROP privileges
21
+$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges
22 22
 
23 23
 // common developer system settings
24 24
 require 'settings-dev.inc.php';
Please login to merge, or discard this patch.
htdocs/lib/logic.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     return sqlValue(
16 16
         "SELECT IFNULL(`stt`.`text`, `cache_type`.`en`)
17 17
          FROM `cache_type`
18
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_type`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
19
-         WHERE `cache_type`.`id`='" . sql_escape($cachetype) . "'",
18
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_type`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
19
+         WHERE `cache_type`.`id`='" . sql_escape($cachetype)."'",
20 20
         ''
21 21
     );
22 22
 }
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
     return sqlValue(
27 27
         "SELECT IFNULL(`stt`.`text`, `cache_size`.`en`)
28 28
          FROM `cache_size`
29
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_size`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
30
-         WHERE `cache_size`.`id`='" . sql_escape($cachesize) . "'",
29
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_size`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
30
+         WHERE `cache_size`.`id`='" . sql_escape($cachesize)."'",
31 31
         ''
32 32
     );
33 33
 }
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     return sqlValue(
38 38
         "SELECT IFNULL(`stt`.`text`, `log_types`.`en`)
39 39
          FROM `log_types`
40
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`log_types`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
41
-         WHERE `log_types`.`id`='" . sql_escape($logtype) . "'",
40
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`log_types`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
41
+         WHERE `log_types`.`id`='" . sql_escape($logtype)."'",
42 42
         ''
43 43
     );
44 44
 }
Please login to merge, or discard this patch.
htdocs/adoptcache.php 1 patch
Spacing   +4 added lines, -4 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
 $tpl->name = 'adoptcache';
11 11
 $tpl->menuitem = MNU_CACHES_ADOPT;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
     $adopt_result = $cache->addAdoption($userid);
175 175
     if ($adopt_result === true) {
176
-        $tpl->redirect('adoptcache.php?action=listbycache&cacheid=' . $cacheid);
176
+        $tpl->redirect('adoptcache.php?action=listbycache&cacheid='.$cacheid);
177 177
     } else {
178 178
         $tpl->assign('error', $adopt_result);
179 179
         listRequestsByCacheId($cacheid);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $tpl->error(ERROR_UNKNOWN);
195 195
     }
196 196
 
197
-    $tpl->redirect('viewcache.php?cacheid=' . $cacheid);
197
+    $tpl->redirect('viewcache.php?cacheid='.$cacheid);
198 198
 }
199 199
 
200 200
 function cancelRequest($cacheid, $userid)
@@ -218,6 +218,6 @@  discard block
 block discarded – undo
218 218
     if ($userid == $login->userid) {
219 219
         $tpl->redirect('adoptcache.php');
220 220
     } else {
221
-        $tpl->redirect('adoptcache.php?action=listbycache&cacheid=' . $cacheid);
221
+        $tpl->redirect('adoptcache.php?action=listbycache&cacheid='.$cacheid);
222 222
     }
223 223
 }
Please login to merge, or discard this patch.
htdocs/viewprofile.php 1 patch
Spacing   +4 added lines, -4 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
 $tpl->name = 'viewprofile';
11 11
 $tpl->menuitem = MNU_CACHES_USERPROFILE;
@@ -291,14 +291,14 @@  discard block
 block discarded – undo
291 291
 }
292 292
 
293 293
 if ($show_oconly81) {
294
-    require __DIR__ . '/lib2/logic/oconly81.inc.php';
294
+    require __DIR__.'/lib2/logic/oconly81.inc.php';
295 295
     set_oconly81_tpldata($userid);
296 296
 }
297 297
 
298 298
 //Titel
299 299
 $menu->SetSelectItem($tpl->menuitem);
300 300
 
301
-$tpl->title = $menu->GetMenuTitle() . " " . $record['username'];
301
+$tpl->title = $menu->GetMenuTitle()." ".$record['username'];
302 302
 
303 303
 
304 304
 $tpl->assign('username', $record['username']);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     if (!$allpics) {
330 330
         $tpl->assign('logpics', LogPics::get(LogPics::FOR_USER_STAT, $userid));
331 331
     } else {
332
-        LogPics::setPaging(LogPics::FOR_USER_GALLERY, $userid, 0, "viewprofile.php?userid=" . $userid . "&allpics=1");
332
+        LogPics::setPaging(LogPics::FOR_USER_GALLERY, $userid, 0, "viewprofile.php?userid=".$userid."&allpics=1");
333 333
         $tpl->name = 'viewprofile_pics';
334 334
         // actually we dont need all the other stuff here ..
335 335
     }
Please login to merge, or discard this patch.
htdocs/editdesc.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,20 +9,20 @@  discard block
 block discarded – undo
9 9
  *  Unicode Reminder メモ
10 10
  *****************************************************************************/
11 11
 
12
-require_once __DIR__ . '/lib/consts.inc.php';
12
+require_once __DIR__.'/lib/consts.inc.php';
13 13
 $opt['gui'] = GUI_HTML;
14
-require_once __DIR__ . '/lib/common.inc.php';
15
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require_once __DIR__.'/lib/common.inc.php';
15
+require_once __DIR__.'/lib2/edithelper.inc.php';
16 16
 
17 17
 // Preprocessing
18 18
 if ($error == false) {
19
-    require $stylepath . '/editdesc.inc.php';
19
+    require $stylepath.'/editdesc.inc.php';
20 20
 
21 21
     // check for old-style parameters
22 22
     if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))  // Ocprop
23 23
     {
24
-        $cache_id = $_REQUEST['cacheid'];  // Ocprop
25
-        $desc_lang = $_REQUEST['desclang'];  // Ocprop
24
+        $cache_id = $_REQUEST['cacheid']; // Ocprop
25
+        $desc_lang = $_REQUEST['desclang']; // Ocprop
26 26
 
27 27
         $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
28 28
         if (mysql_num_rows($rs) == 1) {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $tplname = 'login';
44 44
 
45 45
         tpl_set_var('username', '');
46
-        tpl_set_var('target', htmlspecialchars('editdesc.php?descid=' . urlencode($descid), ENT_COMPAT, 'UTF-8'));
46
+        tpl_set_var('target', htmlspecialchars('editdesc.php?descid='.urlencode($descid), ENT_COMPAT, 'UTF-8'));
47 47
         tpl_set_var('message_start', "");
48 48
         tpl_set_var('message_end', "");
49 49
         tpl_set_var('message', $login_required);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if (isset($_POST['post']))  // Ocprop
91 91
                 {
92 92
                     //here we read all used information from the form if submitted
93
-                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1;  // Ocprop
93
+                    $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop
94 94
 
95 95
                     // fuer alte Versionen von OCProp
96 96
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                         $oldDescMode = $descMode;
124 124
                     }
125 125
 
126
-                    $short_desc = $_POST['short_desc'];  // Ocprop
126
+                    $short_desc = $_POST['short_desc']; // Ocprop
127 127
                     $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8');
128 128
                     $desclang = $_POST['desclang'];
129 129
                     $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     }
139 139
 
140 140
                     // Text from textarea
141
-                    $desc = $_POST['desc'];  // Ocprop
141
+                    $desc = $_POST['desc']; // Ocprop
142 142
 
143 143
                     // fuer alte Versionen von OCProp
144 144
                     if (isset($_POST['submit']) && !isset($_POST['version2'])) {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                         db_slave_exclude();
208 208
 
209 209
                         // redirect to cachepage
210
-                        tpl_redirect('editcache.php?cacheid=' . urlencode($desc_record['cache_id']));
210
+                        tpl_redirect('editcache.php?cacheid='.urlencode($desc_record['cache_id']));
211 211
                         exit;
212 212
                     } elseif (isset($_POST['show_all_langs'])) {
213 213
                         $show_all_langs = true;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                     ($show_all_langs == true) ? 1 : 0);
278 278
                 while ($rLanguage = sql_fetch_assoc($rsLanguages)) {
279 279
                     $sSelected = ($rLanguage['short'] == $desc_lang) ? ' selected="selected"' : '';
280
-                    $languages .= '<option value="' . $rLanguage['short'] . '"' . $sSelected . '>' . htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
280
+                    $languages .= '<option value="'.$rLanguage['short'].'"'.$sSelected.'>'.htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n";
281 281
                 }
282 282
                 sql_free_result($rsLanguages);
283 283
 
@@ -297,20 +297,20 @@  discard block
 block discarded – undo
297 297
                 tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8'));
298 298
                 tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8'));
299 299
                 tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8'));
300
-                tpl_set_var('reset', $reset);  // obsolete
300
+                tpl_set_var('reset', $reset); // obsolete
301 301
                 tpl_set_var('submit', $submit);
302 302
 
303 303
                 // Text / normal HTML / HTML editor
304 304
                 tpl_set_var('use_tinymce', ($desc_htmledit == 1) ? 1 : 0);
305 305
 
306
-                $headers = tpl_get_var('htmlheaders') . "\n";
306
+                $headers = tpl_get_var('htmlheaders')."\n";
307 307
                 if (($desc_html == 1) && ($desc_htmledit == 1)) {
308 308
                     // TinyMCE
309
-                    $headers = tpl_get_var('htmlheaders') . "\n";
310
-                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n";
311
-                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=' . ($desc_record['cache_id'] + 0) . '&lang=' . strtolower($locale) . '"></script>' . "\n";
309
+                    $headers = tpl_get_var('htmlheaders')."\n";
310
+                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n";
311
+                    $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid='.($desc_record['cache_id'] + 0).'&lang='.strtolower($locale).'"></script>'."\n";
312 312
                 }
313
-                $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
313
+                $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n";
314 314
                 tpl_set_var('htmlheaders', $headers);
315 315
             } else {
316 316
                 // @todo: not the owner
Please login to merge, or discard this patch.