| Server IP : 87.98.154.146 / Your IP : 216.73.216.101 Web Server : Apache System : Linux webm005.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : bsiadvisil ( 110003) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/bsiadvisil/www/plugins/system/msframework/ |
Upload File : |
<?php
/**
* MS Framework
*
* @package MS Framework Plugin
* @version 1.2.1.573
*
* @author Michael Snoeren
* @link https://snoerendevelopment.nl/
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
// Deny direct access
defined('_JEXEC') or die;
class PlgSystemMSFramework extends JPlugin
{
/**
* Plugin Data
* @var Mixed
* @access Protected
*/
protected $autoloadLanguage = true;
protected $helpersLoaded = false;
/**
* onAfterInitialise
* @access Public
* @return Boolean
*/
public function onAfterInitialise()
{
// Load the language files for the plugin
JFactory::getLanguage()->load('plg_msframework', JPATH_ADMINISTRATOR);
// Make the library accessible
JLoader::discover('MSFramework', JPATH_LIBRARIES . '/msframework/helpers/');
JLoader::discover('MSFrameworkModel', JPATH_ROOT . '/plugins/system/msframework/models/');
// Create a logfile for the framework
JLog::addLogger([
'text_file' => 'plg_msframework.log.php'
], JLog::ALL, array('plg_msframework'));
$this->requireHelpers();
// Trigger the custom event to make sure the framework is loaded
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterMSFrameworkInitialise', []);
}
/**
* onInstallerBeforePackageDownload
* Append the key to the url if required
* @param String &$url
* @param Array &$headers
* @access Public
* @return Boolean
*/
public function onInstallerBeforePackageDownload(&$url, &$headers)
{
$uri = JUri::getInstance($url);
$host = $uri->getHost();
if (!in_array($host, ['snoerendevelopment.nl', 'www.snoerendevelopment.nl'])) {
return true;
}
// Get the key if it is present
$key = trim(MSFrameworkKey::get());
// Add the license key to the url
if (!empty($key)) {
$uri->setVar('key', $key);
}
// Add statistics to the url
$siteUri = JUri::getInstance();
$uri->setVar('domain', $siteUri->getHost());
$url = $uri->toString();
}
/**
* Include all helpers
* @access Public
* @return Void
*/
public function requireHelpers()
{
if ($this->helpersLoaded) {
return;
}
// Require all helpers
JLoader::register('MSFramework', JPATH_ROOT . '/plugins/system/msframework/helper/frame.php');
MSFramework::setup();
$this->helpersLoaded = true;
}
}