original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: Rebuild the nested set tree.
  
  @return  bool  False on failure or error, true on success.
  
  @since   1.6
docstring_tokens: Rebuild the nested set tree .