This commit is contained in:
ghendricks%novell.com 2007-05-23 20:42:27 +00:00
Родитель 2a664abe8d
Коммит ca369e80b7
29 изменённых файлов: 75 добавлений и 103 удалений

Просмотреть файл

@ -29,7 +29,7 @@ use Bugzilla::Util;
use Bugzilla::Testopia::TestPlan;
use Bugzilla::Testopia::Util;
my $template = Bugzilla->template;
local our $template = Bugzilla->template;
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
@ -40,7 +40,7 @@ Bugzilla->login(LOGIN_REQUIRED);
print $cgi->header;
ThrowUserError("testopia-read-only") unless Bugzilla->user->in_group('admin');
my $plan = Bugzilla::Testopia::TestPlan->new({});
local our $plan = Bugzilla::Testopia::TestPlan->new({});
my $action = $cgi->param('action') || '';
my $item = $cgi->param('item') || '';
@ -97,7 +97,7 @@ else {
}
sub display {
$vars->{'plan'} = $plan;
$template->process("testopia/admin/plantypes/show.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
$vars->{'plan'} = $plan;
$template->process("testopia/admin/plantypes/show.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
}

Просмотреть файл

@ -45,10 +45,9 @@ use Data::Dumper;
Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
use vars qw($vars);
local our $cgi = Bugzilla->cgi;
local our $template = Bugzilla->template;
local our $vars = {};
print $cgi->header;

Просмотреть файл

@ -31,15 +31,13 @@ use Bugzilla::Testopia::Attachment;
use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
Bugzilla->login(LOGIN_REQUIRED);
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
my $attach_id = $cgi->param('attach_id');
my $plan_id = $cgi->param('plan_id');

Просмотреть файл

@ -35,8 +35,8 @@ use Bugzilla::Testopia::Util;
Bugzilla->login(LOGIN_REQUIRED);
use vars qw($vars);
my $template = Bugzilla->template;
local our $vars = {};
local our $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
print $cgi->header;

Просмотреть файл

@ -32,7 +32,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Constants;
use Bugzilla::Testopia::Report;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
@ -50,7 +50,6 @@ if ($type eq 'status-breakdown'){
exit;
}
validate_test_id($case_id, 'case');
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $case = Bugzilla::Testopia::TestCase->new($case_id);
exit unless $case->canview;

Просмотреть файл

@ -32,7 +32,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Constants;
use Bugzilla::Testopia::Report;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;

Просмотреть файл

@ -35,8 +35,8 @@ use Bugzilla::Testopia::Util;
Bugzilla->login(LOGIN_REQUIRED);
use vars qw($vars);
my $template = Bugzilla->template;
local our $vars = {};
local our $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
print $cgi->header;

Просмотреть файл

@ -27,7 +27,7 @@ use Bugzilla::Constants;
use Bugzilla::Error;
Bugzilla->login(LOGIN_REQUIRED);
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;

Просмотреть файл

@ -47,13 +47,12 @@ use Bugzilla::Error;
use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Environment;
use Bugzilla::Testopia::Environment::Xml;
use vars qw($vars);
#************************************ Variable Declarations/Initialization **********************************#
#************************************ Variable Declarations/Initialization **********************************#
my $vars = {};
Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $env_id = $cgi->param('env_id');
#********************************************* UI Logic ************************************************#

Просмотреть файл

@ -47,23 +47,23 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Environment;
use Bugzilla::Testopia::Environment::Xml;
use Data::Dumper;
use vars qw($vars);
#************************************ Variable Declarations/Initialization **********************************#
Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $upload_dir = "testopia/temp";
my $env_filename = $cgi->param('env_file');
my $env_fh = $cgi->upload('env_file');
my $action = $cgi->param('action') || '';
my $xml = $cgi->param('xml');
my $submit = $cgi->param('submit');
my $environment = Bugzilla::Testopia::Environment->new({'environment_id' => 0});
my $user_can_edit = $environment->canedit;
local our $cgi = Bugzilla->cgi;
local our $template = Bugzilla->template;
local our $vars = {};
local our $upload_dir = "testopia/temp";
local our $env_filename = $cgi->param('env_file');
local our $env_fh = $cgi->upload('env_file');
local our $action = $cgi->param('action') || '';
local our $xml = $cgi->param('xml');
local our $submit = $cgi->param('submit');
local our $environment = Bugzilla::Testopia::Environment->new({'environment_id' => 0});
local our $user_can_edit = $environment->canedit;
#my $user_can_edit = 0; # Remove on production <- used to toggle user's rights.
my $message = '';
our $message = '';
$CGI::POST_MAX = 1024 * 500; # max file size 500K
#***************************************** UI Logic ************************************************************#

Просмотреть файл

@ -34,14 +34,12 @@ use Bugzilla::Testopia::TestCaseRun;
use Bugzilla::Testopia::Table;
use Bugzilla::Testopia::Constants;
use vars qw($vars);
my $vars = {};
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $query_limit = 15000;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
$cgi->send_cookie(-name => "TEST_LAST_ORDER",
-value => $cgi->param('order'),
-expires => "Fri, 01-Jan-2038 00:00:00 GMT");

Просмотреть файл

@ -35,14 +35,12 @@ use Bugzilla::Testopia::TestPlan;
use Bugzilla::Testopia::TestTag;
use Bugzilla::Testopia::Table;
use vars qw($vars);
my $vars = {};
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $query_limit = 10000;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
$cgi->send_cookie(-name => "TEST_LAST_ORDER",
-value => $cgi->param('order'),
-expires => "Fri, 01-Jan-2038 00:00:00 GMT");

Просмотреть файл

@ -38,7 +38,7 @@ use Bugzilla::Testopia::Environment::Property;
Bugzilla->login(LOGIN_REQUIRED);
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;

Просмотреть файл

@ -31,7 +31,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use vars qw($vars);
my $vars = {};
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;

Просмотреть файл

@ -33,8 +33,7 @@ use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use Bugzilla::Testopia::TestRun;
use vars qw($vars);
my $vars = {};
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $query_limit = 5000;

Просмотреть файл

@ -31,7 +31,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::TestCase;
use JSON;
use vars qw($vars);
my $vars = {};
Bugzilla->login(LOGIN_REQUIRED);
@ -40,8 +40,6 @@ my $template = Bugzilla->template;
print $cgi->header;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
my @plan_id = $cgi->param('plan_id');

Просмотреть файл

@ -39,7 +39,7 @@ Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
print $cgi->header;

Просмотреть файл

@ -33,7 +33,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::TestPlan;
use Bugzilla::Testopia::Product;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
Bugzilla->login(LOGIN_REQUIRED);
@ -43,8 +43,6 @@ my $cgi = Bugzilla->cgi;
print $cgi->header;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
if ($action eq 'Add'){

Просмотреть файл

@ -33,15 +33,13 @@ use Bugzilla::Testopia::TestRun;
use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $query_limit = 10000;
Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
my $plan_id = $cgi->param('plan_id');

Просмотреть файл

@ -34,8 +34,8 @@ use vars qw($vars);
require 'globals.pl';
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
local our $template = Bugzilla->template;
local our $cgi = Bugzilla->cgi;
Bugzilla->login(LOGIN_REQUIRED);
print $cgi->header;
@ -51,7 +51,7 @@ unless (detaint_natural($plan_id)){
}
validate_test_id($plan_id, 'plan');
my $plan = Bugzilla::Testopia::TestPlan->new($plan_id);
local our $plan = Bugzilla::Testopia::TestPlan->new($plan_id);
unless ($plan->canadmin){
ThrowUserError('testopia-plan-acl-denied', {plan_id => $plan->id});

Просмотреть файл

@ -29,7 +29,7 @@ use Bugzilla::Util;
use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Report;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;
@ -49,8 +49,6 @@ if ($type eq 'build_coverage'){
exit;
}
validate_test_id($plan_id, 'plan');
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $action = $cgi->param('action') || '';
my $plan = Bugzilla::Testopia::TestPlan->new($plan_id);
ThrowUserError("testopia-permission-denied", {'object' => $plan}) unless $plan->canview;

Просмотреть файл

@ -36,11 +36,11 @@ use Bugzilla::Testopia::Environment::Element;
use Bugzilla::Testopia::Environment::Property;
use JSON;
use vars qw($vars $template);
local our $vars = {};
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
local our $cgi = Bugzilla->cgi;
local our $template = Bugzilla->template;
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';

Просмотреть файл

@ -30,7 +30,7 @@ use Bugzilla::Testopia::Util;
use Bugzilla::Testopia::Constants;
use Bugzilla::Testopia::Report;
use vars qw($vars);
my $vars = {};
my $template = Bugzilla->template;
my $cgi = Bugzilla->cgi;

Просмотреть файл

@ -38,15 +38,14 @@ use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use JSON;
use vars qw($vars);
my $template = Bugzilla->template;
my $query_limit = 15000;
local our $vars = {};
local our $template = Bugzilla->template;
local our $query_limit = 15000;
Bugzilla->login(LOGIN_REQUIRED);
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
local our $cgi = Bugzilla->cgi;
my $case_id = trim(Bugzilla->cgi->param('case_id')) || '';
@ -60,7 +59,7 @@ validate_test_id($case_id, 'case');
my $action = $cgi->param('action') || '';
$cgi->param('ctype' , 'print') if ($action eq 'Print');
my $format = $template->get_format("testopia/case/show", scalar $cgi->param('format'), scalar $cgi->param('ctype'));
local our $format = $template->get_format("testopia/case/show", scalar $cgi->param('format'), scalar $cgi->param('ctype'));
my $disp = "inline";
# We set CSV files to be downloaded, as they are designed for importing
# into other programs.

Просмотреть файл

@ -35,14 +35,13 @@ use Bugzilla::Testopia::TestRun;
use Bugzilla::Testopia::TestCase;
use Bugzilla::Testopia::TestCaseRun;
use vars qw($vars);
my $template = Bugzilla->template;
my $query_limit = 15000;
local our $vars = {};
local our $template = Bugzilla->template;
local our $query_limit = 15000;
Bugzilla->login(LOGIN_REQUIRED);
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
local our $cgi = Bugzilla->cgi;
print $cgi->header;
@ -50,7 +49,6 @@ my $caserun_id = $cgi->param('caserun_id');
validate_test_id($caserun_id, 'case_run');
ThrowUserError('testopia-missing-parameter', {'param' => 'caserun_id'}) unless ($caserun_id);
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
$vars->{'fullwidth'} = 1;
my $action = $cgi->param('action') || '';

Просмотреть файл

@ -47,13 +47,13 @@ Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
use vars qw($vars);
my $template = Bugzilla->template;
local our $vars = {};
local our $template = Bugzilla->template;
print $cgi->header;
my $action = $cgi->param('action') || '';
my $env_id = trim(Bugzilla->cgi->param('env_id')) || '';
local our $env_id = trim(Bugzilla->cgi->param('env_id')) || '';
unless ($env_id || $action){
$template->process("testopia/environment/choose.html.tmpl", $vars)

Просмотреть файл

@ -39,18 +39,17 @@ use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use JSON;
use vars qw($vars);
my $template = Bugzilla->template;
my $run_query_limit = 5000;
my $case_query_limit = 10000;
local our $vars = {};
local our $template = Bugzilla->template;
local our $run_query_limit = 5000;
local our $case_query_limit = 10000;
Bugzilla->login(LOGIN_REQUIRED);
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
local our $cgi = Bugzilla->cgi;
my $plan_id = trim(Bugzilla->cgi->param('plan_id') || '');
my $action = $cgi->param('action') || '';
local our $action = $cgi->param('action') || '';
unless ($plan_id){
$vars->{'form_action'} = 'tr_show_plan.cgi';
print $cgi->header;
@ -60,8 +59,6 @@ unless ($plan_id){
}
validate_test_id($plan_id, 'plan');
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $serverpush = support_server_push($cgi);
$vars->{'action'} = "Commit";

Просмотреть файл

@ -37,16 +37,16 @@ use Bugzilla::Testopia::Search;
use Bugzilla::Testopia::Table;
use Bugzilla::Testopia::Product;
use vars qw($vars);
my $template = Bugzilla->template;
my $query_limit = 15000;
local our $vars = {};
local our $template = Bugzilla->template;
local our $query_limit = 15000;
Bugzilla->login(LOGIN_REQUIRED);
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
local our $cgi = Bugzilla->cgi;
my $run_id = trim($cgi->param('run_id') || '');
local our $run_id = trim($cgi->param('run_id') || '');
unless ($run_id){
print $cgi->header;
@ -55,11 +55,9 @@ unless ($run_id){
exit;
}
validate_test_id($run_id, 'run');
push @{$::vars->{'style_urls'}}, 'testopia/css/default.css';
my $serverpush = support_server_push($cgi);
my $action = $cgi->param('action') || '';
local our $action = $cgi->param('action') || '';
####################
### Edit Actions ###
@ -99,7 +97,6 @@ elsif ($action =~ /^Clone/){
push @ids, $id;
}
my $dbh = Bugzilla->dbh;
my $ref;
if ($case_list){
$ref = $dbh->selectcol_arrayref(

Просмотреть файл

@ -36,10 +36,9 @@ use Bugzilla::Testopia::TestCase;
Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
use vars qw($vars $template);
my $template = Bugzilla->template;
local our $cgi = Bugzilla->cgi;
local our $vars = {};
local our $template = Bugzilla->template;
print $cgi->header;