From 1d3b2535ecd9e0841d696070e8e56efe0637597b Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 6 Apr 2010 06:41:18 +0000 Subject: [PATCH] fixing undef $clade bug in BGB git-svn-id: http://biopieces.googlecode.com/svn/trunk@946 74ccb610-7750-0410-82ae-013aeee3265d --- www/index.cgi | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/www/index.cgi b/www/index.cgi index e33b06e..c068200 100755 --- a/www/index.cgi +++ b/www/index.cgi @@ -182,9 +182,21 @@ sub cookie_default if ( $cookie->{ 'USER' } and not $cookie->{ 'LOGIN_ERROR' } ) { $cookie->{ 'LIST_CLADE' } = Maasha::BGB::Track::list_clades( $cookie->{ 'USER' } ); - $cookie->{ 'LIST_GENOME' } = Maasha::BGB::Track::list_genomes( $cookie->{ 'USER' }, $cookie->{ 'CLADE' } ); - $cookie->{ 'LIST_ASSEMBLY' } = Maasha::BGB::Track::list_assemblies( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' } ); - $cookie->{ 'LIST_CONTIG' } = Maasha::BGB::Track::list_contigs( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' }, $cookie->{ 'ASSEMBLY' } ); + + if ( $cookie->{ 'CLADE' } ) + { + $cookie->{ 'LIST_GENOME' } = Maasha::BGB::Track::list_genomes( $cookie->{ 'USER' }, $cookie->{ 'CLADE' } ); + + if ( $cookie->{ 'GENOME' } ) + { + $cookie->{ 'LIST_ASSEMBLY' } = Maasha::BGB::Track::list_assemblies( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' } ); + + if ( $cookie->{ 'ASSEMBLY' } ) + { + $cookie->{ 'LIST_CONTIG' } = Maasha::BGB::Track::list_contigs( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' }, $cookie->{ 'ASSEMBLY' } ); + } + } + } if ( $cookie->{ 'CONTIG' } ) { -- 2.39.5