This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Second action after content/action
expandshrink

Second action after content/action

Second action after content/action

Friday 08 June 2007 11:19:14 pm

Hi
I have a new action (content action), when I have to check some special conditions, and next, go to /kernel/content/action.php and execute a suitable requirement. now, I have (it's just an example) - (but it is nonfunctional):

/extension/myext/actions/content_actionhandler.php:

function myext_ContentActionHandler( &$module, &$http, &$objectID ) 
{
	if( $http->hasPostVariable("MyNewAction") )
	{
		unset($_POST['MyNewAction']);
		
		//some code
		$result = DoSomething( ... );
		
		if ( $result == 0)
		{
			$http->setPostVariable( 'ActionCollectInformation', 'ActionCollectInformation' );
			$Result =& $module->run( "collectinformation", array() );
			return $Result;
		}
		elseif ( $result == 1)
		{
			DoSomethingElse( ... );
		}
		... etc ...
		else
		{
			return $module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel' );
		}

	}
}

instead of:

if ( $result == 0)
{
	$http->setPostVariable( 'ActionCollectInformation', 'ActionCollectInformation' );
	$Result =& $module->run( "collectinformation", array() );
	return $Result;
}
elseif ( $result == 1)
{
	DoSomethingElse( ... );
}

I need (for example) to include action.php but there is no longer $Params variable (from index.php)
like this:

$strRedirectAction = $http->postVariable( 'RedirectSubAction' )
$http->setPostVariable( $strRedirectAction, $strRedirectAction );
goto(kernel/content/action.php); or goto(kernel/user/register.php); or goto(somewhere);

How can I do this?
Thank U

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from