Skip to content

Commit

Permalink
ログファイルのパーミッション変更のタイミングを「ファイルポインタを開く時」に変更。
Browse files Browse the repository at this point in the history
  • Loading branch information
satopian committed Jan 7, 2025
1 parent 758d794 commit 5a471ea
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions petitnote/index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
//Petit Note (c)さとぴあ @satopian 2021-2025
//1スレッド1ログファイル形式のスレッド式画像掲示板
$petit_ver='v1.67.1';
$petit_lot='lot.20250106';
$petit_ver='v1.67.3';
$petit_lot='lot.20250107';

$lang = ($http_langs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '')
? explode( ',', $http_langs )[0] : '';
Expand Down Expand Up @@ -616,7 +616,6 @@ function post(): void {
writeFile($rp,$new_rline);
closeFile($rp);

chmod(LOG_DIR."{$resto}.log",0600);
if(!$sage){
foreach($alllog_arr as $i =>$val){
if (strpos(trim($val), $resto . "\t") === 0) {//全体ログで$noが一致したら
Expand Down Expand Up @@ -676,8 +675,6 @@ function post(): void {
writeFile ($fp, $newline);
closeFile($fp);

chmod(LOG_DIR."alllog.log",0600);

//ワークファイル削除
safe_unlink($src);
safe_unlink($tempfile);
Expand Down

0 comments on commit 5a471ea

Please sign in to comment.