download all files

This commit is contained in:
Roman Pyrih
2025-06-24 14:14:35 +02:00
parent ebed09c00b
commit 4c71b5d9c2
72007 changed files with 10407727 additions and 40029 deletions

View File

@@ -0,0 +1,116 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
namespace Teamwant\Prestashop17\Redis\Classes\Versions;
use Teamwant\Prestashop17\Redis\Classes\TeamwantRedis;
use Media;
use Tools;
trait TeamwantRedisVersion
{
use TeamwantRedis;
public function install()
{
$this->createCustomOverride($this->prestashopVersion);
$out = parent::install()
&& $this->registerHook('backOfficeHeader');
$this->registerAdminControllers();
return $out;
}
public function uninstall()
{
$this->uninstallAdminControllers();
$this->removeCustomOverride();
return parent::uninstall();
}
public function enable($force_all = false)
{
$this->createCustomOverride($this->prestashopVersion);
$this->registerHook('backOfficeHeader');
$this->registerAdminControllers();
return parent::enable($force_all);
}
public function disable($force_all = false)
{
$this->uninstallAdminControllers();
$this->removeCustomOverride();
return parent::disable($force_all);
}
public function hookBackOfficeHeader()
{
//custom js variables
Media::addJsDef([
'token_AdminRedisConfiguration' => Tools::getAdminTokenLite('AdminRedisConfiguration'),
]);
$controller = Tools::getValue('controller', '');
if ($controller === 'AdminPerformance') {
//custom js variables
Media::addJsDef([
'tw_redis_lang_save_change_on_performance' => $this->l('Are you sure to save the changes? The redis configuration has not been saved.')
]);
}
//custom js
$this->context->controller->addJquery();
$this->context->controller->addJs($this->_path . 'views/js/redis-admin1700.js');
//custom css
$this->context->controller->addCSS($this->_path . 'views/css/redis-admin1700.css');
}
public function validateFilePrivilagesForTeamwantRedisModule()
{
if (!file_exists(TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php')) {
@file_put_contents(TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php', '');
}
if (file_exists(TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php')) {
if (!is_writable(TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php')) {
$this->adminDisplayWarning(self::staticModuleTranslate('File %s must be writable.', [
TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php'
]));
}
if (!is_readable(TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php')) {
$this->adminDisplayWarning(self::staticModuleTranslate('File %s must be readable.', [
TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php'
]));
}
} else {
$this->adminDisplayWarning(self::staticModuleTranslate('Can\'t create file %s.', [
TEAMWANT_REDIS_ROOT_DIR . '/config/_RedisConfiguration.php'
]));
}
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
namespace Teamwant\Prestashop17\Redis\Classes\Versions;
use Teamwant\Prestashop17\Redis\Classes\TeamwantRedis;
trait TeamwantRedisVersion
{
use TeamwantRedis;
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
namespace Teamwant\Prestashop17\Redis\Classes\Versions;
use Teamwant\Prestashop17\Redis\Classes\TeamwantRedis;
use Media;
use Tools;
trait TeamwantRedisVersion
{
use TeamwantRedis;
public function hookBackOfficeHeader()
{
//custom js variables
Media::addJsDef([
'token_AdminRedisConfiguration' => Tools::getAdminTokenLite('AdminRedisConfiguration'),
]);
$controller = Tools::getValue('controller', '');
if ($controller === 'AdminPerformance') {
//custom js variables
Media::addJsDef([
'tw_redis_lang_save_change_on_performance' => $this->l('Are you sure to save the changes? The redis configuration has not been saved.')
]);
}
$this->context->controller->addJquery();
//custom js
$this->context->controller->addJs($this->_path . 'views/js/redis-admin1770.js');
//custom css
$this->context->controller->addCSS($this->_path . 'views/css/redis-admin1770.css');
}
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
namespace Teamwant\Prestashop17\Redis\Classes\Versions;
use Teamwant\Prestashop17\Redis\Classes\TeamwantRedis;
use Media;
use Tools;
trait TeamwantRedisVersion
{
use TeamwantRedis;
public function hookBackOfficeHeader()
{
//custom js variables
Media::addJsDef([
'token_AdminRedisConfiguration' => Tools::getAdminTokenLite('AdminRedisConfiguration'),
]);
$controller = Tools::getValue('controller', '');
if ($controller === 'AdminPerformance') {
//custom js variables
Media::addJsDef([
'tw_redis_lang_save_change_on_performance' => $this->l('Are you sure to save the changes? The redis configuration has not been saved.')
]);
}
$this->context->controller->addJquery();
//custom js
$this->context->controller->addJs($this->_path . 'views/js/redis-admin1780.js');
//custom css (zostawiam wersje 1770)
$this->context->controller->addCSS($this->_path . 'views/css/redis-admin1770.css');
}
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
require_once(TEAMWANT_REDIS_ROOT_DIR . '/classes_old7.0/TeamwantRedis.php');
if (version_compare(_PS_VERSION_, '1.7.0.0', '>=') === true
&& version_compare(_PS_VERSION_, '1.7.3.0', '<') === true
) {
require_once(TEAMWANT_REDIS_ROOT_DIR . '/classes_old7.0/versions/TeamwantRedisFor1700.php');
} elseif (version_compare(_PS_VERSION_, '1.7.3.0', '>=') === true
&& version_compare(_PS_VERSION_, '1.7.7.0', '<') === true
) {
require_once(TEAMWANT_REDIS_ROOT_DIR . '/classes_old7.0/versions/TeamwantRedisFor1760.php');
} elseif (version_compare(_PS_VERSION_, '1.7.7.0', '>=') === true
&& version_compare(_PS_VERSION_, '1.7.8.0', '<') === true
) {
require_once(TEAMWANT_REDIS_ROOT_DIR . '/classes_old7.0/versions/TeamwantRedisFor1770.php');
} else {
require_once(TEAMWANT_REDIS_ROOT_DIR . '/classes_old7.0/versions/TeamwantRedisFor1780.php');
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Redis Cache
* Version: 2.1.1
* Copyright (c) 2020-2022. Mateusz Szymański Teamwant
* https://teamwant.pl
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @author Teamwant <kontakt@teamwant.pl>
* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @category Teamwant
* @package Teamwant
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;