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,33 @@
<?php
/**
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 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/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;

View File

@@ -0,0 +1,62 @@
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
* @author FMM Modules
* @copyright FME Modules 2019
* @license Single domain
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_0_0($module)
{
$sql = array();
$return = true;
if (columnExist('dependant') && columnExist('dependant_field') && columnExist('dependant_value')) {
$return = true;
} else {
$return = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'fmm_custom_fields`
ADD `dependant` INT(1) NOT NULL DEFAULT 0,
ADD `dependant_field` INT(10) NOT NULL DEFAULT 0,
ADD `dependant_value` INT(10) NOT NULL DEFAULT 0'
);
}
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'fmm_custom_fields_group` (
`id_custom_field` int(10) NOT NULL,
`id_group` int(10) NOT NULL,
PRIMARY KEY (`id_custom_field`, `id_group`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'fmm_custom_fields_categories` (
`id_custom_field` int(10) NOT NULL,
`id_category` int(10) NOT NULL,
PRIMARY KEY (`id_custom_field`, `id_category`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
foreach ($sql as $query) {
if (Db::getInstance()->execute($query) == false) {
$return = false;
}
}
return $return;
}
function columnExist($column_name)
{
$columns = Db::getInstance()->ExecuteS('SELECT COLUMN_NAME FROM information_schema.columns
WHERE table_schema = "'._DB_NAME_.'" AND table_name = "'._DB_PREFIX_.'fmm_custom_fields"');
if (isset($columns) && $columns) {
foreach ($columns as $column) {
if ($column['COLUMN_NAME'] == $column_name) {
return true;
}
}
}
return false;
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
* @author FMM Modules
* @copyright FME Modules 2019
* @license Single domain
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_0_2($module)
{
$sql = array();
$return = true;
if (columnExist('default_value')) {
$return = true;
} else {
$return = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'fmm_custom_fields_lang`
ADD `default_value` varchar(255) default NULL'
);
}
if (!columnExistNot('default_value')) {
$return = true;
} else {
$return = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'fmm_custom_fields`
DROP `default_value`'
);
}
return $return;
}
function columnExist($column_name)
{
$columns = Db::getInstance()->ExecuteS('SELECT COLUMN_NAME FROM information_schema.columns
WHERE table_schema = "'._DB_NAME_.'" AND table_name = "'._DB_PREFIX_.'fmm_custom_fields_lang"');
if (isset($columns) && $columns) {
foreach ($columns as $column) {
if ($column['COLUMN_NAME'] == $column_name) {
return true;
}
}
}
return false;
}
function columnExistNot($column_name)
{
$columns = Db::getInstance()->ExecuteS('SELECT COLUMN_NAME FROM information_schema.columns
WHERE table_schema = "'._DB_NAME_.'" AND table_name = "'._DB_PREFIX_.'fmm_custom_fields"');
if (isset($columns) && $columns) {
foreach ($columns as $column) {
if ($column['COLUMN_NAME'] == $column_name) {
return true;
}
}
}
return false;
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
* @author FMM Modules
* @copyright FME Modules 2019
* @license Single domain
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_0($module)
{
$return = true;
foreach ($module->getNewTableNames() as $old_name => $new_name) {
if (tableExists($old_name)) {
$return &= renameTable($old_name, $new_name);
}
}
return $return;
}
function renameTable($old_name, $new_name)
{
return (bool)Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.pSQL($old_name).' RENAME '._DB_PREFIX_.pSQL($new_name));
}
function tableExists($table)
{
return (bool)Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.pSQL($table).'\'');
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
* @author FMM Modules
* @copyright FME Modules 2020
* @license Single domain
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_2_0($module)
{
$sql = array();
$return = true;
$sql[] = 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'custom_field_headings(
`id_custom_field_headings` int(11) NOT NULL auto_increment,
PRIMARY KEY (`id_custom_field_headings`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8';
$sql[] = 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'custom_field_headings_lang(
`id_custom_field_headings` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`title` varchar(255) default NULL,
PRIMARY KEY (`id_custom_field_headings`,`id_lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8';
foreach ($sql as $query) {
if (Db::getInstance()->execute($query) == false) {
$return = false;
}
else {
$return = true;
}
}
if (!columnExist('id_heading')) {
Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'custom_field`
ADD `id_heading` int(11) DEFAULT 0'
);
}
$tab = new Tab();
$tab->class_name = 'AdminCustomFieldsHeadings';
$tab->id_parent = Tab::getIdFromClassName('AdminCustomFields');
$tab->module = 'customfields';
$tab->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] = $module->l('Custom Fields Headings');
if (true === Tools::version_compare(_PS_VERSION_, '1.7.0.0', '>=')) {
$tab->icon = 'content_paste';
}
$tab->add();
return $return;
}
function columnExist($column_name)
{
$columns = Db::getInstance()->ExecuteS('SELECT COLUMN_NAME FROM information_schema.columns
WHERE table_schema = "'._DB_NAME_.'" AND table_name = "'._DB_PREFIX_.'custom_field"');
if (isset($columns) && $columns) {
foreach ($columns as $column) {
if ($column['COLUMN_NAME'] == $column_name) {
return true;
}
}
}
return false;
}