Skip to content

Commit

Permalink
fix #1676 img, css, js 配下の存在しないURLにアクセスすると500エラーが発生する問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Apr 8, 2021
1 parent 8d8a751 commit ec29716
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions lib/Baser/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
'bootstrap' => file_exists(CakePlugin::path($plugin['Plugin']['name']) . 'Config' . DS . 'bootstrap.php')
]);
}
return;
}
}

Expand Down Expand Up @@ -304,6 +303,23 @@
}
Configure::write('BcRequest.isUpdater', $isUpdater);
}

/**
* テーマヘルパーのパスを追加する
*/
if (BC_INSTALLED || isConsole()) {
App::build([
'View/Helper' => [BASER_THEMES . Configure::read('BcSite.theme') . DS . 'Helper' . DS]
], App::PREPEND);
}

/**
* アセットの場合負荷を軽減するため以降の処理を終了
*/
if(Configure::write('BcRequest.asset', true)) {
return;
}

/**
* プラグインをCake側で有効化
*
Expand Down Expand Up @@ -410,15 +426,6 @@
}
}

/**
* テーマヘルパーのパスを追加する
*/
if (BC_INSTALLED || isConsole()) {
App::build([
'View/Helper' => [BASER_THEMES . Configure::read('BcSite.theme') . DS . 'Helper' . DS]
], App::PREPEND);
}

/**
* 後方互換のため過去テーマ用のアイコンを設定
* @deprecated 5.0.0 since 4.2.0 過去テーマを廃止予定
Expand Down

0 comments on commit ec29716

Please sign in to comment.