summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Compat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:45:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:45:00 +0000
commitbe4626482ba8761da39746a6ac60d133d3852a0f (patch)
tree45065832c85c4789237e94b3114360eac91d86f0 /library/Icingadb/Compat
parentReleasing progress-linux version 1.1.1-1~progress7.99u1. (diff)
downloadicingadb-web-be4626482ba8761da39746a6ac60d133d3852a0f.tar.xz
icingadb-web-be4626482ba8761da39746a6ac60d133d3852a0f.zip
Merging upstream version 1.1.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--library/Icingadb/Compat/CompatObject.php15
-rw-r--r--library/Icingadb/Compat/UrlMigrator.php13
2 files changed, 18 insertions, 10 deletions
diff --git a/library/Icingadb/Compat/CompatObject.php b/library/Icingadb/Compat/CompatObject.php
index 6a30751..1d9657d 100644
--- a/library/Icingadb/Compat/CompatObject.php
+++ b/library/Icingadb/Compat/CompatObject.php
@@ -361,13 +361,14 @@ trait CompatObject
*/
private function getBoolType($value)
{
- switch ($value) {
- case false:
- return 0;
- case true:
- return 1;
- case 'sticky':
- return 2;
+ if ($value === 'sticky') {
+ return 2;
}
+
+ if (is_string($value)) {
+ return null;
+ }
+
+ return (int) $value;
}
}
diff --git a/library/Icingadb/Compat/UrlMigrator.php b/library/Icingadb/Compat/UrlMigrator.php
index 47780be..f6a4a4a 100644
--- a/library/Icingadb/Compat/UrlMigrator.php
+++ b/library/Icingadb/Compat/UrlMigrator.php
@@ -234,9 +234,14 @@ class UrlMigrator
case $exprRule === self::LOWER_EXPR:
$filter->setValue(strtolower($filter->getValue()));
break;
- case is_array($exprRule) && isset($exprRule[$filter->getValue()]):
- $filter->setValue($exprRule[$filter->getValue()]);
- break;
+ case is_array($exprRule):
+ if (isset($exprRule[$filter->getValue()])) {
+ $filter->setValue($exprRule[$filter->getValue()]);
+
+ break;
+ }
+
+ return false;
default:
$filter->setValue($exprRule);
}
@@ -290,6 +295,8 @@ class UrlMigrator
},
'dir' => self::DROP,
'limit' => self::USE_EXPR,
+ 'addFilter' => self::DROP,
+ 'modifyFilter' => self::DROP,
'showCompact' => self::USE_EXPR,
'showFullscreen' => self::USE_EXPR,
'view' => function ($value) {