1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00

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).

This commit is contained in:
Ryan Cramer
2017-05-02 09:50:45 -04:00
parent b17c9eaed9
commit 84a39c0667

View File

@@ -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);