1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-26 16:14:35 +02:00

Some minor adjustments and bump version to 3.0.61

This commit is contained in:
Ryan Cramer
2017-04-21 11:27:47 -04:00
parent 8d02e72320
commit 3fc9f69da7
5 changed files with 2387 additions and 10 deletions

View File

@@ -1447,15 +1447,17 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
*
*/
protected function ___processSaveRedirect($redirectUrl) {
$admin = true;
if($redirectUrl) {
$redirectUrl .= (strpos($redirectUrl, '?') === false ? '?' : '&') . 's=1';
$admin = strpos($redirectUrl, $this->wire('config')->urls->admin) === 0;
if($admin) $redirectUrl .= (strpos($redirectUrl, '?') === false ? '?' : '&') . 's=1';
} else {
$redirectUrl = "./?id={$this->page->id}&s=1";
}
$redirectUrl .= "&c=" . count($this->changes);
$modal = $this->wire('config')->modal;
if($admin) $redirectUrl .= "&c=" . count($this->changes);
$modal = $admin && $this->wire('config')->modal;
if($modal) $redirectUrl .= "&modal=$modal";
if(count($this->fields)) {
if(count($this->fields) && $admin) {
if(count($this->fields) == 1) {
$redirectUrl .= "&field={$this->field->name}";
} else {