diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-10-06 18:24:31 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-10-06 18:24:31 -0300 |
commit | 6d6b14b7e777c47076394403ac0878d9551cbaad (patch) | |
tree | 941ceee2af435e0131f56d302c05b6196ebdec91 | |
parent | 3cbd7b81f1f1ddcfdae79c1b290df071e7f2d52d (diff) | |
download | muamba-6d6b14b7e777c47076394403ac0878d9551cbaad.tar.gz muamba-6d6b14b7e777c47076394403ac0878d9551cbaad.tar.bz2 |
Minor fixes
-rw-r--r-- | muamba.business.inc | 34 | ||||
-rw-r--r-- | muamba.module | 2 |
2 files changed, 18 insertions, 18 deletions
diff --git a/muamba.business.inc b/muamba.business.inc index 2ec5644..0feeda8 100644 --- a/muamba.business.inc +++ b/muamba.business.inc @@ -119,7 +119,7 @@ function muamba_request($nid) { // Access check if (!muamba_has_request_access($node)) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Check if user is blocked by the item owner @@ -182,12 +182,12 @@ function muamba_accept($mid) { // Access check if (!muamba_has_management_access($node)) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check if ($transaction['status'] != MUAMBA_REQUESTED) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database @@ -214,12 +214,12 @@ function muamba_reject($mid) { // Access check if (!muamba_has_management_access($node)) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check if ($transaction['status'] != MUAMBA_REQUESTED) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database @@ -246,12 +246,12 @@ function muamba_cancel($mid) { // Access check if ($transaction['uid'] != $user->uid) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check if ($transaction['status'] != MUAMBA_REQUESTED) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database @@ -278,13 +278,13 @@ function muamba_return($mid) { // Access check if ($transaction['uid'] != $user->uid) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check - if ($transaction['status'] != MUAMBA_ACCEPTED || + if ($transaction['status'] != MUAMBA_ACCEPTED && $transaction['status'] != MUAMBA_LOST) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database @@ -311,14 +311,14 @@ function muamba_recover($mid) { // Access check if (!muamba_has_management_access($node)) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check - if ($transaction['status'] != MUAMBA_ACCEPTED || - $transaction['status'] != MUAMBA_RETURNED || + if ($transaction['status'] != MUAMBA_ACCEPTED && + $transaction['status'] != MUAMBA_RETURNED && $transaction['status'] != MUAMBA_LOST) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database @@ -345,13 +345,13 @@ function muamba_lost($mid) { // Access check if (!muamba_has_management_access($node)) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Status check - if ($transaction['status'] != MUAMBA_ACCEPTED || + if ($transaction['status'] != MUAMBA_ACCEPTED && $transaction['status'] != MUAMBA_RETURNED) { - drupal_not_found(); + return MENU_NOT_FOUND; } // Update database diff --git a/muamba.module b/muamba.module index 4bff851..fcd6565 100644 --- a/muamba.module +++ b/muamba.module @@ -81,7 +81,7 @@ function muamba_menu() { $items['muamba/recover'] = array( 'title' => 'Recover an item', 'page callback' => 'muamba_recover', - 'access arguments' => array('recover item'), + 'access arguments' => array('access content'), 'type' => MENU_SUGGESTED_ITEM, 'file' => 'muamba.business.inc', ); |