From: martinahansen Date: Tue, 6 Apr 2010 06:41:18 +0000 (+0000) Subject: fixing undef $clade bug in BGB X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1d3b2535ecd9e0841d696070e8e56efe0637597b;p=biopieces.git fixing undef $clade bug in BGB git-svn-id: http://biopieces.googlecode.com/svn/trunk@946 74ccb610-7750-0410-82ae-013aeee3265d --- 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' } ) {