Skip to content

Commit

Permalink
admin-second判定の不具合修正
Browse files Browse the repository at this point in the history
  • Loading branch information
GUSSAN-BEEDAN committed Apr 26, 2022
1 parent 707a1ae commit 376c79e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions Event/AdminMakeResponsiveViewEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ class AdminMakeResponsiveViewEventListener extends BcViewEventListener {
'beforeLayout',
];
public function beforeLayout(CakeEvent $event) {

$View = $event->subject();
App::import('Model', 'AdminMakeResponsive.AdminMakeResponsive');
$_setdatas = new AdminMakeResponsive();
$setdatas = $_setdatas->getSetdatas();

if (BcUtil::loginUser()) {
// ログイン時
$View = $event->subject();
App::import('Model', 'AdminMakeResponsive.AdminMakeResponsive');
$_setdatas = new AdminMakeResponsive();
$setdatas = $_setdatas->getSetdatas();

if (
(isset($setdatas))
&&(isset($setdatas['flg_enable']))
Expand Down Expand Up @@ -123,11 +124,6 @@ public function beforeLayout(CakeEvent $event) {
(Configure::read('BcSite.admin_theme') === 'admin-third' || $View->viewVars['siteConfig']['admin_theme'] === 'admin-third')
) {
// ログオフ時 admin-third(ログイン画面対象)
$View = $event->subject();
App::import('Model', 'AdminMakeResponsive.AdminMakeResponsive');
$_setdatas = new AdminMakeResponsive();
$setdatas = $_setdatas->getSetdatas();

if (
(isset($setdatas))
&&(isset($setdatas['flg_enable']))
Expand Down Expand Up @@ -167,11 +163,6 @@ public function beforeLayout(CakeEvent $event) {
}
} else {
// ログオフ時 admin-second(ログイン画面対象)
$View = $event->subject();
App::import('Model', 'AdminMakeResponsive.AdminMakeResponsive');
$_setdatas = new AdminMakeResponsive();
$setdatas = $_setdatas->getSetdatas();

$View->start('admin_make_responsive');
$AdminMakeResponsive = $View->element('AdminMakeResponsive.admin/admin_go_responsive_toolbar_addfiles',['setdatas' => $setdatas]);
$View->end();
Expand Down

0 comments on commit 376c79e

Please sign in to comment.