Sorry if cross posting this to the dev list is wrong. I'm not 100% sure on what If I should write on the CVS list.
On Sat, 22 Jan 2005 03:15 pm, phppgadmin-cvs-request@... wrote:
> Message: 3
> From: Nicola Soranzo <soranzo@...>
> Reply-To: nsoranzo@...
> Organization: GOLUG
> To: phppgadmin-cvs@...
> Subject: Re: [ppa-cvs] CVS: webdb login.php,1.19,1.20
> Date: Fri, 21 Jan 2005 19:38:25 +0100
>
> My patch isn't correct (bad interference with redirect.php ), nor it is the=
> =20
> first patch from Russel (when you click on a database which you're not=20
> allowed to connect to, intro.php is loaded in the main frame "detail" with =
> no=20
> error message).
> Any suggestion? Should I revert both the changes?
>
Before that patch, it comes back with login failed, and then you have to go through
procedure of loging in again. I don't think that is exactly what we want either, but maybe it is.
It appears from a bit of testing that whatever the error connecting to the server, it reports "Login Failed"
Is that what we want to happen when somebody tries to connect to a database they are not allowed to?
Or should they get some other sort of message in the detail frame?
Does something like below, which only attaches the script to force parent window when login has already failed valid?
This means, that unless we are on a specific failed login, it will use the old code, and force a parent reload for whenever
the login has failed. Eg, session timeout, cookie timeout, connected to invalid db?
This gives us the behavior we had before, and it will reload to the top frame for anything considered a failed login.
Comments welcome.
Index: login.php
===================================================================
RCS file: /cvsroot/phppgadmin/webdb/login.php,v
retrieving revision 1.20
diff -u -r1.20 login.php
--- login.php 19 Jan 2005 16:09:08 -0000 1.20
+++ login.php 23 Jan 2005 05:49:35 -0000
@@ -86,14 +86,18 @@
// Force encoding to UTF-8
$lang['appcharset'] = 'UTF-8';
- // Output header
- $misc->printHeader($lang['strlogin'], "<script language=\"javascript\" type=\"text/javascript\"><!--
+ // Output header
+ if (isset($_failed) && $_failed) {
+ $misc->printHeader($lang['strlogin'], "<script language=\"javascript\" type=\"text/javascript\"><!--
// show login form in top frame
if (top != self) {
window.top.location.href='{$_SERVER['REQUEST_URI']}';
}
- //-->
+ -->
</script>");
+ } else {
+ $misc->printHeader($lang['strlogin']);
+ }
$misc->printBody();
?>
Regards
Russell Smith.
> Alle 17:09, mercoled=C3=AC 19 gennaio 2005, Nicola Soranzo ha scritto:
> > Update of /cvsroot/phppgadmin/webdb
> > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7541
> >
> > Modified Files:
> > login.php
> > Log Message:
> > Correct 'Ensure login frame is always at top level (Russell Smith)' patch:
> > show the login page, not index.php
> >
> > Index: login.php
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > RCS file: /cvsroot/phppgadmin/webdb/login.php,v
> > retrieving revision 1.19
> > retrieving revision 1.20
> > diff -C2 -d -r1.19 -r1.20
> > *** login.php 19 Jan 2005 10:27:16 -0000 1.19
> > --- login.php 19 Jan 2005 16:09:08 -0000 1.20
> > ***************
> > *** 91,95 ****
> > // show login form in top frame
> > if (top !=3D self) {
> > ! window.top.location.href=3D'./index.php';
> > }
> > //-->
> > --- 91,95 ----
> > // show login form in top frame
> > if (top !=3D self) {
> > ! window.top.location.href=3D'{$_SERVER['REQUEST_URI']}';
> > }
> > //-->
|