english/administrator/components/com_menus/controllers/menus.php
/**
	 * Rebuild the menu tree.
	 *
	 * @return	bool	False on failure or error, true on success.
	 */
Rebuild the menu tree.
@return      bool    False on failure or error, true on success.
Rebuild the menu tree . @return bool False on failure or error true on success .
public function rebuild()
	{
		JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
		$this->setRedirect('index.php?option=com_menus&view=menus');
		$model = $this->getModel('Item');
		if ($model->rebuild()) {
			$this->setMessage(JText::_('JTOOLBAR_REBUILD_SUCCESS'));
			return true;
		} else {
			$this->setMessage(JText::sprintf('JTOOLBAR_REBUILD_FAILED', $model->getMessage()));
			return false;
		}
	}
public function rebuild ( ) { JRequest :: checkToken ( ) or jexit ( JText :: _ ( 'JINVALID_TOKEN' ) ) ; $ this -> setRedirect ( 'index.php?option=com_menus&view=menus' ) ; $ model = $ this -> getModel ( 'Item' ) ; if ( $ model -> rebuild ( ) ) { $ this -> setMessage ( JText :: _ ( 'JTOOLBAR_REBUILD_SUCCESS' ) ) ; return true ; } else { $ this -> setMessage ( JText :: sprintf ( 'JTOOLBAR_REBUILD_FAILED' , $ model -> getMessage ( ) ) ) ; return false ; } }
Rebuild the menu tree.
Rebuild the menu tree .
// Initialise variables. // Reorder succeeded. // Rebuild failed.