diff options
-rw-r--r-- | languages/en.php | 1 | ||||
-rwxr-xr-x | mod/profile/views/default/profile/profile_navigation.php | 1 | ||||
-rwxr-xr-x | mod/profile/views/default/profile/profile_ownerblock.php | 9 |
3 files changed, 7 insertions, 4 deletions
diff --git a/languages/en.php b/languages/en.php index 17ff4a52e..6a3f0d34a 100644 --- a/languages/en.php +++ b/languages/en.php @@ -187,6 +187,7 @@ $english = array( 'deprecatedfunction' => 'Warning: This code uses the deprecated function \'%s\' and is not compatible with this version of Elgg', 'pageownerunavailable' => 'Warning: The page owner %d is not accessible!', + 'viewfailure' => 'There was an internal failure in the view %s', /** * API */ diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php index 6750b9c67..b441b949f 100755 --- a/mod/profile/views/default/profile/profile_navigation.php +++ b/mod/profile/views/default/profile/profile_navigation.php @@ -8,6 +8,7 @@ if (isset($vars['section'])) { $user = $vars['entity']; if (!$user) { // no user so no profile + echo sprintf(elgg_echo('viewfailure'), __FILE__); return TRUE; } diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php index c36e22076..cfbd62657 100755 --- a/mod/profile/views/default/profile/profile_ownerblock.php +++ b/mod/profile/views/default/profile/profile_ownerblock.php @@ -13,10 +13,11 @@ if ($vars['entity']) { } } else { $user = page_owner_entity(); - if (!$user) { - // no user so we quit - return TRUE; - } +} +if ($user) { + // no user so we quit view + echo sprintf(elgg_echo('viewfailure'), __FILE__); + return TRUE; } $more_info = ''; |