EnsEMBL::Web::Command::Website UpdateRelease
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
EnsEMBL::Web::Data::Release
Inherit
EnsEMBL::Web::Command
Synopsis
No synopsis!
Description
No description!
Methods
process
No description
Code
Methods description
None available.
Methods code
processdescriptionprevnextTop
sub process {
  my $self = shift;
  my $object = $self->object;
  my $url = '/Website/CurrentSpecies';
  my $param = {};
  my $release_id = $object->species_defs->ENSEMBL_VERSION;

  ## Do some sanity checking on input! Set release date to first of next month
## if not correctly formatted
my $date = $object->param('date'); if ($date !~ /\d{4}-\d{2}-\d{2}/) { my @time = localtime(); my $year = $time[4] == 11 ? $time[5] + 1901 : $time[5] + 1900; my $next_month = sprintf('%02d', $time[4] + 2); $date = $year.'-'.$next_month.'-01'; } my $new_release = EnsEMBL::Web::Data::Release->new(); $new_release->number($release_id); $new_release->date($date); $new_release->archive($object->species_defs->ARCHIVE_VERSION); $new_release->online('Y'); $new_release->mart('Y'); $new_release->save; $self->ajax_redirect($url, $param); } } 1;
}
General documentation
No general documentation available.