Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.1.0 #51

Merged
merged 23 commits into from Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,19 @@
<!-----------------------------------------------------------------------------
Thank you for contributing to the PrestaShop project!

Please take the time to edit the "Answers" rows below with the necessary information.

Check out our contribution guidelines to find out how to complete it:
https://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/#pull-requests
------------------------------------------------------------------------------>

| Questions | Answers
| ------------- | -------------------------------------------------------
| Description? | Please be specific when describing the PR. <br> 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.

<!-- Click the form's "Preview" button to make sure the table is functional in GitHub. Thank you! -->
14 changes: 14 additions & 0 deletions .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
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
/config_*.xml
/translations/*.php
/vendor/
69 changes: 69 additions & 0 deletions .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
22 changes: 22 additions & 0 deletions 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
52 changes: 26 additions & 26 deletions Ps_HomeSlide.php
@@ -1,28 +1,28 @@
<?php
/*
* 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 <contact@prestashop.com>
* @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 <contact@prestashop.com>
* @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
{
Expand Down Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions Readme.md → README.md
Expand Up @@ -4,6 +4,11 @@

Adds an image slider to your PrestaShop homepage.

## Multistore compatibility

This module is not compatible with the multistore :x: <br/>
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].
Expand Down
48 changes: 24 additions & 24 deletions ajax_ps_imageslider.php
@@ -1,28 +1,28 @@
<?php
/*
* 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 <contact@prestashop.com>
* @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 <contact@prestashop.com>
* @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');
Expand Down
19 changes: 19 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config.xml
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_imageslider</name>
<displayName><![CDATA[Image slider]]></displayName>
<version><![CDATA[3.0.0]]></version>
<version><![CDATA[3.1.0]]></version>
<description><![CDATA[Adds an image slider to your site.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
50 changes: 25 additions & 25 deletions css/index.php 100644 → 100755
@@ -1,28 +1,28 @@
<?php
/*
* 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 <contact@prestashop.com>
* @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 <contact@prestashop.com>
* @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');
Expand All @@ -32,4 +32,4 @@
header('Pragma: no-cache');

header('Location: ../');
exit;
exit;
Binary file modified homeslider.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.