From: Robert Haas Date: Mon, 27 Sep 2010 16:28:09 +0000 (-0400) Subject: Unbreak commitfest_topic_warning code. X-Git-Url: http://git.postgresql.org/gitweb/review?a=commitdiff_plain;h=bd36222eefaa9c4ffd18b27921c428ce744bedd7;p=pgcommitfest.git Unbreak commitfest_topic_warning code. --- diff --git a/perl-lib/PgCommitFest/Patch.pm b/perl-lib/PgCommitFest/Patch.pm index f8c311a..dd3ef69 100644 --- a/perl-lib/PgCommitFest/Patch.pm +++ b/perl-lib/PgCommitFest/Patch.pm @@ -105,6 +105,7 @@ EOM my $commitfest_topic = $r->db->select(<{'commitfest_id'}); SELECT id, name FROM commitfest_topic WHERE commitfest_id = ? ORDER BY name EOM + my $commitfest_topic_warning = ! @$commitfest_topic; unshift @$commitfest_topic, { 'id' => '', 'name' => '(None Selected)' }; $r->control('commitfest_topic')->choice($commitfest_topic); $r->add_control('patch_status', 'select', 'Patch Status', 'required' => 1); @@ -163,7 +164,7 @@ EOM # Display template. $r->render_template('patch_form', { 'id' => $id, 'd' => $d, - 'commitfest_topic_warning' => !@$commitfest_topic, + 'commitfest_topic_warning' => $commitfest_topic_warning, 'new_commitfest' => $cf }); }