public function rebuild()
	{
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		$extension = $this->input->get('extension');
		$this->setRedirect(JRoute::_('index.php?option=com_categories&view=categories&extension=' . $extension, false));

		/** @var CategoriesModelCategory $model */
		$model = $this->getModel();

		if ($model->rebuild())
		{
			// Rebuild succeeded.
			$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_SUCCESS'));

			return true;
		}

		// Rebuild failed.
		$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_FAILURE'));

		return false;
	}
public function rebuild()
	{
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		$extension = $this->input->get('extension');
		$this->setRedirect(JRoute::_('index.php?option=com_categories&view=categories&extension=' . $extension, false));

		/** @var CategoriesModelCategory $model */
		$model = $this->getModel();

		if ($model->rebuild())
		{
			// Rebuild succeeded.
			$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_SUCCESS'));

			return true;
		}

		// Rebuild failed.
		$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_FAILURE'));

		return false;
	}
public function rebuild ( ) { JSession :: checkToken ( ) or jexit ( JText :: _ ( 'JINVALID_TOKEN' ) ) ; $ extension = $ this -> input -> get ( 'extension' ) ; $ this -> setRedirect ( JRoute :: _ ( 'index.php?option=com_categories&view=categories&extension=' . $ extension , false ) ) ; /** @var CategoriesModelCategory $model */ $ model = $ this -> getModel ( ) ; if ( $ model -> rebuild ( ) ) { // Rebuild succeeded. $ this -> setMessage ( JText :: _ ( 'COM_CATEGORIES_REBUILD_SUCCESS' ) ) ; return true ; } // Rebuild failed. $ this -> setMessage ( JText :: _ ( 'COM_CATEGORIES_REBUILD_FAILURE' ) ) ; return false ; }
Rebuild the nested set tree.

@return  bool  False on failure or error, true on success.

@since   1.6
Rebuild the nested set tree .