aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muamba.business.inc34
-rw-r--r--muamba.module2
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',
);