Skip to content

Commit

Permalink
Revert "[BF] - 404 oops when canceling editing a user - fixes islandb…
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Jun 2, 2018
1 parent 4f28b91 commit 88c8bb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
7 changes: 2 additions & 5 deletions application/controllers/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]
)
);
Expand Down
10 changes: 2 additions & 8 deletions library/OSS/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ){
Expand Down

0 comments on commit 88c8bb4

Please sign in to comment.