Skip to content

Commit

Permalink
Merge pull request #117 from maliang/master
Browse files Browse the repository at this point in the history
修复扩展启用参数bug
  • Loading branch information
slowlyo authored Jun 9, 2024
2 parents 019121a + 48f20ec commit 002a00f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.github export-ignore
/.git export-ignore
/.idea export-ignore
4 changes: 2 additions & 2 deletions src/Controllers/DevTools/ExtensionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function list()
'method' => 'post',
'data' => [
'id' => '${id}',
'enabled' => '${enabled}',
'enabled' => '${!enabled}',
],
])
->confirmText('${enabled ? "' . admin_trans('admin.extensions.disable_confirm') . '" : "' . admin_trans('admin.extensions.enable_confirm') . '"}'),
Expand Down Expand Up @@ -313,7 +313,7 @@ protected function getFilePath($file)
*/
public function enable(Request $request)
{
Admin::extension()->enable($request->id, !$request->enabled);
Admin::extension()->enable($request->id, $request->enabled);

//扩展启用禁用事件
ExtensionChanged::dispatch($request->id, $request->enabled ? 'enable' : 'disable');
Expand Down

0 comments on commit 002a00f

Please sign in to comment.