]> git.mxchange.org Git - friendica.git/commitdiff
provide "return home" key
authorFriendika <info@friendika.com>
Tue, 4 Jan 2011 13:06:10 +0000 (05:06 -0800)
committerFriendika <info@friendika.com>
Tue, 4 Jan 2011 13:06:10 +0000 (05:06 -0800)
.htaccess
include/main.js
index.php
mod/dfrn_poll.php

index b6d4eecc33950cdd24717e6dbad127d72f89722e..b06dd8bdc3efaab1e6151d55a0817b815493981a 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,6 +1,7 @@
 
 Options -Indexes
 AddType application/x-java-archive .jar
+AddType audio/ogg .oga
 
 <FilesMatch "\.(out|log)$">
 Deny from all
index ef6b059ccfb00f01e75a72bd403364890760b3e1..d137d4c9c6a9201d840cff6528bc1595b8467eb8 100644 (file)
                                        $('#pause').html('');
                                }
                        }
+                       if(event.keyCode == '36') {
+                               event.preventDefault();
+                               if(homebase)
+                                       document.location = homebase;
+                       }
                });                                     
        });
 
index 2e14e7d2ac18bf920d00040d789c9633f66d450e..cbc85accf47e6570cf11e8e18205a2bf5e70ac03 100644 (file)
--- a/index.php
+++ b/index.php
@@ -173,6 +173,9 @@ if($a->module_loaded) {
 
 }
 
+if(x($_SESSION,'visitor_home'))
+       $a->page['content'] .= '<script>var homebase="' . $_SESSION['visitor_home'] . '" ; </script>';
+
 if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
        header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
 }
index 52272efade9a0a0a61585e0892e2e75c0f6bbb97..1061cdb899d10529279b1d4b93d1f8285f3bbe2e 100644 (file)
@@ -73,6 +73,7 @@ function dfrn_poll_init(&$a) {
                                if((int) $xml->status == 1) {
                                        $_SESSION['authenticated'] = 1;
                                        $_SESSION['visitor_id'] = $r[0]['id'];
+                                       $_SESSION['visitor_home'] = $r[0]['url'];
                                        notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL);
                                        // Visitors get 1 day session.
                                        $session_id = session_id();
@@ -386,6 +387,7 @@ function dfrn_poll_content(&$a) {
                                if(((int) $xml->status == 0) && ($xml->challenge == $hash)  && ($xml->sec == $sec)) {
                                        $_SESSION['authenticated'] = 1;
                                        $_SESSION['visitor_id'] = $r[0]['id'];
+                                       $_SESSION['visitor_home'] = $r[0]['url'];
                                        notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL);
                                        // Visitors get 1 day session.
                                        $session_id = session_id();