From 84a39c0667ff94842105c77976435070b3a67333 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 2 May 2017 09:50:45 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#256 where the image field modal upload function was not updating the parent window images field, thus preventing the image having the temporary status removed (and not being saved). --- wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module b/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module index cdc06d42..90055162 100644 --- a/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module +++ b/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module @@ -1447,11 +1447,12 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod * */ protected function ___processSaveRedirect($redirectUrl) { - $admin = true; if($redirectUrl) { - $admin = strpos($redirectUrl, $this->wire('config')->urls->admin) === 0; + $c = substr($redirectUrl, 0, 1); + $admin = $c === '.' || $c === '?' || strpos($redirectUrl, $this->wire('config')->urls->admin) === 0; if($admin) $redirectUrl .= (strpos($redirectUrl, '?') === false ? '?' : '&') . 's=1'; } else { + $admin = true; $redirectUrl = "./?id={$this->page->id}&s=1"; } if($admin) $redirectUrl .= "&c=" . count($this->changes);