Skip to content

Commit 15bc218

Browse files
authored
Remove rebuild buttom from menus (#34782)
1 parent 99b76d5 commit 15bc218

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

administrator/components/com_menus/src/Controller/MenusController.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -110,38 +110,6 @@ public function delete()
110110
$this->setRedirect('index.php?option=com_menus&view=menus');
111111
}
112112

113-
/**
114-
* Rebuild the menu tree.
115-
*
116-
* @return boolean False on failure or error, true on success.
117-
*
118-
* @since 1.6
119-
*/
120-
public function rebuild()
121-
{
122-
$this->checkToken();
123-
124-
$this->setRedirect('index.php?option=com_menus&view=menus');
125-
126-
/** @var \Joomla\Component\Menus\Administrator\Model\ItemModel $model */
127-
$model = $this->getModel('Item');
128-
129-
if ($model->rebuild())
130-
{
131-
// Reorder succeeded.
132-
$this->setMessage(Text::_('COM_MENUS_ITEMS_REBUILD_SUCCESS'));
133-
134-
return true;
135-
}
136-
else
137-
{
138-
// Rebuild failed.
139-
$this->setMessage(Text::sprintf('COM_MENUS_ITEMS_REBUILD_FAILED', $model->getError()), 'error');
140-
141-
return false;
142-
}
143-
}
144-
145113
/**
146114
* Temporary method. This should go into the 1.5 to 1.6 upgrade routines.
147115
*

administrator/components/com_menus/src/View/Menus/HtmlView.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ protected function addToolbar()
125125
ToolbarHelper::deleteList('COM_MENUS_MENU_CONFIRM_DELETE', 'menus.delete', 'JTOOLBAR_DELETE');
126126
}
127127

128-
ToolbarHelper::custom('menus.rebuild', 'refresh', '', 'JTOOLBAR_REBUILD', false);
129-
130128
if ($canDo->get('core.admin') && $this->state->get('client_id') == 1)
131129
{
132130
ToolbarHelper::custom('menu.exportXml', 'download', '', 'COM_MENUS_MENU_EXPORT_BUTTON', true);

0 commit comments

Comments
 (0)