Skip to content

Commit

Permalink
Merge pull request #108 from PrestaShopCorp/dev
Browse files Browse the repository at this point in the history
Release 2.0.2
  • Loading branch information
PierreRambaud authored Jun 11, 2021
2 parents b0acf14 + cf4e3d7 commit c3ac864
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
- name: Pull PrestaShop files (Tag ${{ matrix.presta-versions }})
run: docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }}
- name : Run PHPStan
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan:0.11.19 analyse --configuration=/web/module/tests/phpstan/phpstan.neon
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan:0.11.19 analyse --configuration=/web/module/tests/phpstan/phpstan-${{ matrix.presta-versions }}.neon
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# MBO

![PHP tests](https://github.com/PrestaShopCorp/ps_mbo/workflows/PHP%20tests/badge.svg)
![Build & Release draft](https://github.com/PrestaShopCorp/ps_mbo/workflows/Build%20&%20Release%20draft/badge.svg)
[![GitHub license](https://img.shields.io/github/license/PrestaShopCorp/ps_mbo)](https://github.com/PrestaShopCorp/ps_mbo/LICENSE.md)

PrestaShop Marketplace in your Back Office

## About

Discover the best PrestaShop modules to optimize your online store.
Browse the Addons marketplace directly from your back office to better meet your needs.

## Reporting issues

Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>ps_mbo</name>
<displayName><![CDATA[PrestaShop Marketplace in your Back Office]]></displayName>
<version><![CDATA[2.0.1]]></version>
<version><![CDATA[2.0.2]]></version>
<description><![CDATA[Discover the best PrestaShop modules to optimize your online store.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions ps_mbo.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class ps_mbo extends Module
public function __construct()
{
$this->name = 'ps_mbo';
$this->version = '2.0.1';
$this->version = '2.0.2';
$this->author = 'PrestaShop';
$this->tab = 'administration';
$this->module_key = '6cad5414354fbef755c7df4ef1ab74eb';
Expand All @@ -152,7 +152,7 @@ public function __construct()
parent::__construct();

$this->displayName = $this->l('PrestaShop Marketplace in your Back Office');
$this->description = $this->l('Discover the best PrestaShop modules to optimize your online store.');
$this->description = $this->l('Browse the Addons marketplace directly from your back office to better meet your needs.');
}

/**
Expand All @@ -163,7 +163,17 @@ public function __construct()
public function install()
{
return parent::install()
&& $this->registerHook(static::HOOKS)
&& $this->registerHook(static::HOOKS);
}

/**
* Enable Module.
*
* @return bool
*/
public function enable($force_all = false)
{
return parent::enable($force_all)
&& $this->installTabs();
}

Expand Down Expand Up @@ -232,13 +242,13 @@ public function installTab(array $tabData)
}

/**
* Uninstall Module.
* Disable Module.
*
* @return bool
*/
public function uninstall()
public function disable($force_all = false)
{
return parent::uninstall()
return parent::disable($force_all)
&& $this->uninstallTabs();
}

Expand Down
4 changes: 4 additions & 0 deletions src/ModuleCollectionDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public function getData(array $moduleNames)
$module->set('type', 'addonsPartner');
}

if (!empty($module->get('description'))) {
$module->set('description', html_entity_decode($module->get('description'), ENT_QUOTES));
}

$module->fillLogo();
$data[$module->get('name')] = $this->modulePresenter->present($module);
}
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions tests/phpstan/phpstan-latest.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
parameters:
bootstrap: tests/phpstan/bootstrap.php
paths:
- src
- ps_mbo.php
dynamicConstantNames:
- _PS_VERSION_
ignoreErrors:
- '#Parameter \#1 \$idProfile of static method ProfileCore::getProfileAccess\(\) expects int, string given.#'

level: 5

0 comments on commit c3ac864

Please sign in to comment.