]> git.mxchange.org Git - friendica.git/commitdiff
force login to ssl on SSL_POLICY_SELFSIGN
authorfriendica <info@friendica.com>
Thu, 15 Mar 2012 04:29:44 +0000 (21:29 -0700)
committerfriendica <info@friendica.com>
Thu, 15 Mar 2012 04:29:44 +0000 (21:29 -0700)
boot.php
view/login.tpl
view/logout.tpl

index 22a4e39be56c24635f7bf161342b4e5f0a247e7f..c4cfbe5bf8b8be9c05e800cb71f5d7edd9d88e4d 100755 (executable)
--- a/boot.php
+++ b/boot.php
@@ -696,6 +696,7 @@ function get_guid($size=16) {
 
 if(! function_exists('login')) {
 function login($register = false, $hiddens=false) {
+       $a = get_app();
        $o = "";
        $reg = false;
        if ($register) {
@@ -715,23 +716,26 @@ function login($register = false, $hiddens=false) {
 
        }
 
+       $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
 
        $o .= replace_macros($tpl,array(
-               '$logout'        => t('Logout'),
-               '$login'                 => t('Login'),
+
+               '$dest_url'     => $dest_url,
+               '$logout'       => t('Logout'),
+               '$login'        => t('Login'),
                
                '$lname'                => array('username', t('Nickname or Email address: ') , '', ''),
                '$lpassword'    => array('password', t('Password: '), '', ''),
                
                '$openid'               => !$noid,
-               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
+               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
                
-               '$hiddens'      => $hiddens,
+               '$hiddens'      => $hiddens,
                
-               '$register'             => $reg,
+               '$register'     => $reg,
                
-               '$lostpass'      => t('Forgot your password?'),
-               '$lostlink'      => t('Password Reset'),
+               '$lostpass'     => t('Forgot your password?'),
+               '$lostlink'     => t('Password Reset'),
        ));
 
        call_hooks('login_hook',$o);
index 5349fa3d836876f186e1f1398723e178c735a399..4cbbb162400a76789950a012982153e2f2277ebd 100755 (executable)
@@ -1,5 +1,5 @@
 
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
        <input type="hidden" name="auth-params" value="login" />
 
        <div id="login_standard">
index 6a84a5bbcf58ae49f676c1c9f0de5c97cebf66c8..efc971df8491a2c59d4e01c5add95f2e6c90c549 100755 (executable)
@@ -1,4 +1,4 @@
-<form action="" method="post" >
+<form action="$dest_url" method="post" >
 <div class="logout-wrapper">
 <input type="hidden" name="auth-params" value="logout" />
 <input type="submit" name="submit" id="logout-button" value="$logout" />