Some updates to invoice
This commit is contained in:
@@ -44,10 +44,13 @@ class Auth_OSB extends Auth_ORM {
|
||||
if ($mmto->loaded()) {
|
||||
// Check that the token is for this URI
|
||||
$mo = ORM::factory('Module',array('name'=>Request::current()->controller()));
|
||||
$mmo = ORM::factory('Module_Method',array(
|
||||
'module_id'=>$mo->id,
|
||||
'name'=>strtolower(Request::current()->directory() ? sprintf('%s:%s',Request::current()->directory(),Request::current()->action()) : Request::current()->action())
|
||||
));
|
||||
$mmo = $mo->module_method
|
||||
->where_open()
|
||||
->where('name','=',strtolower(Request::current()->directory() ? sprintf('%s:%s',Request::current()->directory(),Request::current()->action()) : Request::current()->action()))
|
||||
// @todo No longer required after all method names have been colon delimited
|
||||
->or_where('name','=',strtolower(Request::current()->directory() ? sprintf('%s_%s',Request::current()->directory(),Request::current()->action()) : Request::current()->action()))
|
||||
->where_close()
|
||||
->find();
|
||||
|
||||
// Ignore the token if this is not the right method.
|
||||
if ($mmo->id == $mmto->method_id) {
|
||||
|
Reference in New Issue
Block a user