| Server IP : 81.19.159.101 / Your IP : 216.73.217.111 Web Server : Apache System : Linux www58.world4you.com 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : ftp8817043 ( 2681) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/.sites/103/site8817043/web/wp-content/plugins/akeebabackupwp/app/Solo/Controller/ |
Upload File : |
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2025 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Solo\Controller;
use Awf\Text\Text;
class Discover extends ControllerDefault
{
/**
* Discovers JPA, JPS and ZIP files in the selected profile's directory and
* lets you select them for inclusion in the import process.
*
* @return void
*/
public function discover()
{
$this->csrfProtection();
$router = $this->container->router;
$returnUrl = $router->route('index.php?view=discover');
$directory = $this->input->get('directory', '', 'string');
if (empty($directory))
{
$msg = Text::_('COM_AKEEBA_DISCOVER_ERROR_NODIRECTORY');
$this->setRedirect($returnUrl, $msg, 'error');
return;
}
$model = $this->getModel();
$model->setState('directory', $directory);
$this->display();
}
/**
* Performs the actual import
*
* @return void
*/
public function import()
{
$this->csrfProtection();
$router = $this->container->router;
$returnUrl = $router->route('index.php?view=discover');
$directory = $this->input->get('directory', '', 'string');
$files = $this->input->get('files', array(), 'array');
if (empty($files))
{
$msg = Text::_('COM_AKEEBA_DISCOVER_ERROR_NOFILESSELECTED');
$this->setRedirect($returnUrl, $msg, 'error');
return;
}
/** @var \Solo\Model\Discover $model */
$model = $this->getModel();
$model->setState('directory', $directory);
foreach ($files as $file)
{
$model->import($file);
}
$msg = Text::_('COM_AKEEBA_DISCOVER_LABEL_IMPORTDONE');
$this->setRedirect($returnUrl, $msg);
}
}