Bug correction : errors were not shown

git-svn-id: http://piwigo.org/svn/trunk@87 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub 2003-09-11 20:22:35 +00:00
parent b6d77d389c
commit c2fe5824a6

View file

@ -24,9 +24,9 @@ $errors = array();
if ( isset( $_POST['login'] ) )
{
// retrieving the encrypted password of the login submitted
$query = 'select password';
$query.= ' from '.PREFIX_TABLE.'users';
$query.= " where username = '".$_POST['login']."';";
$query = 'SELECT password';
$query.= ' FROM '.PREFIX_TABLE.'users';
$query.= " WHERE username = '".$_POST['login']."';";
$row = mysql_fetch_array( mysql_query( $query ) );
if( $row['password'] == md5( $_POST['pass'] ) )
{
@ -61,7 +61,7 @@ $vtp->setGlobalVar( $handle, 'mail_webmaster', $conf['mail_webmaster'] );
$vtp->setGlobalVar( $handle, 'user_template', $user['template'] );
initialize_template();
//-------------------------------------------------------------- errors display
if ( sizeof( $error ) != 0 )
if ( sizeof( $errors ) != 0 )
{
$vtp->addSession( $handle, 'errors' );
foreach ( $errors as $error ) {