From 88c8bb4603296322c35c925d27f6aa3c8173dfd1 Mon Sep 17 00:00:00 2001 From: Barry O'Donovan Date: Sat, 2 Jun 2018 14:25:13 +0100 Subject: [PATCH] Revert "[BF] - 404 oops when canceling editing a user - fixes islandbridgenetworks/IXP-Manager#167" This reverts commit d5bd0c7f6f9ee79c3160e0b8fea7f2c368fb4614. --- application/controllers/ContactController.php | 7 ++----- library/OSS/Utils.php | 10 ++-------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/application/controllers/ContactController.php b/application/controllers/ContactController.php index 6162bde24..1313665cf 100644 --- a/application/controllers/ContactController.php +++ b/application/controllers/ContactController.php @@ -326,15 +326,12 @@ protected function formPostProcess( $form, $object, $isEdit, $options = null, $c else if( $this->getParam( "uid", false ) ) $form->setAction( OSS_Utils::genUrl( 'contact', ( $isEdit ? 'edit' : 'add' ), false, [ 'uid' => $this->getParam( "uid" ) ] ) ); - - if( $cid = $this->getParam( 'cid', false ) ) { - $form->updateCancelLocation( OSS_Utils::genUrl( 'customer', 'overview', false, [ - 'escape1' => $cid, - 'escape2' => ( $this->getParam( 'user', false ) || $this->getParam( 'uid', false ) ) ? 'users' : 'contacts' + 'id' => $cid, + 'tab' => ( $this->getParam( 'user', false ) || $this->getParam( 'uid', false ) ) ? 'users' : 'contacts' ] ) ); diff --git a/library/OSS/Utils.php b/library/OSS/Utils.php index 8cd8b15a5..8549eda0f 100644 --- a/library/OSS/Utils.php +++ b/library/OSS/Utils.php @@ -270,14 +270,8 @@ public static function genUrl( $controller = false, $action = false, $module = f if( sizeof( $params ) > 0 ) { - foreach( $params as $var => $value ){ - - if( strpos($var, 'escape') ){ - $url .= "/{$var}"; - } - $url .= "/{$value}"; - } - + foreach( $params as $var => $value ) + $url .= "/{$var}/{$value}"; } if ( $action ){