Skip to content

Commit

Permalink
Fixing directory to use method instead of non-existing property
Browse files Browse the repository at this point in the history
  • Loading branch information
jheathco committed May 4, 2011
1 parent ea99b8c commit fc5ad61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/controller/twig.php
Expand Up @@ -41,10 +41,10 @@ public function __construct(Request $request, Response $response)
// Auto-generate template filename ('index' method called on Controller_Admin_Users looks for 'admin/users/index')
$this->template = $request->controller().'/'.$request->action().Kohana_Twig::$config->suffix;

if ( ! empty($request->directory))
if ($request->directory())
{
// Preprend directory if needed
$this->template = $request->directory.'/'.$this->template;
$this->template = $request->directory().'/'.$this->template;
}

parent::__construct($request, $response);
Expand Down

0 comments on commit fc5ad61

Please sign in to comment.