if ($c->check_user_roles(qw/raids_info/)){
my $query = $dbh->prepare(q{
- SELECT r.id,open ,tick
+ SELECT r.id,open ,tick, open_tick, released_coords AS releasedcoords
,waves*COUNT(DISTINCT rt.id) AS waves,COUNT(rc.uid) AS claims
,COUNT(nullif(rc.launched,false)) AS launched
,COUNT(NULLIF(uid > 0 OR rc.wave > r.waves,true)) AS blocked
my ($self, $c, $raid, $order) = @_;
my $dbh = $c->model;
- my $query = $dbh->prepare(q{SELECT id,tick,waves,message,released_coords,open,ftid
+ my $query = $dbh->prepare(q{SELECT id,tick,waves,message,released_coords,open,ftid,open_tick
FROM raids WHERE id = ?
});
$raid = $dbh->selectrow_hashref($query,undef,$raid);
$dbh->begin_work;
my $tick = $c->req->param('tick');
my $waves = $c->req->param('waves');
- $dbh->do(q{UPDATE raids SET message = ?, tick = ?, waves = ? WHERE id = ?}
+ my $open_tick = $c->req->param('open_tick') || undef;
+ $dbh->do(q{UPDATE raids SET message = ?, tick = ?, waves = ?, open_tick = ? WHERE id = ?}
,undef,html_escape $c->req->param('message')
- ,$tick,$waves,$raid);
+ ,$tick,$waves,$open_tick,$raid);
$c->forward('log',[$raid, 'BC updated raid']);
<p><a href="[% c.uri_for('remove',raid.id) %]">Remove raid</a></p>
<p>Landing tick: <input type="text" name="tick" value="[% raid.tick %]"></p>
<p>Number of waves: <input type="text" name="waves" value="[% raid.waves %]"></p>
+ <p>Opening tick: <input type="text" name="open_tick" value="[% raid.open_tick %]"></p>
[% IF removegroups.size > 0 %]
<p>The following groups has access to the raid</p>
<table>