Fixing compatibility between displaylists.php and database.php