Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Request variables set in a form take precedence over routed variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Nov 27, 2010
1 parent b78aeec commit fa87d94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public function Route ( ) {
$value_pattern = '/\$' . ($p+1) . '/';
$value = preg_replace ( $value_pattern, $matches[$p+1], $value );

$zApp->GetSys ( "Request" )->Set ( $key, $value );
// If the key isn't being set by a form, then pull from the routed variables.
if ( !$zApp->GetSys ( 'Request' )->Get ( $key ) )
$zApp->GetSys ( "Request" )->Set ( $key, $value );
}

} else {
Expand Down

0 comments on commit fa87d94

Please sign in to comment.