@@ -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 | } |
@@ -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 | } |
@@ -8,9 +8,9 @@ |
||
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | 10 | global $opt; |
11 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
12 | -require $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
13 | -require $opt['rootpath'] . 'lib2/logic/crypt.class.php'; |
|
11 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
12 | +require $opt['rootpath'].'lib2/cli.inc.php'; |
|
13 | +require $opt['rootpath'].'lib2/logic/crypt.class.php'; |
|
14 | 14 | |
15 | 15 | if (!isset($opt['logic']['password_salt']) || strlen($opt['logic']['password_salt']) < 32) { |
16 | 16 | echo "Warning!\nPassword Salt not set or too short!\n\n"; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | 11 | $opt['rootpath'] = '../../htdocs/'; |
12 | -require $opt['rootpath'] . 'lib2/web.inc.php'; |
|
12 | +require $opt['rootpath'].'lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | if ($argc != 2 || $argv[1] != 'go') { |
15 | 15 | die("run with parameter 'go' to update queries\n"); |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | $cachesize = $query['cachesize']; |
23 | 23 | |
24 | 24 | // add nano size to all queries that include micro or other |
25 | - if (preg_match('/[;][12][;]/', ';' . $cachesize . ';') && |
|
26 | - !preg_match('/[;][8][;]/', ';' . $cachesize . ';') |
|
25 | + if (preg_match('/[;][12][;]/', ';'.$cachesize.';') && |
|
26 | + !preg_match('/[;][8][;]/', ';'.$cachesize.';') |
|
27 | 27 | ) { |
28 | 28 | // echo $r['name'] . ": " . $cachesize . " -> " . $query['cachesize'] .= ";8\n"; |
29 | 29 | $query['cachesize'] .= ';8'; |
30 | 30 | $saveopt = serialize($query); |
31 | 31 | // sql("UPDATE queries SET `options`='&1' WHERE `id`='&2'", $saveopt, $r['id']); |
32 | 32 | // ^^ run this line only if you are absolutely sure what you are doing |
33 | - echo 'added nano to query ' . $r['id'] . "(" . $cachesize . ') of user ' . $r['user_id'] . "\n"; |
|
33 | + echo 'added nano to query '.$r['id']."(".$cachesize.') of user '.$r['user_id']."\n"; |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | * Unicode Reminder メモ |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
12 | -require_once $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
13 | -require_once $opt['rootpath'] . 'lib2/logic/user.class.php'; |
|
11 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
12 | +require_once $opt['rootpath'].'lib2/cli.inc.php'; |
|
13 | +require_once $opt['rootpath'].'lib2/logic/user.class.php'; |
|
14 | 14 | |
15 | 15 | $write = ($argc == 2 && $argv[1] = 'write'); |
16 | 16 | if (!$write) { |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | $lang |
32 | 32 | ); |
33 | 33 | } |
34 | - ++ $set; |
|
34 | + ++$set; |
|
35 | 35 | } |
36 | - if (++ $processed % 1000 == 0) { |
|
37 | - echo "$set of $processed " . ($write ? '' : 'would be ') . "set\n"; |
|
36 | + if (++$processed % 1000 == 0) { |
|
37 | + echo "$set of $processed ".($write ? '' : 'would be ')."set\n"; |
|
38 | 38 | } |
39 | 39 | } |
40 | -echo "$set of $processed " . ($write ? '' : 'would be ') . "set\n"; |
|
40 | +echo "$set of $processed ".($write ? '' : 'would be ')."set\n"; |
|
41 | 41 | sql_free_result($rs); |