From 053ffdb455f78b832adba5b340d178020560e7fa Mon Sep 17 00:00:00 2001
From: Nathanael Jourdane <nathanael.jourdane@irap.omp.eu>
Date: Fri, 8 Sep 2017 16:17:52 +0200
Subject: [PATCH] bugFix targetNames issue

---
 js/app/views/EpnTapUI.js | 1 +
 php/epntap.php           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/app/views/EpnTapUI.js b/js/app/views/EpnTapUI.js
index ebd7d22..1ba0e85 100644
--- a/js/app/views/EpnTapUI.js
+++ b/js/app/views/EpnTapUI.js
@@ -125,6 +125,7 @@ Ext.create('Ext.data.Store', {
 		{property: 'short_name', direction: 'ASC'}
 	],
 	listeners: {
+		// beforeload: function(s, operation) { console.log(operation); },
 		load: function(store, records, successful) {
 			if(!successful) {
 				Ext.Msg.alert('Error', 'Can not get epntap services from registries.');
diff --git a/php/epntap.php b/php/epntap.php
index 92b0ebf..b3d3b26 100644
--- a/php/epntap.php
+++ b/php/epntap.php
@@ -183,7 +183,7 @@ function getGranules() {
 
 function createFilter($targetNames, $productTypes, $timeMin, $timeMax) {
 	$filter = array();
-	if($targetName) {
+	if($targetNames) {
 		array_push($filter, "target_name IN ('" . join("', '", preg_split("/ ?[;,] ?+/", $targetNames)) . "')");
 	}
 	if($productTypes) {
--
libgit2 0.21.2