aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-12 16:16:29 -0700
committerfriendica <info@friendica.com>2015-03-12 16:16:29 -0700
commit1d05f922f828e1e52cdf35f9c1e5ad26a85e398e (patch)
tree68cb8d0078681eab36544768f494e54983d12111
parentf507a5cd5aaf94318ee7605404062002a59ef4c9 (diff)
downloadvolse-hubzilla-1d05f922f828e1e52cdf35f9c1e5ad26a85e398e.tar.gz
volse-hubzilla-1d05f922f828e1e52cdf35f9c1e5ad26a85e398e.tar.bz2
volse-hubzilla-1d05f922f828e1e52cdf35f9c1e5ad26a85e398e.zip
reduce the occurrence of duplicated notice() messages
-rwxr-xr-xboot.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 74396e832..5fa15c9e6 100755
--- a/boot.php
+++ b/boot.php
@@ -1668,14 +1668,17 @@ function notice($s) {
$a = get_app();
if(! x($_SESSION, 'sysmsg')) $_SESSION['sysmsg'] = array();
+ // ignore duplicated error messages which haven't yet been displayed
+ // - typically seen as multiple 'permission denied' messages
+ // as a result of auto-reloading a protected page with &JS=1
+
+ if(in_array($s,$_SESSION['sysmsg']))
+ return;
+
if($a->interactive) {
- // shameless plug, permission is denied and they have no identity.
- // There's a fairly good chance that they've not got zot.
- if((stristr($s, t('permission denied'))) && (! get_observer_hash())) {
- $s .= '<br><a href="http://getzot.com">' . t('Got Zot?') . '</a>';
- }
$_SESSION['sysmsg'][] = $s;
}
+
}
/**