| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/lyon/plugins/installer/juupdater/ |
Upload File : |
<?php
/**
* JoomUnited Updater
*
* @package Juupdater.Plugin
* @subpackage Installer.juupdater
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') || die;
// Use Joomla\Registry\Registry;
jimport('joomla.plugin.plugin');
/**
* Juupdater Installer plugin
*/
class PlgInstallerJuupdater extends JPlugin
{
/**
* Installer before package download
*
* @param string $url URL
*
* @internal param $headers
*
* @return void
* @throws \Exception Throw when application can not start
* @since version
*/
public function onInstallerBeforePackageDownload($url)
{
if (strpos($url, 'infosite=joomunited')) {
$url_checktoken = str_replace('task=download.download', 'task=download.checktoken', $url);
$app = JFactory::getApplication();
$http = JHttpFactory::getHttp();
$response = $http->get($url_checktoken);
$res_body = json_decode($response->body);
if ($res_body->status === false) {
if ($res_body->linkdownload !== '') {
JFactory::getApplication()->enqueueMessage($res_body->linkdownload);
} else {
JFactory::getApplication()->enqueueMessage( $res_body->datas);
}
$app->redirect(JUri::base() . 'index.php?option=com_installer&view=update');
}
}
}
}