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

$plxShow->catList affiche la catégorie 10 à tort #345

Closed
haruka-7 opened this issue Nov 15, 2019 · 1 comment
Closed

$plxShow->catList affiche la catégorie 10 à tort #345

haruka-7 opened this issue Nov 15, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@haruka-7
Copy link
Collaborator

haruka-7 commented Nov 15, 2019

Message sur le forum : https://forum.pluxml.org/discussion/6601/amalgame-entre-categorie-n-1-et-n-10#latest

<?php $plxShow->catList('', '#cat_name',1); ?> affiche la catégorie 1 mais également la catégorie 10.

Proposition de correction par @bazooka07 :

<?php
       //........
       #Onverifiequ'ilyadescategories
       if($this->plxMotor->aCats){
           if(!empty($include)){$include=str_pad($include,3,'0',STR_PAD_LEFT);}
           if(!empty($exclude)){$exclude=str_pad($exclude,3,'0',STR_PAD_LEFT);}
           foreach($this->plxMotor->aCatsas$k=>$v){
               $in=(empty($include)ORpreg_match('/(\b'.$include.'\b)/',$k));
               $ex=(!empty($exclude)ANDpreg_match('/(\b'.$exclude.'\b)/',$k));
               #traitement....
               }
           }#Finduwhile
       //........
?>
@haruka-7 haruka-7 added the bug label Nov 15, 2019
@haruka-7 haruka-7 added this to the PluXml 5.8 milestone Nov 15, 2019
@haruka-7 haruka-7 self-assigned this Nov 15, 2019
haruka-7 added a commit that referenced this issue Nov 15, 2019
@haruka-7
Copy link
Collaborator Author

Corrigé dans PluXml 5.8 (branche develop).

haruka-7 pushed a commit that referenced this issue Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant