Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions _build/data/transport.core.system_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2068,24 +2068,6 @@
'area' => 'manager',
'editedon' => null,
], '', true, true);
$settings['main_nav_parent'] = $xpdo->newObject(modSystemSetting::class);
$settings['main_nav_parent']->fromArray([
'key' => 'main_nav_parent',
'value' => 'topnav',
'xtype' => 'textfield',
'namespace' => 'core',
'area' => 'manager',
'editedon' => null,
], '', true, true);
$settings['user_nav_parent'] = $xpdo->newObject(modSystemSetting::class);
$settings['user_nav_parent']->fromArray([
'key' => 'user_nav_parent',
'value' => 'usernav',
'xtype' => 'textfield',
'namespace' => 'core',
'area' => 'manager',
'editedon' => null,
], '', true, true);
$settings['auto_isfolder'] = $xpdo->newObject(modSystemSetting::class);
$settings['auto_isfolder']->fromArray([
'key' => 'auto_isfolder',
Expand Down
4 changes: 0 additions & 4 deletions core/lexicon/en/setting.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,6 @@
$_lang['mail_inlinestyle_remove_style_tags'] = 'InlineStyle: Remove <style> tags';
$_lang['mail_inlinestyle_remove_style_tags_desc'] = 'After inlining styles, all &#x3C;style&#x3E; tags will be removed. <strong>Warning: This can cause issues with responsive email templates.</strong>';

$_lang['setting_main_nav_parent'] = 'Main menu parent';
$_lang['setting_main_nav_parent_desc'] = 'The container used to pull all records for the main menu.';

$_lang['setting_manager_direction'] = 'Manager Text Direction';
$_lang['setting_manager_direction_desc'] = 'Choose the direction that the text will be rendered in the Manager, left to right or right to left.';
Expand Down Expand Up @@ -796,8 +794,6 @@
$_lang['setting_use_weblink_target'] = 'Use WebLink Target';
$_lang['setting_use_weblink_target_desc'] = 'Set to true if you want to have MODX link tags and makeUrl() generate links as the target URL for WebLinks. Otherwise, the internal MODX URL will be generated by link tags and the makeUrl() method.';

$_lang['setting_user_nav_parent'] = 'User menu parent';
$_lang['setting_user_nav_parent_desc'] = 'The container used to pull all records for the user menu.';

$_lang['setting_welcome_screen'] = 'Show Welcome Screen';
$_lang['setting_welcome_screen_desc'] = 'If set to true, the welcome screen will show on the next successful loading of the welcome page, and then not show after that.';
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/default/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ public function render()
$mainNav = $this->modx->smarty->getTemplateVars('navb');
if (empty($mainNav)) {
$this->buildMenu(
$this->modx->getOption('main_nav_parent', null, 'topnav', true),
'topnav',
'navb'
);
Comment thread
Ibochkarev marked this conversation as resolved.
Outdated
}
$userNav = $this->modx->smarty->getTemplateVars('userNav');
if (empty($userNav)) {
$this->buildMenu(
$this->modx->getOption('user_nav_parent', null, 'usernav', true),
'usernav',
'userNav'
);
Comment thread
Ibochkarev marked this conversation as resolved.
Outdated
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* Remove main_nav_parent and user_nav_parent system settings.
* Menu position is configured in the Menu section; these settings caused confusion.
*
* @var modInstallVersion $this
* @var modX $modx
* @package setup
* @see https://github.com/modxcms/revolution/issues/15972
*/

use MODX\Revolution\modSystemSetting;

$settings = ['main_nav_parent', 'user_nav_parent'];
$messageTemplate = '<p class="%s">%s</p>';

foreach ($settings as $key) {
/** @var modSystemSetting $setting */
$setting = $modx->getObject(modSystemSetting::class, ['key' => $key]);
if ($setting instanceof modSystemSetting) {
if ($setting->remove()) {
$msg = $this->install->lexicon('system_setting_cleanup_success', ['key' => $key]);
$this->runner->addResult(
modInstallRunner::RESULT_SUCCESS,
sprintf($messageTemplate, 'ok', $msg)
);
} else {
$msg = $this->install->lexicon('system_setting_cleanup_failure', ['key' => $key]);
$this->runner->addResult(
modInstallRunner::RESULT_WARNING,
sprintf($messageTemplate, 'warning', $msg)
);
}
}
}
10 changes: 10 additions & 0 deletions setup/includes/upgrades/mysql/3.3.0-pl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Specific upgrades for Revolution 3.3.0-pl
*
* @var modX $modx
* @package setup
* @subpackage upgrades
*/

include dirname(__DIR__) . '/common/3.3.0-remove-nav-parent-settings.php';
Loading