11<?php
22//Petit Note (c)さとぴあ @satopian 2021-2025
33//1スレッド1ログファイル形式のスレッド式画像掲示板
4- $ petit_ver ='v1.88.12 ' ;
5- $ petit_lot ='lot.20250601 ' ;
4+ $ petit_ver ='v1.89.0 ' ;
5+ $ petit_lot ='lot.20250602 ' ;
66
77$ lang = ($ http_langs = $ _SERVER ['HTTP_ACCEPT_LANGUAGE ' ] ?? '' )
88 ? explode ( ', ' , $ http_langs )[0 ] : '' ;
1818 die (__DIR__ .'/functions.php ' .($ en ? ' does not exist. ' :'がありません。 ' ));
1919}
2020require_once (__DIR__ .'/functions.php ' );
21- if (!isset ($ functions_ver )||$ functions_ver <20250601 ){
21+ if (!isset ($ functions_ver )||$ functions_ver <20250602 ){
2222 die ($ en ?'Please update functions.php to the latest version. ' :'functions.phpを最新版に更新してください。 ' );
2323}
2424
@@ -249,7 +249,8 @@ function post(): void {
249249
250250 //投稿間隔をチェック
251251 check_submission_interval ();
252-
252+ //NGワードがあれば拒絶
253+ Reject_if_NGword_exists_in_the_post ();
253254 //POSTされた内容を取得
254255 $ userip =t (get_uip ());
255256 //ホスト取得
@@ -268,9 +269,6 @@ function post(): void {
268269 $ url = t (filter_input_data ('POST ' ,'url ' ,FILTER_VALIDATE_URL ));
269270 $ url = (adminpost_valid () || $ use_url_input_field ) ? $ url : '' ;
270271
271- //NGワードがあれば拒絶
272- Reject_if_NGword_exists_in_the_post ();
273-
274272 $ pwd =$ pwd ? $ pwd : t (filter_input_data ('COOKIE ' ,'pwdc ' ));//未入力ならCookieのパスワード
275273 if (!$ pwd ){//それでも$pwdが空なら
276274 $ pwd = substr (hash ('sha256 ' , random_bytes (16 )), 0 , 15 );
@@ -1874,7 +1872,8 @@ function edit(): void {
18741872
18751873 //投稿間隔をチェック
18761874 check_submission_interval ();
1877-
1875+ //NGワードがあれば拒絶
1876+ Reject_if_NGword_exists_in_the_post ();
18781877 //POSTされた内容を取得
18791878 $ userip =t (get_uip ());
18801879 //ホスト取得
@@ -1902,9 +1901,6 @@ function edit(): void {
19021901 error ($ en ?"This operation has failed. \nPlease reload. " :"失敗しました。 \nリロードしてください。 " );
19031902 }
19041903
1905- //NGワードがあれば拒絶
1906- Reject_if_NGword_exists_in_the_post ();
1907-
19081904 //ログ読み込み
19091905 if (!is_file (LOG_DIR ."{$ no }.log " )){
19101906 error ($ en ? 'The article does not exist. ' :'記事がありません。 ' );
0 commit comments