Skip to content

Commit

Permalink
Add module when loading a controller method
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Jan 18, 2013
1 parent 0edaa5e commit beb2554
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion third_party/HMVC/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,17 @@ public function controller($uri, $params = array(), $return = FALSE) {
$uri = $module . '/' . $uri;
}
}

// Add module
$this->add_module($module);

return $this->_load_controller($uri, $params, $return);
// Execute the controller method and capture output
$void = $this->_load_controller($uri, $params, $return);

// Remove module
$this->remove_module();

return $void;
}

/**
Expand Down

0 comments on commit beb2554

Please sign in to comment.