- md5
- 694d184034d9418785f0e117cbeafafb
- sha1
- 3d8032d0d2ac11ab47bbd8ca09c41feca23fd75a
- sha256
- 7d7683490985fc38884c52626c428dffe54aa39c39d08771a9254b5e9a276851
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
<?php
/**
* @package Joomla.Administrator
* @subpackage com_postinstall
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Postinstall message controller.
*
* @since 3.2
*/
class PostinstallControllerMessage extends FOFController
{
/**
* Resets all post-installation messages of the specified extension.
*
* @return void
*
* @since 3.2
*/
public function reset()
{
/** @var PostinstallModelMessages $model */
$model = $this->getThisModel();
$eid = (int) $model->getState('eid', '700', 'int');
if (empty($eid))
{
$eid = 700;
}
$model->resetMessages($eid);
$this->setRedirect('index.php?option=com_postinstall&eid=' . $eid);
}
/**
* Executes the action associated with an item.
*
* @return void
*
* @since 3.2
*/
public function action()
{
// CSRF prevention.
if ($this->csrfProtection)
{
$this->_csrfProtection();
}
$model = $this->getThisModel();
if (!$model->getId())
{
$model->setIDsFromRequest();
}
$item = $model->getItem();
switch ($item->type)
{
case 'link':
$this->setRedirect($item->action);
return;
break;
case 'action':
jimport('joomla.filesystem.file');
$file = FOFTemplateUtils::parsePath($item->action_file, true);
if (JFile::exists($file))
{
require_once $file;
call_user_func($item->action);
}
break;
case 'message':
default:
break;
}
$this->setRedirect('index.php?option=com_postinstall');
}
}
The same content is in 34 releases, Joomla 3.7.0-alpha2 to 3.8.3. See them all, or every version of this file.