diff --git a/webtools/litmus/Litmus/DB/Testresult.pm b/webtools/litmus/Litmus/DB/Testresult.pm index 9ce78a3de24..81fd9afa340 100755 --- a/webtools/litmus/Litmus/DB/Testresult.pm +++ b/webtools/litmus/Litmus/DB/Testresult.pm @@ -61,16 +61,16 @@ Litmus::DB::Testresult->autoinflate(dates => 'Time::Piece'); # for historical reasons, note() is a shorthand way of saying "the text of the first # comment on this result if that comment was submitted by the result submitter" sub note { - my $self = shift; - - my @comments = $self->comments(); - - if (@comments && $comments[0] && - $comments[0]->user() == $self->user()) { - return $comments[0]->comment(); - } else { - return undef; - } + my $self = shift; + + my @comments = $self->comments(); + + if (@comments && $comments[0] && + $comments[0]->user() == $self->user()) { + return $comments[0]->comment(); + } else { + return undef; + } } # is this test result recent? diff --git a/webtools/litmus/Litmus/DBI.pm b/webtools/litmus/Litmus/DBI.pm index 2bdbfb5cd27..b4f2893f5bc 100755 --- a/webtools/litmus/Litmus/DBI.pm +++ b/webtools/litmus/Litmus/DBI.pm @@ -23,9 +23,9 @@ Litmus::DBI->set_db('Main', # Litmus::DBI's subclasses to set column aliases with the column_alias() sub. # Takes the database column name and the alias name. sub column_alias { - my ($self, $db_name, $alias_name) = @_; - - $column_aliases{$alias_name} = $db_name; + my ($self, $db_name, $alias_name) = @_; + + $column_aliases{$alias_name} = $db_name; } # here's where the actual work happens. We consult our alias list @@ -33,32 +33,32 @@ sub column_alias { # database column if we find a match memoize('find_column'); sub find_column { - my $self = shift; - my $wanted = shift; - - if (ref $self) { - $wanted =~ s/^.*::(\w+)$/$1/; - } - if ($column_aliases{$wanted}) { - return $column_aliases{$wanted}; - } else { - # not an alias, so we use the normal - # find_column() from Class::DBI - $self->SUPER::find_column($wanted); - } + my $self = shift; + my $wanted = shift; + + if (ref $self) { + $wanted =~ s/^.*::(\w+)$/$1/; + } + if ($column_aliases{$wanted}) { + return $column_aliases{$wanted}; + } else { + # not an alias, so we use the normal + # find_column() from Class::DBI + $self->SUPER::find_column($wanted); + } } sub AUTOLOAD { - my $self = shift; - my @args = @_; - my $name = our $AUTOLOAD; - - my $col = $self->find_column($name); - if (!$col) { - internalEror("tried to call Litmus::DBI method $name which does not exist"); - } - - return $self->$col(@args); + my $self = shift; + my @args = @_; + my $name = our $AUTOLOAD; + + my $col = $self->find_column($name); + if (!$col) { + internalEror("tried to call Litmus::DBI method $name which does not exist"); + } + + return $self->$col(@args); } 1; diff --git a/webtools/litmus/Litmus/Template.pm b/webtools/litmus/Litmus/Template.pm index 2737dd9fd21..9548ec7f7dd 100755 --- a/webtools/litmus/Litmus/Template.pm +++ b/webtools/litmus/Litmus/Template.pm @@ -151,9 +151,9 @@ sub create { # anti-spam filtering of email addresses email => sub { - my ($var) = @_; - $var =~ s/\@/\@/g; - return $var; + my ($var) = @_; + $var =~ s/\@/\@/g; + return $var; } }, }); diff --git a/webtools/litmus/createdb.sql b/webtools/litmus/createdb.sql index 23217c7743c..f8a64b898b7 100755 --- a/webtools/litmus/createdb.sql +++ b/webtools/litmus/createdb.sql @@ -148,43 +148,43 @@ create table test_format_lookup ( ); create table test_result_bugs ( - test_result_id int(11) not null auto_increment, - last_updated datetime not null, - submission_time datetime not null, - user_id int(11), - bug_id int(11), - - PRIMARY KEY (test_result_id,bug_id), - - INDEX(test_result_id), - INDEX(last_updated), - INDEX(submission_time), - INDEX(user_id) + test_result_id int(11) not null auto_increment, + last_updated datetime not null, + submission_time datetime not null, + user_id int(11), + bug_id int(11), + + PRIMARY KEY (test_result_id,bug_id), + + INDEX(test_result_id), + INDEX(last_updated), + INDEX(submission_time), + INDEX(user_id) ); create table test_result_comments ( - comment_id int(11) not null primary key auto_increment, - test_result_id int(11) not null, - last_updated datetime not null, - submission_time datetime not null, - user_id int(11), - comment text, - - INDEX(test_result_id), - INDEX(last_updated), - INDEX(submission_time), - INDEX(user_id) + comment_id int(11) not null primary key auto_increment, + test_result_id int(11) not null, + last_updated datetime not null, + submission_time datetime not null, + user_id int(11), + comment text, + + INDEX(test_result_id), + INDEX(last_updated), + INDEX(submission_time), + INDEX(user_id) ); create table test_result_logs ( - log_id int(11) not null primary key auto_increment, - test_result_id int(11) not null, - last_updated datetime not null, - submission_time datetime not null, - log_path varchar(255), - - INDEX(test_result_id), - INDEX(last_updated), - INDEX(submission_time), - INDEX(log_path) + log_id int(11) not null primary key auto_increment, + test_result_id int(11) not null, + last_updated datetime not null, + submission_time datetime not null, + log_path varchar(255), + + INDEX(test_result_id), + INDEX(last_updated), + INDEX(submission_time), + INDEX(log_path) ); \ No newline at end of file diff --git a/webtools/litmus/process_test.cgi b/webtools/litmus/process_test.cgi index cb2be29a1b1..b3242e86417 100755 --- a/webtools/litmus/process_test.cgi +++ b/webtools/litmus/process_test.cgi @@ -141,10 +141,10 @@ foreach my $curtestid (@tests) { # if there's a note, create an entry in the comments table for it Litmus::DB::Comment->create({ - testresult => $tr, - submission_time => $time, - user => $user, - comment => $note + testresult => $tr, + submission_time => $time, + user => $user, + comment => $note }); } diff --git a/webtools/litmus/run_tests.cgi b/webtools/litmus/run_tests.cgi index fad07aefdc3..99ccc7c870d 100755 --- a/webtools/litmus/run_tests.cgi +++ b/webtools/litmus/run_tests.cgi @@ -68,7 +68,7 @@ sub page_pickGroupSubgroup { my $product = Litmus::DB::Product->retrieve($c->param("product")); if (! $product) { - print $c->header(); + print $c->header(); invalidInputError("Invalid product ".$c->param("product")); } @@ -85,8 +85,8 @@ sub page_pickGroupSubgroup { # get the user id and set a login cookie: my $email = $c->param("email"); if (!$email) { - print $c->header(); - invalidInputError("You must enter your email address so we can track your results and contact you if we have any questions."); + print $c->header(); + invalidInputError("You must enter your email address so we can track your results and contact you if we have any questions."); } $user = Litmus::DB::User->find_or_create(email => $email); diff --git a/webtools/litmus/simpletest.cgi b/webtools/litmus/simpletest.cgi index 1f5c693dd68..31899b1ad12 100755 --- a/webtools/litmus/simpletest.cgi +++ b/webtools/litmus/simpletest.cgi @@ -54,9 +54,9 @@ sub showTest { my $prod = Litmus::DB::Product->search(name => "Firefox")->next(); my @detectbranch = $ua->branch($prod); if ((! $ua->buildid()) || (! $detectbranch[0]) || - $curbuildtime - $ua->buildid() > $maxbuildage || - ($detectbranch[0]->branchid() != $branch->branchid() && - $detectbranch[0]->branchid() != $branch2->branchid())) { + $curbuildtime - $ua->buildid() > $maxbuildage || + ($detectbranch[0]->branchid() != $branch->branchid() && + $detectbranch[0]->branchid() != $branch2->branchid())) { Litmus->template()->process("simpletest/simpletest.html.tmpl") || internalError(Litmus->template()->error()); exit; diff --git a/webtools/litmus/templates/en/default/list/list.html.tmpl b/webtools/litmus/templates/en/default/list/list.html.tmpl index dc2ffc78536..788dc8f8a3e 100755 --- a/webtools/litmus/templates/en/default/list/list.html.tmpl +++ b/webtools/litmus/templates/en/default/list/list.html.tmpl @@ -44,7 +44,7 @@ [% FOREACH test=testlist %]