@@ -18,7 +18,7 @@ |
||
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'; |
@@ -15,8 +15,8 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -51,7 +51,8 @@ discard block |
||
51 | 51 | $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop |
52 | 52 | |
53 | 53 | // read descMode; if not set, initialize from user profile |
54 | - if (isset($_POST['descMode'])) { // Ocprop |
|
54 | + if (isset($_POST['descMode'])) { |
|
55 | +// Ocprop |
|
55 | 56 | $descMode = $_POST['descMode'] + 0; |
56 | 57 | if (($descMode < 1) || ($descMode > 3)) { |
57 | 58 | $descMode = 3; |
@@ -89,7 +90,8 @@ discard block |
||
89 | 90 | $desc_lang_exists = false; |
90 | 91 | |
91 | 92 | //save to db? |
92 | - if (isset($_POST['submitform']) && $sel_lang != '0') { // Ocprop |
|
93 | + if (isset($_POST['submitform']) && $sel_lang != '0') { |
|
94 | +// Ocprop |
|
93 | 95 | //check if the entered language already exists |
94 | 96 | $desc_rs = sql( |
95 | 97 | "SELECT `id` |
@@ -9,10 +9,10 @@ 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) { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $tplname = 'login'; |
27 | 27 | |
28 | 28 | tpl_set_var('username', ''); |
29 | - tpl_set_var('target', htmlspecialchars('newdesc.php?cacheid=' . urlencode($cache_id), ENT_COMPAT, 'UTF-8')); |
|
29 | + tpl_set_var('target', htmlspecialchars('newdesc.php?cacheid='.urlencode($cache_id), ENT_COMPAT, 'UTF-8')); |
|
30 | 30 | tpl_set_var('message', $login_required); |
31 | 31 | tpl_set_var('helplink', helppagelink('login')); |
32 | 32 | } else { |
@@ -40,15 +40,15 @@ discard block |
||
40 | 40 | if ($cache_record['user_id'] == $usr['userid']) { |
41 | 41 | $tplname = 'newdesc'; |
42 | 42 | |
43 | - require $stylepath . '/newdesc.inc.php'; |
|
43 | + require $stylepath.'/newdesc.inc.php'; |
|
44 | 44 | |
45 | 45 | //get the posted data |
46 | 46 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
47 | - $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
47 | + $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop |
|
48 | 48 | |
49 | - $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop |
|
50 | - $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop |
|
51 | - $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop |
|
49 | + $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop |
|
50 | + $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop |
|
51 | + $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop |
|
52 | 52 | |
53 | 53 | // read descMode; if not set, initialize from user profile |
54 | 54 | if (isset($_POST['descMode'])) { // Ocprop |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $oldDescMode = $descMode; |
66 | 66 | } |
67 | 67 | } else { |
68 | - if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) { |
|
68 | + if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) { |
|
69 | 69 | $descMode = 1; |
70 | 70 | } else { |
71 | 71 | $descMode = 3; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | // do not use slave server for the next time ... |
132 | 132 | db_slave_exclude(); |
133 | 133 | |
134 | - tpl_redirect('editcache.php?cacheid=' . urlencode($cache_id)); |
|
134 | + tpl_redirect('editcache.php?cacheid='.urlencode($cache_id)); |
|
135 | 135 | exit; |
136 | 136 | } |
137 | 137 | } elseif (isset($_POST['show_all_langs_submit'])) { |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | FROM `languages_list_default` |
146 | 146 | LEFT JOIN `cache_desc` |
147 | 147 | ON `languages_list_default`.`show`=`cache_desc`.`language` |
148 | - AND `cache_desc`.`cache_id`='" . sql_escape($cache_id) . "' |
|
149 | - WHERE `languages_list_default`.`lang`='" . sql_escape($locale) . "' |
|
148 | + AND `cache_desc`.`cache_id`='" . sql_escape($cache_id)."' |
|
149 | + WHERE `languages_list_default`.`lang`='" . sql_escape($locale)."' |
|
150 | 150 | AND ISNULL(`cache_desc`.`cache_id`)", |
151 | 151 | 0 |
152 | - ) == 0 ) { |
|
152 | + ) == 0) { |
|
153 | 153 | $show_all_langs = 1; |
154 | 154 | } |
155 | 155 | } |
@@ -183,13 +183,13 @@ discard block |
||
183 | 183 | if ($sSelected != '') { |
184 | 184 | $selected = true; |
185 | 185 | } |
186 | - $langoptions .= '<option value="' . htmlspecialchars($rLanguage['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
186 | + $langoptions .= '<option value="'.htmlspecialchars($rLanguage['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($rLanguage['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
187 | 187 | } |
188 | 188 | sql_free_result($rsLanguages); |
189 | 189 | if ($langoptions == '') { |
190 | 190 | // We get here if someone has added descriptions for all avaiable languages, which |
191 | 191 | // is very unlikely to happen ever. Just for completeness (see issue #108): |
192 | - tpl_redirect('editcache.php?cacheid=' . urlencode($cache_id)); |
|
192 | + tpl_redirect('editcache.php?cacheid='.urlencode($cache_id)); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | tpl_set_var('langoptions', $langoptions); |
@@ -199,8 +199,7 @@ discard block |
||
199 | 199 | tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8')); |
200 | 200 | tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8')); |
201 | 201 | |
202 | - tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : |
|
203 | - (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
202 | + tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : '')); |
|
204 | 203 | |
205 | 204 | tpl_set_var('show_all_langs', $show_all_langs); |
206 | 205 | tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : ''); |
@@ -213,16 +212,16 @@ discard block |
||
213 | 212 | tpl_set_var('descMode', $descMode); |
214 | 213 | tpl_set_var('htmlnotice', $descMode == 2 ? $htmlnotice : ''); |
215 | 214 | |
216 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
215 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
217 | 216 | if ($descMode == 3) { |
218 | 217 | // TinyMCE |
219 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
220 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=' . ($cache_id + 0) . '&lang=' . strtolower($locale) . '"></script>' . "\n"; |
|
218 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
219 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid='.($cache_id + 0).'&lang='.strtolower($locale).'"></script>'."\n"; |
|
221 | 220 | } |
222 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
221 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
223 | 222 | tpl_set_var('htmlheaders', $headers); |
224 | 223 | |
225 | - tpl_set_var('reset', $reset); // obsolete |
|
224 | + tpl_set_var('reset', $reset); // obsolete |
|
226 | 225 | tpl_set_var('submit', $submit); |
227 | 226 | } else { |
228 | 227 | //TODO: not the owner |
@@ -5,7 +5,7 @@ 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 = 'adoptcache'; |
11 | 11 | $tpl->menuitem = MNU_CACHES_ADOPT; |
@@ -173,7 +173,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -61,7 +61,8 @@ |
||
61 | 61 | } else { |
62 | 62 | showAdoptScreen($cacheid, $submit); |
63 | 63 | } |
64 | -} else { // if ($action == 'listbyuser') |
|
64 | +} else { |
|
65 | +// if ($action == 'listbyuser') |
|
65 | 66 | $tpl->assign('action', 'listbyuser'); |
66 | 67 | listRequestsByUserId(); |
67 | 68 | } |
@@ -5,7 +5,7 @@ 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 = 'viewprofile'; |
11 | 11 | $tpl->menuitem = MNU_CACHES_USERPROFILE; |
@@ -291,14 +291,14 @@ discard block |
||
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 |
||
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 | } |
@@ -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 |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | // check for old-style parameters |
22 | 22 | if (isset($_REQUEST['cacheid']) && |
23 | 23 | isset($_REQUEST['desclang']) && |
24 | - !isset($_REQUEST['descid'])) { // Ocprop |
|
24 | + !isset($_REQUEST['descid'])) { |
|
25 | +// Ocprop |
|
25 | 26 | |
26 | 27 | $cache_id = $_REQUEST['cacheid']; // Ocprop |
27 | 28 | $desc_lang = $_REQUEST['desclang']; // Ocprop |
@@ -88,7 +89,8 @@ discard block |
||
88 | 89 | $show_all_langs = false; |
89 | 90 | |
90 | 91 | //save to DB? |
91 | - if (isset($_POST['post'])) { // Ocprop |
|
92 | + if (isset($_POST['post'])) { |
|
93 | +// Ocprop |
|
92 | 94 | //here we read all used information from the form if submitted |
93 | 95 | $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
94 | 96 | |
@@ -147,7 +149,8 @@ discard block |
||
147 | 149 | |
148 | 150 | $desc = processEditorInput($oldDescMode, $descMode, $desc); |
149 | 151 | |
150 | - if (isset($_POST['submitform'])) { // Ocprop |
|
152 | + if (isset($_POST['submitform'])) { |
|
153 | +// Ocprop |
|
151 | 154 | // prüfen, ob sprache nicht schon vorhanden |
152 | 155 | $rs = sql( |
153 | 156 | "SELECT COUNT(*) `count` |
@@ -5,7 +5,7 @@ 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 = 'adminreports'; |
11 | 11 | $tpl->menuitem = MNU_ADMIN_REPORTS; |
@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | ($adminid == 0 || ($adminid != $login->userid && $age >= 14)) |
44 | 44 | ) { |
45 | 45 | sql("UPDATE `cache_reports` SET `status`=2, `adminid`=&2 WHERE `id`=&1", $rid, $login->userid); |
46 | - $tpl->redirect('adminreports.php?id=' . $rid); |
|
46 | + $tpl->redirect('adminreports.php?id='.$rid); |
|
47 | 47 | } elseif (isset($_REQUEST['contact']) && $ownerid > 0) { |
48 | 48 | $wp_oc = sql_value("SELECT `wp_oc` FROM `caches` WHERE `cache_id`='&1'", '', $cacheid); |
49 | - $tpl->redirect('mailto.php?userid=' . urlencode($ownerid) . '&wp=' . $wp_oc); |
|
49 | + $tpl->redirect('mailto.php?userid='.urlencode($ownerid).'&wp='.$wp_oc); |
|
50 | 50 | } elseif (isset($_REQUEST['contact_reporter']) && $reporterid > 0) { |
51 | - $tpl->redirect('mailto.php?userid=' . urlencode($reporterid) . '&reportid=' . $rid); |
|
51 | + $tpl->redirect('mailto.php?userid='.urlencode($reporterid).'&reportid='.$rid); |
|
52 | 52 | } elseif (isset($_REQUEST['done']) && $adminid == $login->userid) { |
53 | 53 | sql("UPDATE `cache_reports` SET `status`=3 WHERE `id`=&1", $rid); |
54 | - $tpl->redirect('adminreports.php?id=' . $rid); |
|
54 | + $tpl->redirect('adminreports.php?id='.$rid); |
|
55 | 55 | } elseif (isset($_REQUEST['assign']) && ($adminid == 0 || $adminid != $login->userid)) { |
56 | 56 | $error = 1; |
57 | 57 | $id = 0; |
@@ -5,7 +5,7 @@ |
||
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 = 'event_attendance'; |
11 | 11 | $tpl->popup = true; |
@@ -39,6 +39,9 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | |
42 | +/** |
|
43 | + * @param string $path |
|
44 | + */ |
|
42 | 45 | function testforbom($path) |
43 | 46 | { |
44 | 47 | $filestart = file_get_contents($path, false, null, 0, 2); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Searches for files which are no longer Unicode-encoded |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -chdir(__DIR__ . '/../../htdocs'); |
|
10 | +chdir(__DIR__.'/../../htdocs'); |
|
11 | 11 | require_once 'lib2/cli.inc.php'; |
12 | 12 | |
13 | 13 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $hDir = opendir($dir); |
26 | 26 | if ($hDir !== false) { |
27 | 27 | while (($file = readdir($hDir)) !== false) { |
28 | - $path = $dir . '/' . $file; |
|
28 | + $path = $dir.'/'.$file; |
|
29 | 29 | if (is_dir($path) && substr($file, 0, 1) !== '.' && $subdirs) { |
30 | 30 | scan($path, $subdirs); |
31 | 31 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | function test_encoding($path) |
43 | 43 | { |
44 | - static $ur_exclude = [ // no unicode reminder needed |
|
44 | + static $ur_exclude = [// no unicode reminder needed |
|
45 | 45 | 'lang/de/ocstyle/search1/search.result.caches', |
46 | 46 | 'lib2/b2evo-captcha', |
47 | 47 | 'lib2/HTMLPurifier', |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if (mb_trim(mb_substr($contents, $ur + 17, 2)) != "メモ") { |
58 | 58 | $ur = mb_stripos($contents, "Unicode Reminder"); |
59 | 59 | if (mb_trim(mb_substr($contents, $ur + 17, 2)) != "メモ") { |
60 | - echo "Bad Unicode Reminder found in $path: " . mb_trim(mb_substr($contents, $ur + 17, 2)) . "\n"; |
|
60 | + echo "Bad Unicode Reminder found in $path: ".mb_trim(mb_substr($contents, $ur + 17, 2))."\n"; |
|
61 | 61 | } else { |
62 | 62 | echo "Unexpected non-ASCII chars (BOMs?) in header of $path\n"; |
63 | 63 | } |