Browse Source

feat(requirements): dependence with 'system' attribute

fix-api
JamesRezo 8 months ago
parent
commit
fea739c623
  1. 1
      CHANGELOG
  2. 7
      modeles/supportedversions_configuration.html
  3. 6
      supportedversions_fonctions.php

1
CHANGELOG

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Spanish translation
- `<supportedversions|configuration>` model `|SupportedVersions::branchesByState` filter are dependent on the presence of the `system` attribute in release files.
## [0.7.0] - 2022-01-08

7
modeles/supportedversions_configuration.html

@ -7,6 +7,9 @@
Exemple <supportedversions|configuration|state=stable|limit=1>
Attention : la condition d'affichage de données est que l'attribut "system" soit présent avec au moins
une valeur ram ou freespace dans une branche
]<BOUCLE_branches(DATA){source table, #STATE|explode{","}|SupportedVersions::branchesByState}{par branch}{inverse}{0,#LIMIT|sinon{2}}>
<B_system>
<h3[ id="spip(#BRANCH|replace{\.})"]>SPIP #BRANCH</h3>
@ -63,7 +66,7 @@
</ul>
</div>
</B_system>
[<p>(#STATE|strstr{future}|oui)<:supportedversions:no_future_version:></p>]
[<p>(#STATE|strstr{stable}|ou{#STATE|strstr{security}}|oui)<:supportedversions:no_maintained_version:></p>]
[<p>(#STATE|strstr{future}|et{#TOTAL}|=={0}|oui)<:supportedversions:no_future_version:></p>]
[<p>(#STATE|strstr{stable}|et{#TOTAL}|=={0}|ou{#STATE|strstr{security}}|oui)<:supportedversions:no_maintained_version:></p>]
<//B_system>
</BOUCLE_branches>

6
supportedversions_fonctions.php

@ -229,7 +229,11 @@ class SupportedVersions
$branches = array_merge($branches, self::getBranchesFromState($state));
}
return $branches;
// Tant que ce filtre n'est utilisé que pour le modèle configuration,
// on filtre les branches qui ont un atribut "sysem" avec un élément
return array_filter($branches, function ($values) {
return isset($values['system']) && count($values['system']) > 0;
});
}
/**

Loading…
Cancel
Save