The branch, master has been updated via eeae8bec2159e2be2b25cf704fa25d1ac1d33c33 (commit) from 5908ab72bca63e9efb326e8148c1f8f0fb285de6 (commit)
- Log ----------------------------------------------------------------- commit eeae8bec2159e2be2b25cf704fa25d1ac1d33c33 Author: Michal Čihař mcihar@novell.com Date: Wed Jul 21 09:21:58 2010 +0200
Get rid of inline javascript in login form.
-----------------------------------------------------------------------
Summary of changes: js/functions.js | 7 +++++++ libraries/auth/cookie.auth.lib.php | 30 +++++++----------------------- 2 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/js/functions.js b/js/functions.js index e5d8363..b5995f0 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1726,5 +1726,12 @@ $(document).ready(function(){ return false; }); $('#sqlquery').focus(); + if ($('#input_username')) { + if ($('#input_username').val() == '') { + $('#input_username').focus(); + } else { + $('#input_password').focus(); + } + } });
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index b40f7a2..a964455 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -172,14 +172,14 @@ function PMA_auth() ?> <script src="./js/jquery/jquery-1.4.2.js" type="text/javascript"></script> <script src="./js/update-location.js" type="text/javascript"></script> -<script type="text/javascript"> -//<![CDATA[ -// show login form in top frame -if (top != self) { - window.top.location.href=location; +<?php +if ( false === $GLOBALS['cfg']['AllowThirdPartyFraming']) { +?> +<script src="./js/cross_framing_protection.js" type="text/javascript"></script> +<?php } -//]]> -</script> +?> +<script src="./js/functions.js" type="text/javascript"></script> </head>
<body class="loginform"> @@ -312,22 +312,6 @@ if (top != self) { } ?> </div> -<script type="text/javascript"> -// <![CDATA[ -function PMA_focusInput() -{ - var input_username = document.getElementById('input_username'); - var input_password = document.getElementById('input_password'); - if (input_username.value == '') { - input_username.focus(); - } else { - input_password.focus(); - } -} - -window.setTimeout('PMA_focusInput()', 500); -// ]]> -</script> <?php if (file_exists(CUSTOM_FOOTER_FILE)) { require CUSTOM_FOOTER_FILE;
hooks/post-receive