diff --git a/setup/includes/upgrades/common/3.1.0-trash-menu.php b/setup/includes/upgrades/common/3.1.0-trash-menu.php new file mode 100644 index 00000000000..8e58ceb50f7 --- /dev/null +++ b/setup/includes/upgrades/common/3.1.0-trash-menu.php @@ -0,0 +1,24 @@ +getObject(modMenu::class, ['text' => 'trash']); +if (!$trashMenu) { + $trashMenu = $modx->newObject(modMenu::class); + $trashMenu->fromArray([ + 'menuindex' => 4, + 'text' => 'trash', + 'description' => 'trash_desc', + 'parent' => 'site', + 'permissions' => 'menu_trash', + 'action' => 'resource/trash', + ], '', true, true); + $trashMenu->save(); +} diff --git a/setup/includes/upgrades/mysql/3.1.0-pl.php b/setup/includes/upgrades/mysql/3.1.0-pl.php index f9e35247d7b..ab985fbd2ab 100644 --- a/setup/includes/upgrades/mysql/3.1.0-pl.php +++ b/setup/includes/upgrades/mysql/3.1.0-pl.php @@ -10,3 +10,4 @@ /* run upgrades common to all db platforms */ include dirname(__DIR__) . '/common/3.1.0-remove-deprecated-resource-fields.php'; include dirname(__DIR__) . '/common/3.1.0-modify-usergrouprole-authority-index.php'; +include dirname(__DIR__) . '/common/3.1.0-trash-menu.php';