Disable ExamplePlugin (#13391)

This commit is contained in:
Tony Murray
2021-10-20 08:02:01 -05:00
committed by GitHub
parent 4c572427b2
commit fb934e2ede
2 changed files with 34 additions and 1 deletions

View File

@@ -191,7 +191,7 @@ class PluginManager
try {
$plugin = Plugin::create([
'plugin_name' => $name,
'plugin_active' => 1,
'plugin_active' => $name !== 'ExamplePlugin',
'version' => 2,
]);
$this->getPlugins()->put($name, $plugin);

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
class DisableExamplePlugin extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// disable ExamplePlugin that was accidentally enabled for everyone
DB::table('plugins')
->where([
'plugin_name' => 'ExamplePlugin',
'version' => 2,
])->update([
'plugin_active' => 0,
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}