PageRenderTime 50ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/aamenu/code/trunk/administrator/components/com_aamenu/controllers/tags.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 42 lines | 20 code | 6 blank | 16 comment | 2 complexity | 227773fdb354a44ea1b8ceb4c89155e8 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id$
  4. * @copyright Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
  5. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  6. * @link http://www.theartofjoomla.com
  7. */
  8. defined('_JEXEC') or die('Invalid Request.');
  9. jimport('joomla.application.component.controller');
  10. /**
  11. * The Setup Controller
  12. *
  13. * @package Artof.AAMenu
  14. * @subpackage com_aamenu
  15. */
  16. class AAMenuControllerTags extends JController
  17. {
  18. /**
  19. * Save the record
  20. */
  21. function save()
  22. {
  23. // Check for request forgeries
  24. JRequest::checkToken('request') or jexit(JText::_('COM_AAMENU_INVALID_TOKEN'));
  25. $model = $this->getModel('tags');
  26. $model->setState('request', JRequest::get('post'));
  27. if ($model->save()) {
  28. $this->setMessage(JText::_('COM_AAMENU_Tags_Saved'));
  29. }
  30. else {
  31. $this->setMessage(JText::_('COM_AAMENU_Tags_Save_failed'));
  32. JError::raiseWarning($model->getError());
  33. }
  34. $this->setRedirect('index.php?option=com_aamenu');
  35. }
  36. }