.

守矢諏訪子 <suwako@076.moe>、2026-11-13 07:53
コミット 1b438ae00d9ae5ffaeb0260b2d1439c78a843d26 ・親 7288b97 ・ファイルを見る

1個のファイル、+4 -6

@@ -94,28 +94,26 @@
9494 ];
9595 }
9696
97+ static $isAdmin = null;
98+
9799 if (OPENPROVIDER_ENABLED) {
98- static $isAdmin = null;
99- $isAdmin ??= (new \Std\Lib\Auth())->isAdmin();
100100 $menu[] = [
101101 'class' => 'menu-item',
102102 'href' => '/openprovider',
103103 'page' => 'openprovider',
104104 'text' => 'OpenProvider管理',
105- 'show' => $isAdmin,
105+ 'show' => (new \Std\Lib\Auth())->isAdmin(),
106106 ];
107107 }
108108
109109 if (AUTH_ENABLED && defined('ADMIN_ENABLED') && ADMIN_ENABLED) {
110110 // 管理者だけに表示する
111- static $isAdmin = null;
112- $isAdmin ??= (new \Std\Lib\Auth())->isAdmin();
113111 $menu[] = [
114112 'class' => 'menu-item',
115113 'href' => '/admin',
116114 'page' => 'admin',
117115 'text' => '管理',
118- 'show' => $isAdmin,
116+ 'show' => (new \Std\Lib\Auth())->isAdmin(),
119117 ];
120118 }
121119