@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use Oc\Libse\ChildWp\ControllerChildWp; |
10 | 10 | use Oc\Libse\ChildWp\HandlerChildWp; |
11 | 11 | |
12 | -require __DIR__ . '/lib2/web.inc.php'; |
|
12 | +require __DIR__.'/lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | $tpl->name = 'childwp'; |
15 | 15 | $tpl->menuitem = MNU_CACHES_HIDE; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | if ($redirect) { |
37 | - $tpl->redirect('editcache.php?cacheid=' . $presenter->getCacheId()); |
|
37 | + $tpl->redirect('editcache.php?cacheid='.$presenter->getCacheId()); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $presenter->prepare($tpl); |
@@ -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 = 'newcachesrest'; |
11 | 11 | $tpl->menuitem = MNU_START_NEWCACHES; |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | $tpl->caching = true; |
15 | 15 | $tpl->cache_lifetime = 3600; |
16 | 16 | |
17 | -$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : |
|
18 | - (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
17 | +$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
19 | 18 | |
20 | 19 | if (!$tpl->is_cached()) { |
21 | 20 | $newCaches = array(); |
@@ -27,7 +26,7 @@ discard block |
||
27 | 26 | FROM `caches` |
28 | 27 | INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` |
29 | 28 | WHERE `cache_status`.`allow_user_view`=1 |
30 | - AND `country`!='" . sql_escape($country) . "' |
|
29 | + AND `country`!='" . sql_escape($country)."' |
|
31 | 30 | ORDER BY `date_created` DESC LIMIT 200" |
32 | 31 | ); |
33 | 32 |
@@ -5,15 +5,15 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
9 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
10 | 10 | |
11 | 11 | $tpl->name = 'mylists'; |
12 | 12 | $tpl->menuitem = MNU_MYPROFILE_LISTS; |
13 | 13 | |
14 | 14 | $login->verify(); |
15 | 15 | if ($login->userid == 0) { |
16 | - $tpl->redirect('login.php?target=' . urlencode($tpl->target)); |
|
16 | + $tpl->redirect('login.php?target='.urlencode($tpl->target)); |
|
17 | 17 | } |
18 | 18 | $user = new user($login->userid); |
19 | 19 | |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | |
153 | 153 | // redirect to list search output after editing a list from the search output page |
154 | 154 | if ($fromsearch && !$switchDescMode && !$name_error && isset($_REQUEST['listid'])) { |
155 | - $iwp = ($invalid_waypoints ? '&invalidwp=' . urlencode($invalid_waypoints) : ''); |
|
156 | - $tpl->redirect('cachelist.php?id=' . ($_REQUEST['listid'] + 0) . $iwp); |
|
155 | + $iwp = ($invalid_waypoints ? '&invalidwp='.urlencode($invalid_waypoints) : ''); |
|
156 | + $tpl->redirect('cachelist.php?id='.($_REQUEST['listid'] + 0).$iwp); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | // prepare editor and editing |
160 | 160 | if ($descMode == 3) { |
161 | 161 | $tpl->add_header_javascript('resource2/tinymce/tiny_mce_gzip.js'); |
162 | - $tpl->add_header_javascript('resource2/tinymce/config/list.js.php?lang=' . strtolower($opt['template']['locale'])); |
|
162 | + $tpl->add_header_javascript('resource2/tinymce/config/list.js.php?lang='.strtolower($opt['template']['locale'])); |
|
163 | 163 | } |
164 | 164 | $tpl->add_header_javascript(editorJsPath()); |
165 | 165 | if ($edit_list) { |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | if (isset($_REQUEST['SESSION']) && $_REQUEST['SESSION'] != '') { |
25 | 25 | $this->init_session(); |
26 | 26 | } |
27 | - } elseif (isset($_COOKIE[$opt['session']['cookiename'] . 'data'])) { |
|
27 | + } elseif (isset($_COOKIE[$opt['session']['cookiename'].'data'])) { |
|
28 | 28 | //get the cookievars-array |
29 | - $decoded = base64_decode($_COOKIE[$opt['session']['cookiename'] . 'data']); |
|
29 | + $decoded = base64_decode($_COOKIE[$opt['session']['cookiename'].'data']); |
|
30 | 30 | |
31 | 31 | if ($decoded !== false) { |
32 | 32 | $this->values = @unserialize($decoded); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | if ($opt['session']['check_referer']) { |
53 | 53 | if (isset($_SERVER['REFERER'])) { |
54 | - if (strtolower(substr('http' + strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) { |
|
54 | + if (strtolower(substr('http' +strstr($_SERVER['REFERER'], '://'), 0, strlen($opt['page']['absolute_http_url']))) != strtolower($opt['page']['absolute_http_url'])) { |
|
55 | 55 | $this->createNewSession(); |
56 | 56 | } |
57 | 57 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($this->changed == true) { |
169 | 169 | if (count($this->values) == 0) { |
170 | 170 | setcookie( |
171 | - $opt['session']['cookiename'] . 'data', |
|
171 | + $opt['session']['cookiename'].'data', |
|
172 | 172 | false, |
173 | 173 | time() + 31536000, |
174 | 174 | $opt['session']['path'], |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | ); |
178 | 178 | } else { |
179 | 179 | setcookie( |
180 | - $opt['session']['cookiename'] . 'data', |
|
180 | + $opt['session']['cookiename'].'data', |
|
181 | 181 | base64_encode(serialize($this->values)), |
182 | 182 | time() + 31536000, |
183 | 183 | $opt['session']['path'], |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | |
11 | 11 | // replacement table for Unicode 0x100 to 0x1FF |
12 | -$utf_xlatin = "A a A a A a C c C c C c C c D d D d E e E e E e E e E e G g G g " . |
|
13 | - "G g G g H h H h I i I i I i I i I i IJijJ j K k K L l L l L l L " . |
|
14 | - "l L l N n N n N n n n n O o O o Ö ö OEoeR r R r R r S s S s S s " . |
|
12 | +$utf_xlatin = "A a A a A a C c C c C c C c D d D d E e E e E e E e E e G g G g ". |
|
13 | + "G g G g H h H h I i I i I i I i I i IJijJ j K k K L l L l L l L ". |
|
14 | + "l L l N n N n N n n n n O o O o Ö ö OEoeR r R r R r S s S s S s ". |
|
15 | 15 | "S s T t T t T t U u U u U u U u Ü ü U u W w Y y Y Z z Z z Z z "; |
16 | 16 | |
17 | 17 | // replacement table for Unicode 0x2000 to 0x203F |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | $result = ""; |
29 | 29 | |
30 | 30 | while ($pos < strlen($s)) { |
31 | - $c1 = ord($s[$pos ++]); |
|
31 | + $c1 = ord($s[$pos++]); |
|
32 | 32 | if ($c1 < 0xC0) { |
33 | 33 | $result .= chr($c1); |
34 | 34 | } elseif ($pos < strlen($s)) { |
35 | - $c2 = ord($s[$pos ++]); |
|
35 | + $c2 = ord($s[$pos++]); |
|
36 | 36 | if ($c1 < 0xE0) { |
37 | 37 | $code = 0x40 * ($c1 & 0x1F) + ($c2 & 0x3F); |
38 | 38 | if ($code < 0x100) { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $result .= "?"; |
47 | 47 | } |
48 | 48 | } elseif ($pos < strlen($s)) { |
49 | - $c3 = ord($s[$pos ++]); |
|
49 | + $c3 = ord($s[$pos++]); |
|
50 | 50 | $code = 0x1000 * ($c1 & 0x0F) + 0x40 * ($c2 & 0x3F) + ($c3 & 0x3F); |
51 | 51 | switch ($code) { |
52 | 52 | case 0x2026: |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * Constant definitions |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require_once __DIR__ . '/../lib/consts-common.inc.php'; |
|
10 | +require_once __DIR__.'/../lib/consts-common.inc.php'; |
|
11 | 11 | |
12 | 12 | define('DEBUG_NO', 0); |
13 | 13 | define('DEBUG_DEVELOPER', 1); |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
35 | - if (!is_dir($opt['rootpath'] . 'cache2/translate/' . $language_lower)) { |
|
36 | - mkdir($opt['rootpath'] . 'cache2/translate/' . $language_lower); |
|
35 | + if (!is_dir($opt['rootpath'].'cache2/translate/'.$language_lower)) { |
|
36 | + mkdir($opt['rootpath'].'cache2/translate/'.$language_lower); |
|
37 | 37 | } |
38 | - if (!is_dir($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES')) { |
|
39 | - mkdir($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES'); |
|
38 | + if (!is_dir($opt['rootpath'].'cache2/translate/'.$language_lower.'/LC_MESSAGES')) { |
|
39 | + mkdir($opt['rootpath'].'cache2/translate/'.$language_lower.'/LC_MESSAGES'); |
|
40 | 40 | } |
41 | 41 | |
42 | - $f = fopen($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.po', 'w'); |
|
42 | + $f = fopen($opt['rootpath'].'cache2/translate/'.$language_lower.'/LC_MESSAGES/messages.po', 'w'); |
|
43 | 43 | |
44 | - fwrite($f, 'msgid ""' . "\n"); |
|
45 | - fwrite($f, 'msgstr ""' . "\n"); |
|
46 | - fwrite($f, '"MIME-Version: 1.0\n"' . "\n"); |
|
47 | - fwrite($f, '"Content-Type: text/plain; charset=UTF-8\n"' . "\n"); |
|
48 | - fwrite($f, '"Content-Transfer-Encoding: 8bit\n"' . "\n"); |
|
44 | + fwrite($f, 'msgid ""'."\n"); |
|
45 | + fwrite($f, 'msgstr ""'."\n"); |
|
46 | + fwrite($f, '"MIME-Version: 1.0\n"'."\n"); |
|
47 | + fwrite($f, '"Content-Type: text/plain; charset=UTF-8\n"'."\n"); |
|
48 | + fwrite($f, '"Content-Transfer-Encoding: 8bit\n"'."\n"); |
|
49 | 49 | fwrite($f, "\n"); |
50 | 50 | |
51 | 51 | // English texts in sys_trans_text are more up-to-date than the original translation |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | ); |
67 | 67 | |
68 | 68 | $variables = array(); |
69 | - $this->loadNodeTextFile($variables, $opt['logic']['node']['id'] . '.txt', $language_lower); |
|
69 | + $this->loadNodeTextFile($variables, $opt['logic']['node']['id'].'.txt', $language_lower); |
|
70 | 70 | $this->loadNodeTextFile( |
71 | 71 | $variables, |
72 | - $opt['logic']['node']['id'] . '-' . $language_lower . '.txt', |
|
72 | + $opt['logic']['node']['id'].'-'.$language_lower.'.txt', |
|
73 | 73 | $language_lower |
74 | 74 | ); |
75 | 75 | |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | if ($trans !== null && $trans != $r['text']) { |
79 | 79 | $trans = $this->substitueVariables($variables, $language_lower, $trans); |
80 | 80 | |
81 | - fwrite($f, 'msgid "' . $this->escape_text($r['text']) . '"' . "\n"); |
|
82 | - fwrite($f, 'msgstr "' . $this->escape_text($trans) . '"' . "\n"); |
|
81 | + fwrite($f, 'msgid "'.$this->escape_text($r['text']).'"'."\n"); |
|
82 | + fwrite($f, 'msgstr "'.$this->escape_text($trans).'"'."\n"); |
|
83 | 83 | fwrite($f, "\n"); |
84 | 84 | } |
85 | 85 | } |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | |
90 | 90 | try { |
91 | 91 | exec( |
92 | - 'msgfmt -o ' . escapeshellcmd( |
|
93 | - $opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.mo' |
|
94 | - ) . ' ' . escapeshellcmd( |
|
95 | - $opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.po' |
|
92 | + 'msgfmt -o '.escapeshellcmd( |
|
93 | + $opt['rootpath'].'cache2/translate/'.$language_lower.'/LC_MESSAGES/messages.mo' |
|
94 | + ).' '.escapeshellcmd( |
|
95 | + $opt['rootpath'].'cache2/translate/'.$language_lower.'/LC_MESSAGES/messages.po' |
|
96 | 96 | ) |
97 | 97 | ); |
98 | 98 | } catch (Exception $e) { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | sqlf( |
190 | 190 | "INSERT IGNORE INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('&1', '&2', 0)", |
191 | 191 | $lastId, |
192 | - 'table:' . $table . ';field=' . $fname |
|
192 | + 'table:'.$table.';field='.$fname |
|
193 | 193 | ); |
194 | 194 | } |
195 | 195 | sql_free_result($rs); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | // generic load |
212 | 212 | global $opt; |
213 | 213 | |
214 | - $filename = $opt['rootpath'] . '/config2/nodetext/' . $file; |
|
214 | + $filename = $opt['rootpath'].'/config2/nodetext/'.$file; |
|
215 | 215 | if (file_exists($filename)) { |
216 | 216 | $fhandle = fopen($filename, 'r'); |
217 | 217 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require_once __DIR__ . '/logic/const.inc.php'; |
|
8 | +require_once __DIR__.'/logic/const.inc.php'; |
|
9 | 9 | |
10 | 10 | class translateAccess |
11 | 11 | { |
@@ -90,8 +90,8 @@ |
||
90 | 90 | |
91 | 91 | $smiley_a = array(); |
92 | 92 | for ($n = 0; $n < count($smiley['file']); ++ $n) { |
93 | - $smiley['image'][$n] = '<img src="' . $opt['template']['smiley'] . $smiley['file'][$n] . '" alt="' . $smiley['text'][$n] . '" border="0" width="18px" height="18px" />'; |
|
94 | - $smiley['spaced_image'][$n] = ' ' . $smiley['image'][$n] . ' '; |
|
93 | + $smiley['image'][$n] = '<img src="'.$opt['template']['smiley'].$smiley['file'][$n].'" alt="'.$smiley['text'][$n].'" border="0" width="18px" height="18px" />'; |
|
94 | + $smiley['spaced_image'][$n] = ' '.$smiley['image'][$n].' '; |
|
95 | 95 | $smiley_a[] = [ |
96 | 96 | 'text' => $smiley['text'][$n], |
97 | 97 | 'file' => $smiley['file'][$n], |