aboutsummaryrefslogtreecommitdiff
path: root/class/class.w.opt.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-09-02 16:19:13 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-09-02 16:19:13 +0200
commitcbecc0dfc819febf4c2b36791d5a2a7e69d842af (patch)
treec181eb875cef9ca6a48f0b807905d7a2c15bee98 /class/class.w.opt.php
parente9b2ca7c06875069fa03379258625490872cc33d (diff)
downloadwcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.tar.gz
wcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.zip
2.5 mobile update + minor upgrades and fixes
Diffstat (limited to 'class/class.w.opt.php')
-rw-r--r--class/class.w.opt.php45
1 files changed, 27 insertions, 18 deletions
diff --git a/class/class.w.opt.php b/class/class.w.opt.php
index 76b3905..fc71312 100644
--- a/class/class.w.opt.php
+++ b/class/class.w.opt.php
@@ -2,8 +2,9 @@
class Opt
{
private $sortby = 'id';
- private $order = '1';
- private $tagor = [];
+ private $order = 1;
+ private $tagfilter = [];
+ private $tagcompare = 'OR';
private $secure = 4;
private $liento = ['min' => '0', 'max' => '0'];
private $lienfrom = ['min' => '0', 'max' => '0'];
@@ -65,9 +66,14 @@ class Opt
return $this->secure;
}
- public function tagor($type = 'array')
+ public function tagfilter($type = 'array')
{
- return $this->tagor;
+ return $this->tagfilter;
+ }
+
+ public function tagcompare()
+ {
+ return $this->tagcompare;
}
public function liento($type = 'array')
@@ -117,16 +123,23 @@ class Opt
}
}
- public function settagor($tagor)
+ public function settagfilter($tagfilter)
{
- if (is_array($tagor)) {
- // $tagorlist = [];
- // foreach ($tagor as $tag) {
+ if (is_array($tagfilter)) {
+ // $tagfilterlist = [];
+ // foreach ($tagfilter as $tag) {
// if (array_key_exists($tag, $this->taglist())) {
- // $tagorlist[] = $tag;
+ // $tagfilterlist[] = $tag;
// }
// }
- $this->tagor = $tagor;
+ $this->tagfilter = $tagfilter;
+ }
+ }
+
+ public function settagcompare($tagcompare)
+ {
+ if(in_array($tagcompare, ['OR', 'AND'])) {
+ $this->tagcompare = $tagcompare;
}
}
@@ -137,18 +150,14 @@ class Opt
}
}
- public function setliento($n0, $n1)
+ public function setliento($range)
{
- $stock = [intval($n1), intval($n2)];
- $sorted = asort($stock);
- $this->liento = ['min' => $stock[0], 'max' => $stock[1]];
+ $this->liento = $range;
}
- public function setlienfrom($n0, $n1)
+ public function setlienfrom($range)
{
- $stock = [intval($n1), intval($n2)];
- $sorted = asort($stock);
- $this->lienfrom = ['min' => $stock[0], 'max' => $stock[1]];
+ $this->lienfrom = $range;
}
public function setlientomin($min)