Source for file message.php

Documentation is available at message.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_postinstall
  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.     /**
  14.      * Resets all post-installation messages of the specified extension
  15.      *
  16.      * @return  void 
  17.      *
  18.      * @since   3.2
  19.      */
  20.     public function reset()
  21.     {
  22.         $model $this->getThisModel();
  23.  
  24.         $eid $this->input->getInt('eid''700');
  25.  
  26.         $model->resetMessages($eid);
  27.  
  28.         $this->setRedirect('index.php?option=com_postinstall');
  29.     }
  30.  
  31.     /**
  32.      * Executes the action associated with an item
  33.      *
  34.      * @return  void 
  35.      *
  36.      * @since   3.2
  37.      */
  38.     public function action()
  39.     {
  40.         // CSRF prevention
  41.         if ($this->csrfProtection)
  42.         {
  43.             $this->_csrfProtection();
  44.         }
  45.  
  46.         $model $this->getThisModel();
  47.  
  48.         if (!$model->getId())
  49.         {
  50.             $model->setIDsFromRequest();
  51.         }
  52.  
  53.         $item $model->getItem();
  54.  
  55.         switch ($item->type)
  56.         {
  57.             case 'link':
  58.                 $this->setRedirect($item->action);
  59.  
  60.                 return;
  61.  
  62.                 break;
  63.  
  64.             case 'action':
  65.                 jimport('joomla.filesystem.file');
  66.  
  67.                 $file FOFTemplateUtils::parsePath($item->action_filetrue);
  68.  
  69.                 if (JFile::exists($file))
  70.                 {
  71.                     require_once $file;
  72.  
  73.                     call_user_func($item->action);
  74.                 }
  75.                 break;
  76.  
  77.             case 'message':
  78.             default:
  79.                 break;
  80.         }
  81.  
  82.         $this->setRedirect('index.php?option=com_postinstall');
  83.     }
  84. }

Documentation generated on Tue, 19 Nov 2013 15:08:06 +0100 by phpDocumentor 1.4.3