Skip to content

Commit

Permalink
テーマの不要なルーティングが登録されないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Feb 25, 2024
1 parent 5a1c092 commit 795559f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/baser-core/src/BcPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use BaserCore\Service\PermissionGroupsService;
use BaserCore\Service\PermissionGroupsServiceInterface;
use BaserCore\Utility\BcContainerTrait;
use BaserCore\Utility\BcPluginUtil;
use BaserCore\Utility\BcUpdateLog;
use BaserCore\Utility\BcUtil;
use Cake\Core\BasePlugin;
Expand Down Expand Up @@ -481,7 +482,7 @@ function(RouteBuilder $routes) {
*/
public function frontPageRouting(RouteBuilder $routes, string $plugin)
{

if(!BcPluginUtil::isPlugin($plugin)) return $routes;
$routes->plugin(
$plugin,
['path' => '/' . Inflector::dasherize($plugin)],
Expand Down Expand Up @@ -557,6 +558,7 @@ function(RouteBuilder $routes) use($isApi) {
*/
public function siteRouting(RouteBuilder $routes, string $plugin)
{
if(!BcPluginUtil::isPlugin($plugin)) return $routes;
$request = Router::getRequest();
if (!$request) {
$request = ServerRequestFactory::fromGlobals();
Expand Down

0 comments on commit 795559f

Please sign in to comment.