Skip to content

Commit

Permalink
Fix EZP-30718: Allow RerunURL to be used on hidden pages (#1435)
Browse files Browse the repository at this point in the history
(cherry picked from commit a8d24e4)
  • Loading branch information
peterkeung authored and andrerom committed Aug 9, 2019
1 parent 50b81a9 commit 432f70b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion kernel/layout/set.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

$Result = array();
$Result['content'] = '';
$Result['rerun_uri'] = '/' . implode( '/', array_splice( $Params['Parameters'], 1 ) ) . $userParamString;

$layoutINI = eZINI::instance( 'layout.ini' );
$i18nINI = eZINI::instance( 'i18n.ini' );
Expand Down Expand Up @@ -53,6 +52,7 @@
}
}

$Result['rerun_uri'] = '/' . implode( '/', array_splice( $Params['Parameters'], 1 ) ) . $userParamString;
$Module->setExitStatus( eZModule::STATUS_RERUN );
}
else
Expand Down
15 changes: 7 additions & 8 deletions kernel/private/classes/ezpkernelweb.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,14 @@ protected function dispatchLoop()
$moduleResult = $this->module->handleError( eZError::KERNEL_MODULE_DISABLED, 'kernel', array( 'check' => $moduleCheck ) );
}
$this->siteBasics['module-run-required'] = false;
if ( $this->module->exitStatus() == eZModule::STATUS_RERUN )
if ( isset( $moduleResult['rerun_uri'] ) )
{
if ( isset( $moduleResult['rerun_uri'] ) )
{
$this->uri = eZURI::instance( $moduleResult['rerun_uri'] );
$this->siteBasics['module-run-required'] = true;
}
else
eZDebug::writeError( 'No rerun URI specified, cannot continue', 'index.php' );
$this->uri = eZURI::instance( $moduleResult['rerun_uri'] );
$this->siteBasics['module-run-required'] = true;
}
else if ( $this->module->exitStatus() == eZModule::STATUS_RERUN )
{
eZDebug::writeError( 'No rerun URI specified on eZModule::STATUS_RERUN, cannot set URI', 'index.php' );
}

if ( is_array( $moduleResult ) )
Expand Down

0 comments on commit 432f70b

Please sign in to comment.