aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/config.php6
-rw-r--r--mod/channel.php5
2 files changed, 8 insertions, 3 deletions
diff --git a/include/config.php b/include/config.php
index ccd907424..bccf0737f 100644
--- a/include/config.php
+++ b/include/config.php
@@ -29,9 +29,9 @@ function load_config($family) {
// If the DB was successfully opened, but we can't read from it,
// we must assume catastrophic failure of the DB. Report the system down.
- if($r === false) {
- system_unavailable();
- }
+// if($r === false) {
+// system_unavailable();
+// }
if($r !== false) {
if($r) {
diff --git a/mod/channel.php b/mod/channel.php
index 5a66f5e07..e5af91b53 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -115,6 +115,11 @@ function channel_content(&$a, $update = 0, $load = false) {
$perms = get_all_perms($a->profile['profile_uid'],$ob_hash);
if(! $perms['view_stream']) {
+ // We may want to make the target of this redirect configurable
+ if($perms['view_profile']) {
+ notice( t('Insufficient permissions. Request redirected to profile page.') . EOL);
+ goaway (z_root() . "/profile/" . $a->profile['channel_address']);
+ }
notice( t('Permission denied.') . EOL);
return;
}