From 6eb2940d592026c8d1e7099a289a18a7f0274095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Jaworski?= Date: Wed, 22 Feb 2017 11:22:20 +0100 Subject: [PATCH] adjustments --- cat/concordia_search.php_pattern | 28 ++++++++++++++++------------ cat/css/concordia_cat.css | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/cat/concordia_search.php_pattern b/cat/concordia_search.php_pattern index bc92144..db4e053 100644 --- a/cat/concordia_search.php_pattern +++ b/cat/concordia_search.php_pattern @@ -3,20 +3,24 @@ $url = 'http://@concordia_host@:@concordia_port@'; $inputSentence = $_GET["pattern"]; $tmId = intval($_GET["tmId"]); -$data = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence); -// use key 'http' even if you send the request to https://... -$options = array( - 'http' => array( - 'header' => "Content-type: application/x-www-form-urlencoded\r\n", - 'method' => 'POST', - 'content' => json_encode($data), - ), -); -$context = stream_context_create($options); -$response = file_get_contents($url, false, $context); +if (!empty($inputSentence)) { + $request = array("operation" => "concordiaSearch","tmId" => $tmId,"pattern" => $inputSentence); -$data = json_decode($response); + // use key 'http' even if you send the request to https://... + $options = array( + 'http' => array( + 'header' => "Content-type: application/x-www-form-urlencoded\r\n", + 'method' => 'POST', + 'content' => json_encode($request), + ), + ); + $context = stream_context_create($options); + $response = file_get_contents($url, false, $context); + + $data = json_decode($response); + +} function sub($string, $start, $end = null) { if (is_null($end)) { diff --git a/cat/css/concordia_cat.css b/cat/css/concordia_cat.css index 805f907..644007f 100644 --- a/cat/css/concordia_cat.css +++ b/cat/css/concordia_cat.css @@ -623,7 +623,7 @@ label { } input, textarea { clear: both; - font-size: 140%; + font-size: 100%; font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; padding: 1%; width:98%;