| 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/helper/ |
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;
abstract class MSFrameworkKey
{
/**
* Class Data
* @var Object
* @access Protected
*/
protected static $modelKey = null;
/**
* Set the download key
* @param String $key The download key
* @access Public
* @return Boolean
*/
public static function set($key)
{
if (!is_string($key) || empty($key)) {
return false;
}
$model = self::getKeyModel();
return $model->setKey($key);
}
/**
* Get the download key
* @access Public
* @return String
*/
public static function get()
{
$model = self::getKeyModel();
return $model->getKey();
}
/**
* Does the installation have a key?
* @access Public
* @return Boolean
*/
public static function hasKey()
{
$model = self::getKeyModel();
return $model->hasKey();
}
/**
* Update the key from the keyfile
* @access Public
* @return Boolean
*/
public static function updateByFile()
{
$keyFile = JPATH_ROOT . '/plugins/system/msframework/key.sdkey';
if (!JFile::exists($keyFile)) {
return true;
}
// Get the key and clean it
$key = file_get_contents($keyFile);
$key = preg_replace('/[^\w]/', '', $key);
$model = self::getKeyModel();
return $model->setKey($key);
}
/**
* Get the key model
* @access Protected
* @return Object
*/
protected static function getKeyModel()
{
if (!is_object(self::$modelKey)) {
self::$modelKey = JModelLegacy::getInstance('Key', 'MSFrameworkModel');
}
return self::$modelKey;
}
}