diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-07 14:05:55 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-07 14:05:55 +0200 |
commit | b35fca42a08df49dd114dc62b069975d04016c83 (patch) | |
tree | 057f3e5ced7edabf868c1ee6a13c897a7739283b | |
parent | 2b07a6cdc80dc54c652a9e4a1f1f315aeed5bf3d (diff) | |
download | wcms-b35fca42a08df49dd114dc62b069975d04016c83.tar.gz wcms-b35fca42a08df49dd114dc62b069975d04016c83.zip |
query : keep tags, authors filters if not existing
fix #84
-rw-r--r-- | app/class/Modelhome.php | 3 | ||||
-rw-r--r-- | app/class/Opt.php | 16 | ||||
-rw-r--r-- | app/view/templates/home.php | 5 |
3 files changed, 6 insertions, 18 deletions
diff --git a/app/class/Modelhome.php b/app/class/Modelhome.php index 8d7a38b..9957c0b 100644 --- a/app/class/Modelhome.php +++ b/app/class/Modelhome.php @@ -32,9 +32,6 @@ class Modelhome extends Modelpage public function Optlistinit(array $table) { $optlist = new Optlist(Page::classvarlist()); - $optlist->settaglist($table); - $optlist->setauthorlist($table); - return $optlist; } diff --git a/app/class/Opt.php b/app/class/Opt.php index 5f00141..821fc92 100644 --- a/app/class/Opt.php +++ b/app/class/Opt.php @@ -305,13 +305,7 @@ class Opt extends Item public function settagfilter($tagfilter) { if (!empty($tagfilter) && is_array($tagfilter)) { - $tagfilterverif = []; - foreach ($tagfilter as $tag) { - if (array_key_exists($tag, $this->taglist)) { - $tagfilterverif[] = $tag; - } - } - $this->tagfilter = $tagfilterverif; + $this->tagfilter = $tagfilter; } } @@ -325,13 +319,7 @@ class Opt extends Item public function setauthorfilter($authorfilter) { if (!empty($authorfilter) && is_array($authorfilter)) { - $authorfilterverif = []; - foreach ($authorfilter as $author) { - if (array_key_exists($author, $this->authorlist)) { - $authorfilterverif[] = $author; - } - } - $this->authorfilter = $authorfilterverif; + $this->authorfilter = $authorfilter; } } diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 75e466e..d6d1f51 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -62,7 +62,7 @@ <?php } else { ?> - <!-- ___________________ L I S T _________________________ --> + <!-- ___________________ D E E P _________________________ --> <div id="deepsearchbar" class="hidephone"> <form action="<?= $this->url('home') ?>" method="get"> @@ -84,6 +84,9 @@ </div> + <!-- ___________________ T A B L E _______________________ --> + + <div class="scroll"> <table id="home2table"> |