From 701c4637294fc9b63d53a8eeb26d46ef94af1941 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 21 Sep 2018 00:17:11 +0200 Subject: 2.6 media update + new skin + lot of bugs fixies --- public/w/home.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'public/w/home.php') diff --git a/public/w/home.php b/public/w/home.php index 4966c62..7115918 100644 --- a/public/w/home.php +++ b/public/w/home.php @@ -19,7 +19,7 @@ if ($app->session() >= $app::EDITOR) { } if(isset($_GET['submit']) && $_GET['submit'] == 'reset') { $opt = new Opt(Art::classvarlist()); - } else { + } elseif(isset($_SESSION['opt'])) { $opt->hydrate($_SESSION['opt']); } @@ -37,17 +37,26 @@ if ($app->session() >= $app::EDITOR) { $filter = array_intersect($filtertagfilter, $filtersecure); $table2 = []; + $table2invert = []; foreach ($table as $art) { - if (in_array($art->id(), $filter)) { - $table2[] = $art; - } + if (in_array($art->id(), $filter)) { + $table2[] = $art; + } else { + $table2invert[] = $art; + } + + + } + + if(!empty($opt->invert())) { + $table2 = $table2invert; } $app->artlistsort($table2, $opt->sortby(), $opt->order()); - $aff->home2table($app, $table2); + $aff->home2table($app, $table2, $app->getlister()); } -- cgit v1.2.3