first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* 2007-2017 PrestaShop
*
* 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-2014 PrestaShop SA
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
* International Registered Trademark & Property of PrestaShop SA
*/
class EmailTemplateFilterIterator extends RecursiveFilterIterator
{
private static $validExtensions = array('tpl', 'html', 'txt');
public function accept()
{
if ($this->getInnerIterator()->hasChildren()) {
return true;
}
return in_array(
$this->current()->getExtension(),
self::$validExtensions,
true
);
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* 2007-2017 PrestaShop
*
* 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-2014 PrestaShop SA
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
* International Registered Trademark & Property of PrestaShop SA
*/
class ImageFilterIterator extends RecursiveFilterIterator
{
private static $validTypeConstants = array(
IMAGETYPE_GIF,
IMAGETYPE_JPEG,
IMAGETYPE_PNG,
);
public function accept()
{
return $this->getInnerIterator()->hasChildren() || $this->isImage();
}
private function isImage()
{
$filePath = $this->current()->getRealPath();
if (is_dir($filePath)) {
return false;
}
if (function_exists('exif_imagetype')) {
$type = exif_imagetype($filePath);
return in_array($type, self::$validTypeConstants, true);
} else {
$imagesize = getimagesize($filePath);
// Index 2 is one of the IMAGETYPE_XXX constants indicating the
// type of the image
return in_array($imagesize[2], self::$validTypeConstants, true);
}
}
}

View File

@@ -0,0 +1,25 @@
<?php
/**
* 2007-2017 PrestaShop
*
* 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-2014 PrestaShop SA
* @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use
* 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;