]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixing undef $clade bug in BGB
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 6 Apr 2010 06:41:18 +0000 (06:41 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 6 Apr 2010 06:41:18 +0000 (06:41 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@946 74ccb610-7750-0410-82ae-013aeee3265d

www/index.cgi

index e33b06e096e26cbcc7a2097bb9b9dfb3a9c4240a..c068200ad8c9628773c0fc73a4f3b2d39f21c5e8 100755 (executable)
@@ -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' } )
         {