|
1 | 1 | <?php |
2 | 2 | //Petit Note (c)さとぴあ @satopian 2021-2025 |
3 | 3 | //1スレッド1ログファイル形式のスレッド式画像掲示板 |
4 | | -$petit_ver='v1.89.0'; |
| 4 | +$petit_ver='v1.89.2'; |
5 | 5 | $petit_lot='lot.20250602'; |
6 | 6 |
|
7 | 7 | $lang = ($http_langs = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '') |
@@ -766,7 +766,7 @@ function paint(): void { |
766 | 766 | global $usercode,$petit_lot,$httpsonly,$is_badhost; |
767 | 767 |
|
768 | 768 | if(is_badhost()){ |
769 | | - error($en?'Post was rejected.':'拒絶されました。'); |
| 769 | + error($en? 'Rejected.' : '拒絶されました。'); |
770 | 770 | } |
771 | 771 |
|
772 | 772 | check_same_origin(); |
@@ -1099,7 +1099,7 @@ function to_continue(): void { |
1099 | 1099 |
|
1100 | 1100 | $is_badhost=is_badhost();//テンプレートの互換性のため変数名が必要 |
1101 | 1101 | if($is_badhost){ |
1102 | | - error($en?'Post was rejected.':'拒絶されました。'); |
| 1102 | + error($en? 'Rejected.' : '拒絶されました。'); |
1103 | 1103 | } |
1104 | 1104 |
|
1105 | 1105 | aikotoba_required_to_view(true); |
@@ -2358,8 +2358,8 @@ function view(): void { |
2358 | 2358 | $index_cache_json = __DIR__.'/template/cache/index_cache.json'; |
2359 | 2359 |
|
2360 | 2360 | $out=[]; |
2361 | | - if($page===0 && !$admindel && !$userdel && !$adminpost){ |
2362 | | - $out = (!$is_badhost && is_file($index_cache_json)) ? json_decode(file_get_contents($index_cache_json),true) : []; |
| 2361 | + if($page===0 && !$admindel && !$userdel && !$adminpost && !$is_badhost){ |
| 2362 | + $out = is_file($index_cache_json) ? json_decode(file_get_contents($index_cache_json),true) : []; |
2363 | 2363 | } |
2364 | 2364 | if(empty($out)){ |
2365 | 2365 | //oyaのループ |
@@ -2438,7 +2438,7 @@ function view(): void { |
2438 | 2438 | $next=(($page+$pagedef)<$count_alllog) ? $page+$pagedef : false;//ページ番号がmaxを超える時はnextのリンクを出さない |
2439 | 2439 | $prev=((int)$page<=0) ? false : ($page-$pagedef);//ページ番号が0の時はprevのリンクを出さない |
2440 | 2440 | $prev=($prev<0) ? 0 : $prev; |
2441 | | - if($page===0 && !$admindel && !$adminpost){ |
| 2441 | + if($page===0 && !$admindel && !$adminpost && !$is_badhost){ |
2442 | 2442 | if(!is_file($index_cache_json)){ |
2443 | 2443 | file_put_contents($index_cache_json,json_encode($out),LOCK_EX); |
2444 | 2444 | chmod($index_cache_json,0600); |
|
0 commit comments