Skip to content

Commit

Permalink
マークダウンファイルを編集するとき、拡張子がダブル問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kujirahand committed Sep 11, 2024
1 parent 14ee2c7 commit 4de95fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kona3engine/action/edit.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ function kona3_trywrite(&$txt, &$a_hash, $i_mode, &$result) {
$edit_ext = kona3param('edit_ext', '');
$postId = intval(kona3param('postId', 0)); // option

// ページ名の末便に拡張子があるか確認
if (str_ends_with($page, ".{$edit_ext}")) {
$page = substr($page, 0, strlen($page) - strlen(".{$edit_ext}"));
}
$fname = kona3getEditFile("{$page}.{$edit_ext}", $ext);
$user_id = kona3getUserId();

Expand Down

0 comments on commit 4de95fa

Please sign in to comment.