Skip to content
Merged
13 changes: 13 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add Issue to Project

on:
issues:
types: [ opened ]

jobs:
add-to-project:
uses: PrestaShop/.github/.github/workflows/reusable-add-to-project.yml@master
with:
project-number: 47
secrets:
TOKEN: ${{ secrets.JARVIS_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v2.0.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
Expand Down Expand Up @@ -74,14 +74,14 @@ jobs:

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-composer-cache
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>dashactivity</name>
<displayName><![CDATA[Dashboard Activity]]></displayName>
<version><![CDATA[2.1.1]]></version>
<version><![CDATA[2.1.2]]></version>
<description><![CDATA[]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[dashboard]]></tab>
Expand Down
22 changes: 21 additions & 1 deletion dashactivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct()
{
$this->name = 'dashactivity';
$this->tab = 'administration';
$this->version = '2.1.1';
$this->version = '2.1.2';
$this->author = 'PrestaShop';

parent::__construct();
Expand Down Expand Up @@ -430,4 +430,24 @@ public function getConfigFieldsValues()
'DASHACTIVITY_VISITOR_ONLINE' => Tools::getValue('DASHACTIVITY_VISITOR_ONLINE', Configuration::get('DASHACTIVITY_VISITOR_ONLINE')),
];
}

/**
* Save dashboard configuration
*
* @param array $config
*
* @return bool determines if there are errors or not
*/
public function saveDashConfig(array $config)
{
if (!$this->getPermission('configure')) {
return true;
}

foreach (array_keys($this->getConfigFieldsValues()) as $fieldName) {
Configuration::updateValue($fieldName, (int) $config[$fieldName]);
}

return false;
}
}
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.7.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ parameters:
ignoreErrors:
- '#Parameter \#1 \$share of static method ShopCore::addSqlRestriction\(\) expects int, false given.#'
- '#Parameter \#1 \$share of static method ShopCore::addSqlRestriction\(\) expects int, string given.#'
- '#Parameter \#1 \$variable of method ModuleCore::getPermission\(\) expects array, string given.#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.8.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ parameters:
ignoreErrors:
- '#Parameter \#1 \$share of static method ShopCore::addSqlRestriction\(\) expects int, false given.#'
- '#Parameter \#1 \$share of static method ShopCore::addSqlRestriction\(\) expects int, string given.#'
- '#Parameter \#1 \$variable of method ModuleCore::getPermission\(\) expects array, string given.#'
Loading