From 257fac8454924bb2f09aaee6a112f9f86f7520f1 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Sun, 29 Dec 2013 15:32:28 -0500 Subject: Issue #1426122 by deletedaccount, Alan D., andypost, maximpodorov: Some callbacks return junk when calling drupal_not_found(); replace with return MENU_NOT_FOUND instead. --- modules/profile/profile.pages.inc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'modules/profile') diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc index db65e9ac7..056015a31 100644 --- a/modules/profile/profile.pages.inc +++ b/modules/profile/profile.pages.inc @@ -17,13 +17,11 @@ function profile_browse() { if ($name && $field->fid) { // Only allow browsing of fields that have a page title set. if (empty($field->page)) { - drupal_not_found(); - return; + return MENU_NOT_FOUND; } // Do not allow browsing of private and hidden fields by non-admins. if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_HIDDEN)) { - drupal_access_denied(); - return; + return MENU_ACCESS_DENIED; } // Compile a list of fields to show. @@ -54,8 +52,7 @@ function profile_browse() { $query->condition('v.value', '%' . db_like($value) . '%', 'LIKE'); break; default: - drupal_not_found(); - return; + return MENU_NOT_FOUND; } $uids = $query @@ -85,7 +82,7 @@ function profile_browse() { return $output; } elseif ($name && !$field->fid) { - drupal_not_found(); + return MENU_NOT_FOUND; } else { // Compile a list of fields to show. -- cgit v1.2.3