diff --git a/Readme.txt b/Readme.txt
index 754d293..d74aa95 100644
--- a/Readme.txt
+++ b/Readme.txt
@@ -1,5 +1,5 @@
-ぜろちゃんねるプラス Ver0.8.2
+ぜろちゃんねるプラス Ver0.8.3
https://github.com/PrefKarafuto/New_0ch_Plus/
■はじめに
@@ -9,7 +9,7 @@ https://github.com/PrefKarafuto/New_0ch_Plus/
このファイルは本家ぜろちゃんねるの/readme/readme.txtを元に編集された0ch+の/Readme/Readme.txtから作成しており、一部原文
ままの部分があります。
-■ぜろちゃんねるプラス(v0.8)とは
+■ぜろちゃんねるプラス(v0.8.x)とは
スレッドフロート型掲示板を動作させるPerlスクリプトとして製作されたぜろちゃんねるの機能改善版「ぜろちゃんねるプラス」の有志再開発版です。
これまでのぜろちゃんねるプラスと同じく5ちゃんねる専用ブラウザでも書き込みと閲覧、またv0.7.4(v0.7.5)からのアップデートが可能です。
diff --git a/test/module/bbs_service.pl b/test/module/bbs_service.pl
index 0e63492..8684d98 100644
--- a/test/module/bbs_service.pl
+++ b/test/module/bbs_service.pl
@@ -9,6 +9,7 @@
use utf8;
use open IO => ':encoding(cp932)';
use LWP::UserAgent;
+use JSON::Parse 'parse_json';
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use warnings;
@@ -191,7 +192,7 @@ sub CreateSubback
-
+
@@ -256,6 +257,8 @@ sub PrintIndexHead
+
+
HEAD
@@ -605,6 +608,11 @@ sub PrintThreadPreviewOne
my $bbs = $Sys->Get('BBS');
my $key = $Sys->Get('KEY');
my $tm = time;
+ my $bbsPath = $Sys->Get('BBSPATH');
+
+ my $permt = DAT::GetPermission("$bbsPath/$bbs/dat/$key.dat");
+ my $perms = $Sys->Get('PM-STOP');
+ my $isstop = $permt == $perms;
# 表示数の正規化
my ($start, $end) = $this->{'CONV'}->RegularDispNum($Sys, $Dat, 1, $contNum, $contNum);
@@ -616,7 +624,7 @@ sub PrintThreadPreviewOne
for (my $i = $start; $i <= $end; $i++) {
PrintResponse($this, $Page, $Dat, $commands, $i);
}
- if($Sys->Get('RESMAX') > $Dat->Size() && $this->{'SET'}->Get('BBS_READONLY') ne 'on'){
+ if($Sys->Get('RESMAX') > $Dat->Size() && $this->{'SET'}->Get('BBS_READONLY') ne 'on' && !$isstop){
# 書き込みフォームの表示
$Page->Print(<
diff --git a/test/module/cookie.pl b/test/module/cookie.pl
index fd09400..ccb4b80 100644
--- a/test/module/cookie.pl
+++ b/test/module/cookie.pl
@@ -51,7 +51,7 @@ sub Init
my ($name, $value) = split(/=/, $_, 2);
$value =~ s/^"|"$//g;
$value =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/pack('H2', $1)/eg;
- $value = Encode::decode("Shift_JIS",$value);
+ $value = Encode::decode("utf8",$value);
$this->{'COOKIE'}->{$name} = $value;
}
return 1;
@@ -72,7 +72,6 @@ sub Set
my $this = shift;
my ($key, $val, $enc) = @_;
- #Encode::from_to($val, 'sjis', $enc) if (defined $enc);
$this->{'COOKIE'}->{$key} = $val;
}
@@ -91,7 +90,6 @@ sub Get
my ($key, $default, $enc) = @_;
my $val = $this->{'COOKIE'}->{$key};
- #Encode::from_to($val, $enc, 'sjis') if (defined $val && defined $enc);
return (defined $val ? $val : (defined $default ? $default : undef));
}
diff --git a/test/module/post_service.pl b/test/module/post_service.pl
index 3fca8a4..41ee33f 100644
--- a/test/module/post_service.pl
+++ b/test/module/post_service.pl
@@ -10,7 +10,7 @@
use open IO => ':encoding(cp932)';
use LWP::UserAgent;
use Digest::MD5;
-#use JSON::Parse 'parse_json';
+use JSON::Parse 'parse_json';
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use warnings;
@@ -119,7 +119,7 @@ sub Write
# 改造版で追加
# hCaptcha認証
- #return $err if (($err = $this->Certification_hCaptcha()) != $ZP::E_SUCCESS);
+ return $err if (($err = $this->Certification_hCaptcha()) != $ZP::E_SUCCESS);
# データの書き込み
require './module/dat.pl';
@@ -663,7 +663,7 @@ sub NormalizationNameMail
# トリップ変換
my $trip = '';
- if ($name =~ /\#(.*)$/x) {
+ if ($name =~ /(?{'CONV'}->ConvertTrip(\$key, $Set->Get('BBS_TRIPCOLUMN'), $Sys->Get('TRIP12'));
}
@@ -752,7 +752,7 @@ sub NormalizationNameMail
return $ZP::E_SUCCESS;
}
-=pod
+
#------------------------------------------------------------------------------------------------------------
#
# 改造版で追加
@@ -809,7 +809,7 @@ sub Certification_hCaptcha
return $ZP::E_SUCCESS;
}
-=cut
+
#------------------------------------------------------------------------------------------------------------
#
# テキスト欄の正規化
diff --git a/test/module/system.pl b/test/module/system.pl
index 6e43c60..d7de0f9 100644
--- a/test/module/system.pl
+++ b/test/module/system.pl
@@ -246,7 +246,7 @@ sub InitSystemValue
'DATA' => '/datas', # 初期データ設置パス
'BBSPATH' => '..', # 掲示板設置パス
'DEBUG' => 0, # デバグモード
- 'VERSION' => '0ch+ BBS 0.8.3 20230413', # CGIバージョン
+ 'VERSION' => '0ch+ BBS 0.8.3 20230416', # CGIバージョン
'PM-DAT' => 0644, # datパーミション
'PM-STOP' => 0444, # スレストパーミション
'PM-TXT' => 0644, # TXTパーミション
diff --git a/test/read.cgi b/test/read.cgi
index 485c63a..1f1e0ce 100755
--- a/test/read.cgi
+++ b/test/read.cgi
@@ -446,10 +446,12 @@ sub PrintReadFoot
$Page->Print("最新50\n");
$Page->Print(" \n");
}
-
+ my $permt = DAT::GetPermission($datPath);
+ my $perms = $Sys->Get('PM-STOP');
+ my $isstop = $permt == $perms;
# 投稿フォームの表示
# レス最大数を超えている場合はフォーム表示しない
- if ($rmax > $Dat->Size() && $Set->Get('BBS_READONLY') ne 'on') {
+ if ($rmax > $Dat->Size() && $Set->Get('BBS_READONLY') ne 'on' && !$isstop) {
my $cookName = '';
my $cookMail = '';
my $tm = int(time);