aboutsummaryrefslogtreecommitdiff
path: root/public/w/home.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-09-21 00:17:11 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-09-21 00:17:11 +0200
commit701c4637294fc9b63d53a8eeb26d46ef94af1941 (patch)
treeee5b4fb38cc3a023590dfa3c127e1cf989ffaaab /public/w/home.php
parentcbecc0dfc819febf4c2b36791d5a2a7e69d842af (diff)
downloadwcms-701c4637294fc9b63d53a8eeb26d46ef94af1941.tar.gz
wcms-701c4637294fc9b63d53a8eeb26d46ef94af1941.zip
2.6 media update + new skin + lot of bugs fixies
Diffstat (limited to 'public/w/home.php')
-rw-r--r--public/w/home.php19
1 files changed, 14 insertions, 5 deletions
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());
}