<?php
/**
 * Akeeba Backup Restoration Script
 *
 * @package   brs
 * @copyright Copyright (c)2025 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license   GNU General Public License version 3, or later
 */

namespace Akeeba\BRS\Platform\Controller;

defined('_AKEEBA') or die();

class Finalise extends \Akeeba\BRS\Controller\Finalise
{
	public function onBeforeMain(): bool
	{
		/** @var \Akeeba\BRS\Platform\Model\Finalise $model */
		$model = $this->getThisModel();
		$input = $this->getContainer()->get('input');

		$model->setState('bak_first', $input->getInt('bak_first', 0));
		$model->updatehtaccess();

		return parent::onBeforeMain();
	}
}