| @@ -24,9 +24,8 @@ | ||
| 24 | 24 | { |
| 25 | 25 | use LoginControllerTrait; |
| 26 | 26 | |
| 27 | 27 | public const POST_URL_CACHE_KEY = 'PostUrls'; |
| 28 | - public const REDIRECT_TO_PARAMETER = 'redirect_to'; | |
| 29 | 28 | |
| 30 | 29 | public function __construct( |
| 31 | 30 | Php $php, |
| 32 | 31 | Wordpress $wordpress, |
| @@ -159,11 +158,8 @@ | ||
| 159 | 158 | } elseif ($redirect === 'custom_url') { |
| 160 | 159 | $url = $this->mainConfig->getRedirectCustomUrl(); |
| 161 | 160 | } elseif ($redirect === 'login') { |
| 162 | 161 | $url = $this->getLoginUrl(); |
| 163 | - } elseif ($redirect === 'origin') { | |
| 164 | - $referer = $this->wordpress->getReferer(); | |
| 165 | - $url = $referer !== false ? $referer : $this->wordpress->getHomeUrl('/'); | |
| 166 | 162 | } else { |
| 167 | 163 | $url = $this->wordpress->getHomeUrl('/'); |
| 168 | 164 | } |
| 169 | 165 | |
| @@ -188,12 +184,8 @@ | ||
| 188 | 184 | $url = $this->getRedirectUrlAndPermalink($permalink); |
| 189 | 185 | $currentUrl = $this->util->getCurrentUrl(); |
| 190 | 186 | |
| 191 | 187 | if ($url !== null && $url !== $currentUrl && $permalink !== $currentUrl) { |
| 192 | - if ($this->mainConfig->appendRedirectToParameter() === true) { | |
| 193 | - $url = $this->wordpress->addQueryArg([self::REDIRECT_TO_PARAMETER => $currentUrl], $url); | |
| 194 | - } | |
| 195 | - | |
| 196 | 188 | $this->wordpress->wpRedirect($url); |
| 197 | 189 | $this->php->callExit(); |
| 198 | 190 | } |
| 199 | 191 | } |
| @@ -266,9 +258,9 @@ | ||
| 266 | 258 | |
| 267 | 259 | return $headers; |
| 268 | 260 | } |
| 269 | 261 | |
| 270 | - public function getFileUrl(string $url, int|string|null $id): string | |
| 262 | + public function getFileUrl(string $url, int|string $id): string | |
| 271 | 263 | { |
| 272 | 264 | // Nginx always supports real urls so we need the new urls only |
| 273 | 265 | // if we don't use nginx and mod_rewrite is disabled |
| 274 | 266 | if ($this->mainConfig->lockFile() === true |