@@ -19,9 +19,12 @@ discard block |
||
19 | 19 | require $stylepath . '/editdesc.inc.php'; |
20 | 20 | |
21 | 21 | // check for old-style parameters |
22 | - if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) // Ocprop |
|
22 | + if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) { |
|
23 | + // Ocprop |
|
23 | 24 | { |
24 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
25 | + $cache_id = $_REQUEST['cacheid']; |
|
26 | + } |
|
27 | + // Ocprop |
|
25 | 28 | $desc_lang = $_REQUEST['desclang']; // Ocprop |
26 | 29 | |
27 | 30 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
@@ -87,10 +90,13 @@ discard block |
||
87 | 90 | $show_all_langs = false; |
88 | 91 | |
89 | 92 | //save to DB? |
90 | - if (isset($_POST['post'])) // Ocprop |
|
93 | + if (isset($_POST['post'])) { |
|
94 | + // Ocprop |
|
91 | 95 | { |
92 | 96 | //here we read all used information from the form if submitted |
93 | - $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
97 | + $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; |
|
98 | + } |
|
99 | + // Ocprop |
|
94 | 100 | |
95 | 101 | // fuer alte Versionen von OCProp |
96 | 102 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -147,7 +153,8 @@ discard block |
||
147 | 153 | |
148 | 154 | $desc = processEditorInput($oldDescMode, $descMode, $desc); |
149 | 155 | |
150 | - if (isset($_POST['submitform'])) // Ocprop |
|
156 | + if (isset($_POST['submitform'])) { |
|
157 | + // Ocprop |
|
151 | 158 | { |
152 | 159 | // prüfen, ob sprache nicht schon vorhanden |
153 | 160 | $rs = sql( |
@@ -160,6 +167,7 @@ discard block |
||
160 | 167 | $descid, |
161 | 168 | $desclang |
162 | 169 | ); |
170 | + } |
|
163 | 171 | $r = sql_fetch_array($rs); |
164 | 172 | if ($r['count'] > 0) { |
165 | 173 | tpl_errorMsg('editdesc', $error_desc_exists); |
@@ -224,8 +232,7 @@ discard block |
||
224 | 232 | |
225 | 233 | if ($oldDescMode == 0) { |
226 | 234 | $desc = processEditorInput($oldDescMode, $descMode, $desc_record['desc']); |
227 | - } |
|
228 | - else { |
|
235 | + } else { |
|
229 | 236 | $desc = $desc_record['desc']; |
230 | 237 | } |
231 | 238 | } |
@@ -9,20 +9,20 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | if (!isset($counter[$name])) { |
33 | 33 | $counter[$name] = 0; |
34 | 34 | } |
35 | - $counter[$name] ++; |
|
35 | + $counter[$name]++; |
|
36 | 36 | |
37 | 37 | if ($smarty->_cache_including) { |
38 | 38 | $param = isset($smarty->_cache_info['cached_vars'][$name][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name][$counter[$name]] : []; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | ]; |
81 | 81 | |
82 | 82 | $nTimestamp = time(); |
83 | - for ($nIndex = 0; $nIndex < count($seasons); $nIndex ++) { |
|
83 | + for ($nIndex = 0; $nIndex < count($seasons); $nIndex++) { |
|
84 | 84 | if (strtotime($seasons[$nIndex][0]) > $nTimestamp) { |
85 | 85 | return $params['winter']; |
86 | 86 | } //''; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
55 | 55 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
57 | - => $opt['html_purifier'], |
|
57 | + => $opt['html_purifier'], |
|
58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
59 | 59 | ); |
60 | 60 | } |
@@ -16,24 +16,24 @@ discard block |
||
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 |
||
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'], |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | - if (isset($_REQUEST['lang'])) { |
|
2 | + if (isset($_REQUEST['lang'])) { |
|
3 | 3 | $lang = $_REQUEST['lang']; |
4 | - } |
|
5 | - else { |
|
4 | + } |
|
5 | + else { |
|
6 | 6 | $lang = 'de'; |
7 | - } |
|
7 | + } |
|
8 | 8 | ?> |
9 | 9 | tinyMCE_GZ.init({ |
10 | 10 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | function imageBrowser(field_name, url, type, win) |
49 | 49 | { |
50 | - window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid']+0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
50 | + window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid'] + 0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
51 | 51 | fileBrowserWin = win; |
52 | 52 | fileBrowserFieldName = field_name; |
53 | 53 | } |
@@ -1,8 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | if (isset($_REQUEST['lang'])) { |
3 | 3 | $lang = $_REQUEST['lang']; |
4 | - } |
|
5 | - else { |
|
4 | + } else { |
|
6 | 5 | $lang = 'de'; |
7 | 6 | } |
8 | 7 | ?> |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | - if (isset($_REQUEST['cacheid'])) { |
|
2 | + if (isset($_REQUEST['cacheid'])) { |
|
3 | 3 | $cacheID = $_REQUEST['cacheid']; |
4 | - } |
|
5 | - else { |
|
4 | + } |
|
5 | + else { |
|
6 | 6 | $cacheID = 0; |
7 | - } |
|
8 | - if (isset($_REQUEST['lang'])) { |
|
7 | + } |
|
8 | + if (isset($_REQUEST['lang'])) { |
|
9 | 9 | $lang = $_REQUEST['lang']; |
10 | - } |
|
11 | - else { |
|
10 | + } |
|
11 | + else { |
|
12 | 12 | $lang = 'de'; |
13 | - } |
|
13 | + } |
|
14 | 14 | ?> |
15 | 15 | tinyMCE_GZ.init({ |
16 | 16 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | function imageBrowser(field_name, url, type, win) |
55 | 55 | { |
56 | - window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID+0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
56 | + window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID + 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
57 | 57 | fileBrowserWin = win; |
58 | 58 | fileBrowserFieldName = field_name; |
59 | 59 | } |
@@ -1,14 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | if (isset($_REQUEST['cacheid'])) { |
3 | 3 | $cacheID = $_REQUEST['cacheid']; |
4 | - } |
|
5 | - else { |
|
4 | + } else { |
|
6 | 5 | $cacheID = 0; |
7 | 6 | } |
8 | 7 | if (isset($_REQUEST['lang'])) { |
9 | 8 | $lang = $_REQUEST['lang']; |
10 | - } |
|
11 | - else { |
|
9 | + } else { |
|
12 | 10 | $lang = 'de'; |
13 | 11 | } |
14 | 12 | ?> |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | - if (isset($_REQUEST['lang'])) |
|
2 | + if (isset($_REQUEST['lang'])) |
|
3 | 3 | $lang = $_REQUEST['lang']; |
4 | - else |
|
4 | + else |
|
5 | 5 | $lang = 'de'; |
6 | 6 | ?> |
7 | 7 |
@@ -1,9 +1,10 @@ |
||
1 | 1 | <?php |
2 | - if (isset($_REQUEST['lang'])) |
|
3 | - $lang = $_REQUEST['lang']; |
|
4 | - else |
|
5 | - $lang = 'de'; |
|
6 | -?> |
|
2 | + if (isset($_REQUEST['lang'])) { |
|
3 | + $lang = $_REQUEST['lang']; |
|
4 | + } else { |
|
5 | + $lang = 'de'; |
|
6 | + } |
|
7 | + ?> |
|
7 | 8 | |
8 | 9 | tinyMCE_GZ.init({ |
9 | 10 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -55,8 +55,7 @@ |
||
55 | 55 | $text = isset($_REQUEST['text']) ? $_REQUEST['text'] : ''; |
56 | 56 | if (isset($_REQUEST['emailaddress'])) { |
57 | 57 | $bEmailaddress = ($_REQUEST['emailaddress'] == 1); |
58 | -} |
|
59 | -else { |
|
58 | +} else { |
|
60 | 59 | $own_user = new user($login->userid); |
61 | 60 | $bEmailaddress = $own_user->getUsermailSendAddress(); |
62 | 61 | } |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'mailto'; |
11 | 11 | $tpl->menuitem = MNU_USER_MAILTO; |
12 | 12 | |
13 | 13 | $login->verify(); |
14 | 14 | if ($login->userid == 0) { |
15 | - $tpl->redirect('login.php?target=' . urlencode($tpl->target)); |
|
15 | + $tpl->redirect('login.php?target='.urlencode($tpl->target)); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $wp = $_REQUEST['wp']; |
37 | 37 | $cachename = trim(sql_value("SELECT `name` FROM `caches` WHERE `wp_oc`='&1'", '', $wp)); |
38 | 38 | if ($cachename) { |
39 | - $subject = $translate->t('Your geocache', '', 0, 0) . ' "' . $cachename . '" (' . $wp . ')'; |
|
39 | + $subject = $translate->t('Your geocache', '', 0, 0).' "'.$cachename.'" ('.$wp.')'; |
|
40 | 40 | } |
41 | 41 | } elseif (isset($_REQUEST['reportid']) && $login->admin) { |
42 | 42 | $rs = sql( |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $_REQUEST['reportid'] |
48 | 48 | ); |
49 | 49 | if ($r = sql_fetch_assoc($rs)) { |
50 | - $subject = $translate->t('Your geocache report for', '', 0, 0) . ' ' . $r['wp_oc'] . ' (' . $r['name'] . ')'; |
|
50 | + $subject = $translate->t('Your geocache report for', '', 0, 0).' '.$r['wp_oc'].' ('.$r['name'].')'; |
|
51 | 51 | } |
52 | 52 | sql_free_result($rs); |
53 | 53 | } |
@@ -30,7 +30,7 @@ |
||
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`, |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | const FOR_STARTPAGE_GALLERY = 1; |
18 | 18 | const FOR_NEWPICS_GALLERY = 2; |
19 | 19 | const FOR_USER_STAT = 3; |
20 | - const FOR_USER_GALLERY = 4; // params: userid |
|
20 | + const FOR_USER_GALLERY = 4; // params: userid |
|
21 | 21 | const FOR_MYHOME_GALLERY = 5; |
22 | - const FOR_CACHE_STAT = 6; // params: cacheid |
|
23 | - const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
22 | + const FOR_CACHE_STAT = 6; // params: cacheid |
|
23 | + const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
24 | 24 | |
25 | - const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
25 | + const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
26 | 26 | |
27 | 27 | |
28 | 28 | public static function get($purpose, $userid = 0, $cacheid = 0) |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $pictures = self::get($purpose, $userid, $cacheid); |
233 | 233 | $tpl->assign('pictures', array_slice($pictures, $startat, self::MAX_PICTURES_PER_GALLERY_PAGE)); |
234 | 234 | |
235 | - $pager = new pager($url . "&startat={offset}"); |
|
235 | + $pager = new pager($url."&startat={offset}"); |
|
236 | 236 | $pager->make_from_offset($startat, count($pictures), self::MAX_PICTURES_PER_GALLERY_PAGE); |
237 | 237 | } |
238 | 238 |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | // only a few percent of caches. We must rely on fast data caching. |
64 | 64 | |
65 | 65 | $rs = sql_slave( |
66 | - "SELECT |
|
66 | + "select |
|
67 | 67 | $fields, |
68 | 68 | `user`.`username`, |
69 | 69 | `pics`.`date_created` AS `picdate` |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | // This saves us one grouped subquery. |
100 | 100 | |
101 | 101 | $rs = sql_slave( |
102 | - "SELECT $fields, `user`.`username`, `pics`.`date_created` AS `picdate` |
|
102 | + "select $fields, `user`.`username`, `pics`.`date_created` AS `picdate` |
|
103 | 103 | FROM |
104 | 104 | (SELECT `uuid`, `url`, `title`, `date_created`, `object_id` |
105 | 105 | FROM `pictures` |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | // all pics of one user, except spoilers and invisibles |
139 | 139 | |
140 | 140 | $rs = sql( |
141 | - "SELECT $fields, `logs`.`date` AS `picdate` |
|
141 | + "select $fields, `logs`.`date` AS `picdate` |
|
142 | 142 | FROM `pictures` `pics` |
143 | 143 | $join_logs |
144 | 144 | $join_caches |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | // by an old log deletion (we should remove those ...) |
155 | 155 | |
156 | 156 | $rs = sql( |
157 | - "SELECT $fields, `logs`.`date` AS `picdate` |
|
157 | + "select $fields, `logs`.`date` AS `picdate` |
|
158 | 158 | FROM `pictures` AS `pics` |
159 | 159 | $join_logs |
160 | 160 | WHERE `object_type`=1 AND `logs`.`user_id`='&1' |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | // in listing view |
192 | 192 | |
193 | 193 | $rs = sql( |
194 | - "SELECT $fields, `user`.`username`, `logs`.`date` AS `picdate` |
|
194 | + "select $fields, `user`.`username`, `logs`.`date` AS `picdate` |
|
195 | 195 | FROM `pictures` AS `pics` |
196 | 196 | $join_logs |
197 | 197 | $join_user |