diff options
author | David Rothstein <drothstein@gmail.com> | 2013-12-29 15:32:28 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2013-12-29 15:32:28 -0500 |
commit | 257fac8454924bb2f09aaee6a112f9f86f7520f1 (patch) | |
tree | 7c0bc3b7730b203fba3c1ef0ce491cf5b2525315 /modules/profile | |
parent | 987892b79edcb3b2325fe551f261cd627c1f0e99 (diff) | |
download | brdo-257fac8454924bb2f09aaee6a112f9f86f7520f1.tar.gz brdo-257fac8454924bb2f09aaee6a112f9f86f7520f1.tar.bz2 |
Issue #1426122 by deletedaccount, Alan D., andypost, maximpodorov: Some callbacks return junk when calling drupal_not_found(); replace with return MENU_NOT_FOUND instead.
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/profile.pages.inc | 11 |
1 files changed, 4 insertions, 7 deletions
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. |