From 70dba43c4beca6757b218435db6a3a7b3e5ece4f Mon Sep 17 00:00:00 2001 From: "bzrmirror%bugzilla.org" Date: Mon, 28 Apr 2014 14:30:19 +0000 Subject: [PATCH] Bug 980234: Testopia crashes if a component has no default QA contact git-svn-id: svn://10.0.0.236/trunk@265362 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/testopia/.bzrrev | 2 +- mozilla/webtools/testopia/.gitrev | 2 +- .../Testopia/contrib/drivers/php/.xmlrpc.inc.php | 2 +- mozilla/webtools/testopia/tr_quicksearch.cgi | 14 +++----------- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/mozilla/webtools/testopia/.bzrrev b/mozilla/webtools/testopia/.bzrrev index ed4df3c9094..97db1897096 100644 --- a/mozilla/webtools/testopia/.bzrrev +++ b/mozilla/webtools/testopia/.bzrrev @@ -1 +1 @@ -666 \ No newline at end of file +667 \ No newline at end of file diff --git a/mozilla/webtools/testopia/.gitrev b/mozilla/webtools/testopia/.gitrev index 4256996718a..61204b48325 100644 --- a/mozilla/webtools/testopia/.gitrev +++ b/mozilla/webtools/testopia/.gitrev @@ -1 +1 @@ -53032c90814dabc0112de33affb16993b7304d56 +f536f83f343151cb0cfc1eff00c7e9434c23c6d6 \ No newline at end of file diff --git a/mozilla/webtools/testopia/extensions/Testopia/contrib/drivers/php/.xmlrpc.inc.php b/mozilla/webtools/testopia/extensions/Testopia/contrib/drivers/php/.xmlrpc.inc.php index e9b88d8cc54..9ba44c9d048 100644 --- a/mozilla/webtools/testopia/extensions/Testopia/contrib/drivers/php/.xmlrpc.inc.php +++ b/mozilla/webtools/testopia/extensions/Testopia/contrib/drivers/php/.xmlrpc.inc.php @@ -1,7 +1,7 @@ -// $Id: .xmlrpc.inc.php,v 1.29 2014-04-28 14:00:19 bzrmirror%bugzilla.org Exp $ +// $Id: .xmlrpc.inc.php,v 1.30 2014-04-28 14:30:19 bzrmirror%bugzilla.org Exp $ // Copyright (c) 1999,2000,2002 Edd Dumbill. // All rights reserved. diff --git a/mozilla/webtools/testopia/tr_quicksearch.cgi b/mozilla/webtools/testopia/tr_quicksearch.cgi index 1ea31dd97b9..f5bfcb639d6 100755 --- a/mozilla/webtools/testopia/tr_quicksearch.cgi +++ b/mozilla/webtools/testopia/tr_quicksearch.cgi @@ -450,20 +450,12 @@ else{ my $product = Bugzilla::Extension::Testopia::Product->new($product_id); my @comps; - foreach my $c (@{$product->components}){ - if ($cgi->param('query')){ + foreach my $c (@{$product->components}) { + if (!$cgi->param('query') || $c->name =~ m/$q/i) { push @comps, { 'id' => $c->id, 'name' => $c->name, - 'qa_contact' => $c->default_qa_contact->login, - 'product' => $c->product->name, - } if ($c->name =~ m/$q/i); - } - else { - push @comps, { - 'id' => $c->id, - 'name' => $c->name, - 'qa_contact' => $c->default_qa_contact->login, + 'qa_contact' => $c->default_qa_contact ? $c->default_qa_contact->login : '', 'product' => $c->product->name, }; }