diff options
author | Friendika <info@friendika.com> | 2011-10-17 14:55:46 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-17 14:55:46 -0700 |
commit | f0dc77ab6c102d83e7f98336b522f9c7b4a4a14f (patch) | |
tree | d8622e943809f497f2cf53be65e104ec394f6bc0 /boot.php | |
parent | 278433eac75639052686f70e98621466d6c44df3 (diff) | |
parent | e15aab9b755e8696d8dd7984e8de4ea5591e0caf (diff) | |
download | volse-hubzilla-f0dc77ab6c102d83e7f98336b522f9c7b4a4a14f.tar.gz volse-hubzilla-f0dc77ab6c102d83e7f98336b522f9c7b4a4a14f.tar.bz2 volse-hubzilla-f0dc77ab6c102d83e7f98336b522f9c7b4a4a14f.zip |
Merge branch 'pull'
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 50 |
1 files changed, 21 insertions, 29 deletions
@@ -636,29 +636,16 @@ function get_guid($size=16) { if(! function_exists('login')) { function login($register = false) { $o = ""; - $register_tpl = (($register) ? get_markup_template("register-link.tpl") : ""); - - $register_html = replace_macros($register_tpl,array( - '$title' => t('Create a New Account'), - '$desc' => t('Register') - )); - - $noid = get_config('system','no_openid'); - if($noid) { - $classname = 'no-openid'; - $namelabel = t('Nickname or Email address: '); - $passlabel = t('Password: '); - $login = t('Login'); - } - else { - $classname = 'openid'; - $namelabel = t('Nickname/Email/OpenID: '); - $passlabel = t("Password \x28if not OpenID\x29: "); - $login = t('Login'); + $reg = false; + if ($register) { + $reg = array( + 'title' => t('Create a New Account'), + 'desc' => t('Register') + ); } - $lostpass = t('Forgot your password?'); - $lostlink = t('Password Reset'); + $noid = get_config('system','no_openid'); + if(local_user()) { $tpl = get_markup_template("logout.tpl"); } @@ -667,17 +654,22 @@ function login($register = false) { } - $o = '<script type="text/javascript"> $(document).ready(function() { $("#login-name").focus();} );</script>'; $o .= replace_macros($tpl,array( '$logout' => t('Logout'), - '$register_html' => $register_html, - '$classname' => $classname, - '$namelabel' => $namelabel, - '$passlabel' => $passlabel, - '$login' => $login, - '$lostpass' => $lostpass, - '$lostlink' => $lostlink + '$login' => t('Login'), + + '$lname' => array('username', t('Nickname or Email address: ') , '', ''), + '$lpassword' => array('password', t('Password: '), '', ''), + + '$openid' => !$noid, + '$lopenid' => array('openid_url', t('OpenID: '),'',''), + + + '$register' => $reg, + + '$lostpass' => t('Forgot your password?'), + '$lostlink' => t('Password Reset'), )); call_hooks('login_hook',$o); |