diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..1deac3a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ + + +| Questions | Answers +| ------------- | ------------------------------------------------------- +| Description? | Please be specific when describing the PR.
Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table. +| Type? | bug fix / improvement / new feature / refacto / critical +| BC breaks? | yes / no +| Deprecations? | yes / no +| Fixed ticket? | Fixes PrestaShop/Prestashop#{issue number here}. +| How to test? | Please indicate how to best verify that this PR is correct. + + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..e9b1f18 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,14 @@ +branches: + - master +name-template: v$NEXT_PATCH_VERSION +tag-template: v$NEXT_PATCH_VERSION +categories: + - title: 🚀 Improvements + label: enhancement + - title: 🐛 Bug Fixes + label: bug +change-template: '- #$NUMBER: $TITLE by @$AUTHOR' +template: | + # Changes + + $CHANGES diff --git a/.gitignore b/.gitignore index 40da3e6..96aaa5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /config_*.xml /translations/*.php +/vendor/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..79a8a98 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,69 @@ +language: node_js + +notifications: + email: + on_success: never + +jobs: + include: + - stage: "PHP" + name: "PHPStan on PS nightly and unit tests" + language: php + php: 7.2 + script: + - composer install + # PHP syntax check + - bash -c '! (find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n1 -P4 php -l | grep "Parse error")' + # PHP cs fixer + # - composer run lint + # PHP Unit + # - composer run test + # PHP Stan + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:nightly + # - docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + # - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon + - stage: "PHP" + name: "PHPStan on PS 1.7.5.2" + language: php + php: 7.2 + script: + - composer install + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.5.1 + # - docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + # - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon + - stage: "PHP" + name: "PHPStan on PS 1.7.4.4" + language: php + php: 7.2 + script: + - composer install + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.4.4 + # - docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + # - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon + - stage: "PHP" + name: "PHPStan on PS 1.7.3.4" + language: php + php: 7.2 + script: + - composer install + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.3.4 + # - docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + # - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon + - stage: "PHP" + name: "PHPStan on PS 1.7.2.5" + language: php + php: 7.2 + script: + - composer install + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.2.5 + #- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + #- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon + - stage: "PHP" + name: "PHPStan on PS 1.7.1.2" + language: php + php: 7.2 + script: + - composer install + - docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.1.2 + # - docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_imageslider + # - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_imageslider -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_imageslider/tests/php/phpstan/phpstan.neon diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..460437d --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,22 @@ +GitHub contributors: +-------------------------------- +- aleeks +- antoin-m +- dkarvounaris +- emilien-puget +- eternoendless +- jocel1 +- julienbourdeau +- LouDk +- maximebiloe +- M03G +- nihco2 +- PatrykMakowski +- PrestaEdit +- Progi1984 +- Quetzacoalt91 +- sLorenzini +- tchauviere +- toutantic +- tucoinfo +- xBorderie diff --git a/Ps_HomeSlide.php b/Ps_HomeSlide.php index b94622c..93567d9 100644 --- a/Ps_HomeSlide.php +++ b/Ps_HomeSlide.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + */ class Ps_HomeSlide extends ObjectModel { @@ -81,8 +81,8 @@ public function delete() foreach ($images as $image) { if (preg_match('/sample/', $image) === 0) - if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) - $res &= @unlink(dirname(__FILE__).'/images/'.$image); + if ($image && file_exists(__DIR__.'/images/'.$image)) + $res &= @unlink(__DIR__.'/images/'.$image); } $res &= $this->reOrderPositions(); diff --git a/Readme.md b/README.md similarity index 85% rename from Readme.md rename to README.md index 8347bb7..6f290a9 100644 --- a/Readme.md +++ b/README.md @@ -4,6 +4,11 @@ Adds an image slider to your PrestaShop homepage. +## Multistore compatibility + +This module is not compatible with the multistore :x:
+It means that its configuration applies for all stores. + ## Reporting issues You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue]. diff --git a/ajax_ps_imageslider.php b/ajax_ps_imageslider.php index 01bdfbb..8fc6922 100644 --- a/ajax_ps_imageslider.php +++ b/ajax_ps_imageslider.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + */ include_once('../../config/config.inc.php'); include_once('../../init.php'); include_once('ps_imageslider.php'); diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..98d1a08 --- /dev/null +++ b/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "6040595d4062830278a2a681865bf928", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.0" + }, + "platform-dev": [] +} diff --git a/config.xml b/config.xml index efa32bf..20898af 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ ps_imageslider - + diff --git a/css/index.php b/css/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/css/index.php +++ b/css/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/homeslider.gif b/homeslider.gif index 2be4c3e..6555c07 100755 Binary files a/homeslider.gif and b/homeslider.gif differ diff --git a/images/index.php b/images/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/images/index.php +++ b/images/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/images/sample-1.jpg b/images/sample-1.jpg index 2934826..e7d6af0 100644 Binary files a/images/sample-1.jpg and b/images/sample-1.jpg differ diff --git a/images/sample-2.jpg b/images/sample-2.jpg index 8df94b4..1593fbf 100644 Binary files a/images/sample-2.jpg and b/images/sample-2.jpg differ diff --git a/images/sample-3.jpg b/images/sample-3.jpg index 8015cc4..8b48046 100644 Binary files a/images/sample-3.jpg and b/images/sample-3.jpg differ diff --git a/index.php b/index.php index 9484a53..fda1188 100755 --- a/index.php +++ b/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/js/homeslider.js b/js/homeslider.js index 307588e..2f27eab 100644 --- a/js/homeslider.js +++ b/js/homeslider.js @@ -1,28 +1,27 @@ -/* -* 2007-2015 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 -* @copyright 2007-2015 PrestaShop SA -* @version Release: $Revision$ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + */ jQuery(document).ready(function ($) { var homesliderConfig = { diff --git a/js/index.php b/js/index.php old mode 100644 new mode 100755 index 044cb85..fda1188 --- a/js/index.php +++ b/js/index.php @@ -1,35 +1,35 @@ -* @copyright 2007-2015 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; \ No newline at end of file +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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; diff --git a/logo.png b/logo.png index 9917b16..5b5f3db 100755 Binary files a/logo.png and b/logo.png differ diff --git a/ps_imageslider.php b/ps_imageslider.php index 6fe8f02..b29fe0f 100644 --- a/ps_imageslider.php +++ b/ps_imageslider.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + */ /** * @since 1.5.0 @@ -34,7 +34,12 @@ use PrestaShop\PrestaShop\Core\Module\WidgetInterface; -include_once(_PS_MODULE_DIR_.'ps_imageslider/Ps_HomeSlide.php'); +$autoloadPath = __DIR__ . '/vendor/autoload.php'; +if (file_exists($autoloadPath)) { + require_once $autoloadPath; +} + +include_once(__DIR__ . '/Ps_HomeSlide.php'); class Ps_ImageSlider extends Module implements WidgetInterface { @@ -49,7 +54,7 @@ public function __construct() { $this->name = 'ps_imageslider'; $this->tab = 'front_office_features'; - $this->version = '3.0.0'; + $this->version = '3.1.0'; $this->author = 'PrestaShop'; $this->need_instance = 0; $this->secure_key = Tools::encrypt($this->name); @@ -305,10 +310,6 @@ protected function _postValidation() if (!Validate::isInt(Tools::getValue('active_slide')) || (Tools::getValue('active_slide') != 0 && Tools::getValue('active_slide') != 1)) { $errors[] = $this->getTranslator()->trans('Invalid slide state.', array(), 'Modules.Imageslider.Admin'); } - /* Checks position */ - if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) { - $errors[] = $this->getTranslator()->trans('Invalid slide position.', array(), 'Modules.Imageslider.Admin'); - } /* If edit : checks id_slide */ if (Tools::isSubmit('id_slide')) { if (!Validate::isInt(Tools::getValue('id_slide')) && !$this->slideExists(Tools::getValue('id_slide'))) { @@ -442,9 +443,9 @@ protected function _postProcess() } } else { $slide = new Ps_HomeSlide(); + /* Sets position */ + $slide->position = (int)$this->getNextPosition(); } - /* Sets position */ - $slide->position = (int)Tools::getValue('position'); /* Sets active */ $slide->active = (int)Tools::getValue('active_slide'); @@ -480,7 +481,7 @@ protected function _postProcess() $errors[] = $error; } elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) { return false; - } elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.$salt.'_'.$_FILES['image_'.$language['id_lang']]['name'], null, null, $type)) { + } elseif (!ImageManager::resize($temp_name, __DIR__.'/images/'.$salt.'_'.$_FILES['image_'.$language['id_lang']]['name'], null, null, $type)) { $errors[] = $this->displayError($this->getTranslator()->trans('An error occurred during the image upload process.', array(), 'Admin.Notifications.Error')); } if (isset($temp_name)) { @@ -546,7 +547,7 @@ public function getWidgetVariables($hookName = null, array $configuration = []) $slides = $this->getSlides(true); if (is_array($slides)) { foreach ($slides as &$slide) { - $slide['sizes'] = @getimagesize((dirname(__FILE__) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $slide['image'])); + $slide['sizes'] = @getimagesize((__DIR__ . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . $slide['image'])); if (isset($slide['sizes'][3]) && $slide['sizes'][3]) { $slide['size'] = $slide['sizes'][3]; } diff --git a/translations/index.php b/translations/index.php old mode 100644 new mode 100755 index 044cb85..fda1188 --- a/translations/index.php +++ b/translations/index.php @@ -1,35 +1,35 @@ -* @copyright 2007-2015 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; \ No newline at end of file +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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; diff --git a/upgrade/index.php b/upgrade/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/upgrade/index.php +++ b/upgrade/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/upgrade/upgrade-from-homeslider.php b/upgrade/upgrade-from-homeslider.php index c60546a..93f460a 100644 --- a/upgrade/upgrade-from-homeslider.php +++ b/upgrade/upgrade-from-homeslider.php @@ -1,4 +1,28 @@ + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + */ if (!defined('_PS_VERSION_')) exit; diff --git a/views/index.php b/views/index.php old mode 100644 new mode 100755 index e06b07c..fda1188 --- a/views/index.php +++ b/views/index.php @@ -1,35 +1,35 @@ - -* @copyright 2007-2015 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; \ No newline at end of file + + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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; diff --git a/views/templates/admin/_configure/helpers/form/form.tpl b/views/templates/admin/_configure/helpers/form/form.tpl index 63c4a79..819cd40 100644 --- a/views/templates/admin/_configure/helpers/form/form.tpl +++ b/views/templates/admin/_configure/helpers/form/form.tpl @@ -1,27 +1,27 @@ {* -* 2007-2015 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 -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + *} {extends file="helpers/form/form.tpl"} {block name="field"} diff --git a/views/templates/admin/_configure/helpers/form/index.php b/views/templates/admin/_configure/helpers/form/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/views/templates/admin/_configure/helpers/form/index.php +++ b/views/templates/admin/_configure/helpers/form/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/views/templates/admin/_configure/helpers/index.php b/views/templates/admin/_configure/helpers/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/views/templates/admin/_configure/helpers/index.php +++ b/views/templates/admin/_configure/helpers/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/views/templates/admin/_configure/index.php b/views/templates/admin/_configure/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/views/templates/admin/_configure/index.php +++ b/views/templates/admin/_configure/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/views/templates/admin/index.php b/views/templates/admin/index.php old mode 100644 new mode 100755 index 9484a53..fda1188 --- a/views/templates/admin/index.php +++ b/views/templates/admin/index.php @@ -1,28 +1,28 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +/** + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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'); @@ -32,4 +32,4 @@ header('Pragma: no-cache'); header('Location: ../'); -exit; \ No newline at end of file +exit; diff --git a/views/templates/hook/index.php b/views/templates/hook/index.php old mode 100644 new mode 100755 index e06b07c..fda1188 --- a/views/templates/hook/index.php +++ b/views/templates/hook/index.php @@ -1,35 +1,35 @@ - -* @copyright 2007-2015 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; \ No newline at end of file + + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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; diff --git a/views/templates/hook/list.tpl b/views/templates/hook/list.tpl index 18883e3..9b17738 100644 --- a/views/templates/hook/list.tpl +++ b/views/templates/hook/list.tpl @@ -1,27 +1,27 @@ {* -* 2007-2015 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 -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + *}

{l s='Slides list' d='Modules.Imageslider.Admin'} diff --git a/views/templates/hook/slider.tpl b/views/templates/hook/slider.tpl index a856a40..1c44232 100644 --- a/views/templates/hook/slider.tpl +++ b/views/templates/hook/slider.tpl @@ -1,28 +1,27 @@ {* -* 2007-2015 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 -* @copyright 2007-2015 PrestaShop SA -* @version Release: $Revision$ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} + * 2007-2020 PrestaShop. + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License 3.0 (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: + * https://opensource.org/licenses/AFL-3.0 + * 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 + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + * International Registered Trademark & Property of PrestaShop SA + *} {if $homeslider.slides}
diff --git a/views/templates/index.php b/views/templates/index.php old mode 100644 new mode 100755 index e06b07c..fda1188 --- a/views/templates/index.php +++ b/views/templates/index.php @@ -1,35 +1,35 @@ - -* @copyright 2007-2015 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; \ No newline at end of file + + * @copyright 2007-2020 PrestaShop SA + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (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;