Skip to content

Commit

Permalink
change controller so that it's possible to explicitly set data in res…
Browse files Browse the repository at this point in the history
…ponse and not have controller clobber it before its sent to view
  • Loading branch information
midnightmonster committed Apr 25, 2009
1 parent 670ae27 commit 7081884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recess/recess/framework/controllers/Controller.class.php
Expand Up @@ -189,7 +189,7 @@ function wrappedServe(Request $request) {
if(!isset($response->meta->viewName)) $response->meta->viewName = $methodName;
$response->meta->viewClass = $descriptor->viewClass;
$response->meta->viewPrefix = $descriptor->viewPrefix;
$response->data = get_object_vars($this);
if(empty($response->data)) $response->data = get_object_vars($this);
$response->data['controller'] = $this;
if(is_array($this->headers)) { foreach($this->headers as $header) $response->addHeader($header); }
unset($response->data['request']);
Expand Down

0 comments on commit 7081884

Please sign in to comment.