aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/security.php4
-rw-r--r--mod/ping.php2
-rw-r--r--view/tpl/nav.tpl24
3 files changed, 16 insertions, 14 deletions
diff --git a/include/security.php b/include/security.php
index bb75e7af1..5302639d4 100644
--- a/include/security.php
+++ b/include/security.php
@@ -137,8 +137,8 @@ function authenticate_success($user_record, $login_initial = false, $interactive
}
-
- if(($a->module !== 'home') && isset($_SESSION['return_url'])) {
+unset($_SESSION['return_url']);
+ if(($a->module !== 'home') && isset($_SESSION['return_url']) && strlen($_SESSION['return_url'])) {
$return_url = $_SESSION['return_url'];
unset($_SESSION['return_url']);
goaway($a->get_baseurl() . '/' . $return_url);
diff --git a/mod/ping.php b/mod/ping.php
index 2d52e9731..cf4b65c90 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -47,7 +47,7 @@ function ping_init(&$a) {
killme();
}
- if($a->argc > 1 && $a->argv[1] === 'notify') {
+ if($argc() > 1 && $argv(1) === 'notify') {
$t = q("select count(*) as total from notify where uid = %d and seen = 0",
intval(local_user())
);
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index af1fc9414..bd0fc2f5a 100644
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -39,17 +39,19 @@
</li>
{{ endif }}
- {{ if $nav.notifications }}
- <li id="nav-notifications-linkmenu" class="nav-menu-icon"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
- <span id="notify-update" class="nav-notify"></span>
- <ul id="nav-notifications-menu" class="menu-popup">
- <!-- TODO: better icons! -->
- <li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="$nav.notifications.mark.1"><span class="icon s10 edit"></span></a></a><a href="$nav.notifications.all.0" title="$nav.notifications.all.1"><span class="icon s10 plugin"></span></a></li>
- <li class="empty">$emptynotifications</li>
- </ul>
- </li>
- {{ endif }}
-
+
+ {{ if $nav.notifications }}
+
+ <li id="nav-notifications-linkmenu" class="nav-menu fakelink" onclick="notify_popup(); return false;" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
+ <span id="notify-update" class="nav-notify"></span>
+ <ul id="nav-notifications-menu" class="menu-popup">
+ <li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
+ <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
+ <li class="empty">$emptynotifications</li>
+ </ul>
+ </li>
+ {{ endif }}
+
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
<ul id="nav-site-menu" class="menu-popup">
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}