only show the Cookies message if we detect that cookies are disabled

This commit is contained in:
Marc Delisle
2006-06-02 12:39:53 +00:00
parent 840a5b3d56
commit 6ed8175b45
2 changed files with 9 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
$Id$ $Id$
$Source$ $Source$
2006-06-02 Marc Delisle <lem9@users.sourceforge.net>
* libraries/auth/cookie.auth.lib.php: for auth_type='cookie', avoid
showing the "cookies must be enabled" message if they are enabled
2006-05-31 Marc Delisle <lem9@users.sourceforge.net> 2006-05-31 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1498108, support twice the separator * libraries/common.lib.php: bug #1498108, support twice the separator
in db name, thanks to Sylvain Derosiaux in db name, thanks to Sylvain Derosiaux

View File

@@ -212,9 +212,12 @@ echo sprintf( $GLOBALS['strWelcome'],
</fieldset> </fieldset>
</form> </form>
<div class="notice"><?php echo $GLOBALS['strCookiesRequired']; ?></div>
<?php <?php
// show the "Cookies required" message only if cookies are disabled
// (we previously tried to set some cookies)
if (empty($_COOKIE)) {
echo '<div class="notice">' . $GLOBALS['strCookiesRequired'] . '</div>' . "\n";
}
if ( ! empty( $GLOBALS['PMA_errors'] ) && is_array( $GLOBALS['PMA_errors'] ) ) { if ( ! empty( $GLOBALS['PMA_errors'] ) && is_array( $GLOBALS['PMA_errors'] ) ) {
foreach ( $GLOBALS['PMA_errors'] as $error ) { foreach ( $GLOBALS['PMA_errors'] as $error ) {
echo '<div class="error">' . $error . '</div>' . "\n"; echo '<div class="error">' . $error . '</div>' . "\n";