Source for file overrides.php

Documentation is available at overrides.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_languages
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Languages Overrides Controller
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_languages
  17.  * @since       2.5
  18.  */
  19. {
  20.     /**
  21.      * The prefix to use with controller messages
  22.      *
  23.      * @var        string 
  24.      * @since    2.5
  25.      */
  26.     protected $text_prefix = 'COM_LANGUAGES_VIEW_OVERRIDES';
  27.  
  28.     /**
  29.      * Method for deleting one or more overrides
  30.      *
  31.      * @return  void 
  32.      *
  33.      * @since        2.5
  34.      */
  35.     public function delete()
  36.     {
  37.         // Check for request forgeries
  38.         JSession::checkToken(or die(JText::_('JINVALID_TOKEN'));
  39.  
  40.         // Get items to dlete from the request
  41.         $cid $this->input->get('cid'array()'array');
  42.  
  43.         if (!is_array($cid|| count($cid1)
  44.         {
  45.             $this->setMessage(JText::_($this->text_prefix.'_NO_ITEM_SELECTED')'warning');
  46.         }
  47.         else
  48.         {
  49.             // Get the model
  50.             $model $this->getModel('overrides');
  51.  
  52.             // Remove the items
  53.             if ($model->delete($cid))
  54.             {
  55.                 $this->setMessage(JText::plural($this->text_prefix.'_N_ITEMS_DELETED'count($cid)));
  56.             }
  57.             else
  58.             {
  59.                 $this->setMessage($model->getError());
  60.             }
  61.         }
  62.  
  63.         $this->setRedirect(JRoute::_('index.php?option='.$this->option.'&view='.$this->view_listfalse));
  64.     }
  65. }

Documentation generated on Tue, 19 Nov 2013 15:09:57 +0100 by phpDocumentor 1.4.3