diff options
author | Simon Rettberg | 2024-07-19 17:32:18 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-07-19 17:32:18 +0200 |
commit | 494d36422a175a091227f147ebbb9217bd34649a (patch) | |
tree | fde29ac16dccf4e879885a4f04fc37dd298a9fe5 /inc/util.inc.php | |
parent | [sysconfig] Don't delete config module on edit if taskmanager fails (diff) | |
download | slx-admin-494d36422a175a091227f147ebbb9217bd34649a.tar.gz slx-admin-494d36422a175a091227f147ebbb9217bd34649a.tar.xz slx-admin-494d36422a175a091227f147ebbb9217bd34649a.zip |
[sysconfig] Add button to assign module to multiple configs
This extends and reuses the assignment dialog that pops up at the end of
the process where you create a new module.
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r-- | inc/util.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php index 2568011b..0ff6fdad 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -15,9 +15,10 @@ class Util * * @param string|false $location Location to redirect to. "false" to redirect to same URL (useful after POSTs) * @param bool $preferRedirectPost if true, use the value from $_POST['redirect'] instead of $location + * @param bool $ignoreRedirectParams if true, ignore any additional params set via ::addRedirectParam()) */ #[NoReturn] - public static function redirect($location = false, bool $preferRedirectPost = false): void + public static function redirect($location = false, bool $preferRedirectPost = false, bool $ignoreRedirectParams = false): void { if ($location === false) { $location = preg_replace('/([&?])message\[\]=[^&]*/', '\1', $_SERVER['REQUEST_URI']); @@ -35,7 +36,7 @@ class Util $location .= '&' . $messages; } } - if (!empty(self::$redirectParams)) { + if (!$ignoreRedirectParams && !empty(self::$redirectParams)) { if (strpos($location, '?') === false) { $location .= '?' . implode('&', self::$redirectParams); } else { |