From d7f3313ff4514e38c9f53439cd1a1287e56e45f7 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 11 Nov 2018 17:19:26 +0100 Subject: reboot folder --- app/class/modelhome.php | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 app/class/modelhome.php (limited to 'app/class/modelhome.php') diff --git a/app/class/modelhome.php b/app/class/modelhome.php new file mode 100644 index 0000000..3ff72c7 --- /dev/null +++ b/app/class/modelhome.php @@ -0,0 +1,70 @@ +setcol(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'secure']); + //$table = $listmanager->getlisteropt($opt); + //$listmanager->listcalclinkfrom($table); + $opt->settaglist($table); + $opt->submit(); + + + + return $opt; + } + + public function optupdate() + { + + } + + + public function table2($table, $opt) + { + $listmanager = new Modelart; + + + $filtertagfilter = $listmanager->filtertagfilter($table, $opt->tagfilter(), $opt->tagcompare()); + $filtersecure = $listmanager->filtersecure($table, $opt->secure()); + + $filter = array_intersect($filtertagfilter, $filtersecure); + $table2 = []; + $table2invert = []; + foreach ($table as $art) { + if (in_array($art->id(), $filter)) { + $table2[] = $art; + } else { + $table2invert[] = $art; + } + + + } + + if (!empty($opt->invert())) { + $table2 = $table2invert; + } + + $listmanager->artlistsort($table2, $opt->sortby(), $opt->order()); + + + return $table2; + } +} + + + + + + + + +?> \ No newline at end of file -- cgit v1.2.3