Skip to content

Commit dd3ab19

Browse files
committed
v1.6.11
1 parent 88a6b63 commit dd3ab19

File tree

6 files changed

+41
-23
lines changed

6 files changed

+41
-23
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ $pallets_dat = array(['標準','palette.txt'],['PCCS_HSL','p_PCCS.txt'],['マン
6969

7070
[すべての履歴はこちら](changelog.md)
7171

72+
### [2025/06/09] v1.6.11
73+
74+
- misskey投稿時にツールが不明になるバグ修正
75+
- misskey投稿後のnoteに出るurl修正
76+
- misskeyに投稿後記事に戻れないバグ修正
77+
- スレッドの単独表示画面からもmisskeyに投稿できるように
78+
- misskey投稿の際画像保存ディレクトリ名が`src`で固定になっていたの修正
79+
7280
### [2025/06/09] v1.6.10
7381

7482
- 「そろそろ消えそうなスレッドにマーク」実装

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## すべての履歴
44

5+
### [2025/06/09] v1.6.11
6+
7+
- misskey投稿時にツールが不明になるバグ修正
8+
- misskey投稿後のnoteに出るurl修正
9+
- misskeyに投稿後記事に戻れないバグ修正
10+
- スレッドの単独表示画面からもmisskeyに投稿できるように
11+
- misskey投稿の際画像保存ディレクトリ名が`src`で固定になっていたの修正
12+
513
### [2025/06/09] v1.6.10
614

715
- 「そろそろ消えそうなスレッドにマーク」実装

noreita/connect_misskey_api.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
2-
//Petit Note 2021-2025 (c)satopian MIT Licence
2+
//Petit Note 2021-2025 (c)satopian MIT License
33
//https://paintbbs.sakura.ne.jp/
44
//https://oekakibbs.moe/
55

66
//Misskey APIに接続
7+
//noReita用に改造by sakots
78

89
require_once(__DIR__.'/config.php');
910
require_once(__DIR__.'/functions.php');
@@ -79,7 +80,7 @@ public static function create_misskey_note(): void {
7980
$src_image=basename($src_image);
8081

8182
// 画像のアップロード
82-
$imagePath = __DIR__.'/src/'.$src_image;
83+
$imagePath = __DIR__.'/'.IMG_DIR.$src_image;
8384

8485
if(!is_file($imagePath)){
8586
die("Error: " . ($en ? "Image does not exist." : "画像がありません。") . ": " . $imagePath);
@@ -164,7 +165,7 @@ public static function create_misskey_note(): void {
164165

165166
$src_image_filename = pathinfo($src_image, PATHINFO_FILENAME );//拡張子除去
166167

167-
$fixed_link = BASE.'?resno='.$no.'#'.$src_image_filename;
168+
$fixed_link = BASE.'?mode=res&res='.$no.'#'.$src_image_filename;
168169
$fixed_link = filter_var($fixed_link,FILTER_VALIDATE_URL) ? $fixed_link : '';
169170
$article_url_link = $article_url_link ? $fixed_link : '';
170171
$com=str_replace(["\r\n","\r"],"\n",$com);

noreita/functions.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -429,25 +429,25 @@ function check_same_origin(): void {
429429
}
430430
}
431431

432-
/**
433-
* ツール名の定数定義
434-
*/
435-
const TOOL_NAMES = [
436-
'neo' => 'PaintBBS NEO',
437-
'PaintBBS' => 'PaintBBS',
438-
'shi-Painter' => 'Shi-Painter',
439-
'chi' => 'ChickenPaint'
440-
];
441-
442-
/**
443-
* ツール名を正規化された形式に変換する
444-
*
445-
* @param string $tool 変換するツール名
446-
* @return string 正規化されたツール名
447-
*/
448-
function switch_tool(string $tool): string {
449-
global $en;
450-
return TOOL_NAMES[$tool] ?? ($en ? 'Unknown tool' : '不明なツール');
432+
function switch_tool($tool): string {
433+
switch($tool){
434+
case 'neo':
435+
$tool='PaintBBS NEO';
436+
break;
437+
case 'PaintBBS':
438+
$tool='PaintBBS';
439+
break;
440+
case 'shi-Painter':
441+
$tool='Shi-Painter';
442+
break;
443+
case 'chi':
444+
$tool='ChickenPaint';
445+
break;
446+
default:
447+
$tool='';
448+
break;
449+
}
450+
return $tool;
451451
}
452452

453453
//sessionの確認

noreita/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//--------------------------------------------------
66

77
//スクリプトのバージョン
8-
define('REITA_VER', 'v1.6.10'); //lot.250609.0
8+
define('REITA_VER', 'v1.6.11'); //lot.250609.1
99

1010
//phpのバージョンが古い場合動かさせない
1111
if (($php_ver = phpversion()) < "7.3.0") {

noreita/misskey_note.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ public static function misskey_success(): void {
471471
}
472472
$admin_pass = null;
473473
$dat['misskey_mode'] = 'success';
474+
$dat['no'] = $no;
474475
echo $blade->run(MISSKEYFILE, $dat);
475476
exit();
476477
}

0 commit comments

Comments
 (0)