🎨 Cleaning and improvements

This commit is contained in:
Florian Sylvain
2021-11-04 22:58:05 +01:00
parent d073502655
commit 4d80c83742
3 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ function realTimeDisplay() {
suggestions.innerHTML = "" suggestions.innerHTML = ""
if (!results.data.length) { if (!results.data.length) {
hideSuggestions() hideSuggestions()
} else { } else if (document.activeElement === searchBar) {
showSuggestions() showSuggestions()
} }
results.data.forEach(elem => { results.data.forEach(elem => {
+1 -6
View File
@@ -8,9 +8,6 @@ require_once("conf.php");
class dump { class dump {
private these $these; private these $these;
/**
* @param these $these
*/
public function __construct(these $these) { public function __construct(these $these) {
$this->these = $these; $this->these = $these;
} }
@@ -51,16 +48,14 @@ class dump {
$pdo_obj = new conf(); $pdo_obj = new conf();
$pdo = $pdo_obj->getPDO(); $pdo = $pdo_obj->getPDO();
$stmt = $pdo->prepare("SELECT author FROM theses WHERE author LIKE :author_name LIMIT 10;"); $stmt = $pdo->prepare("SELECT DISTINCT author FROM theses WHERE author LIKE :author_name LIMIT 10;");
$stmt->bindParam(':author_name', $author_name, PDO::PARAM_STR, 100); $stmt->bindParam(':author_name', $author_name, PDO::PARAM_STR, 100);
$stmt->execute(); $stmt->execute();
$i = 0;
while ($obj = $stmt->fetchObject()) { while ($obj = $stmt->fetchObject()) {
foreach ($obj as $elem) { foreach ($obj as $elem) {
array_push($array, $elem); array_push($array, $elem);
} }
$i++;
} }
return $array; return $array;
+1
View File
@@ -143,6 +143,7 @@ header {
} }
#hamburger { #hamburger {
user-select: none;
fill: white; fill: white;
min-width: 30px; min-width: 30px;
min-height: 30px; min-height: 30px;