Skip to content

Commit

Permalink
メインサイトの管理画面からサブサイト記事にアクセスするとURLが正しく生成されない問題を解消 #3889 (#3898)
Browse files Browse the repository at this point in the history
Co-authored-by: kawase <[email protected]>
  • Loading branch information
RyoK513 and kawaseryoma authored Oct 8, 2024
1 parent 8a28b95 commit b98033c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
/**
* [ADMIN] ブログ記事 一覧 行
*/
$url = $this->request->params['Content']['url'] . 'archives/' . $data['BlogPost']['no'];
$fullUrl = $this->BcBaser->getContentsUrl($url, true, $this->request->params['Site']['use_subdomain']);
?>


Expand Down Expand Up @@ -72,7 +74,7 @@ class="eye_catch"><?php echo $this->BcUpload->uploadImage('BlogPost.eye_catch',
<?php $this->BcBaser->link('', ['action' => 'ajax_unpublish', $data['BlogContent']['id'], $data['BlogPost']['id']], ['title' => __d('baser', '非公開'), 'class' => 'btn-unpublish bca-btn-icon', 'data-bca-btn-type' => 'unpublish', 'data-bca-btn-size' => 'lg']) ?>
<?php $this->BcBaser->link('', ['action' => 'ajax_publish', $data['BlogContent']['id'], $data['BlogPost']['id']], ['title' => __d('baser', '公開'), 'class' => 'btn-publish bca-btn-icon', 'data-bca-btn-type' => 'publish', 'data-bca-btn-size' => 'lg']) ?>
<?php if ($this->Blog->allowPublish($data)): //公開状態であれば 公開ページヘのリンク ?>
<?php $this->BcBaser->link('', $this->request->params['Content']['url'] . '/archives/' . $data['BlogPost']['no'], ['title' => __d('baser', '確認'), 'target' => '_blank', 'class' => 'bca-btn-icon', 'data-bca-btn-type' => 'preview', 'data-bca-btn-size' => 'lg']); ?>
<?php $this->BcBaser->link('', $fullUrl, ['title' => __d('baser', '確認'), 'target' => '_blank', 'class' => 'bca-btn-icon', 'data-bca-btn-type' => 'preview', 'data-bca-btn-size' => 'lg']); ?>
<?php else: // 非公開であればボタンを押せなくする ?>
<a title="確認" class="btn bca-btn-icon" data-bca-btn-type="preview" data-bca-btn-size="lg"
data-bca-btn-status="gray"></a>
Expand Down

0 comments on commit b98033c

Please sign in to comment.