Skip to content
Snippets Groups Projects
Commit 608a89eb authored by Benjamin Altpeter's avatar Benjamin Altpeter
Browse files

(Really) minor changes before merge

parent 5a3e47c0
No related branches found
No related tags found
No related merge requests found
The MIT License (MIT)
Copyright (c) 2014 The Bookshelf Project (getbookshelf.org)
Copyright (c) 2014 – 2015 The Bookshelf Project (getbookshelf.org)
by Benjamin Altpeter and Lorenz Sieben
Permission is hereby granted, free of charge, to any person obtaining a copy
......
# Willkommen
# bookshelf-server
Awesome school project!
Open Source eBook Management Software
......@@ -105,7 +105,7 @@ class LibraryManager {
// $query: either 'homemade german plätzchen' or 'author:gabriele altpeter desc:plätzchen'
// returns array<Book]>
public function search($query) {
$courtesy_renames = array('tag' => 'tags', 'description' => 'desc');
$courtesy_renames = array('tag' => 'tags', 'description' => 'desc', 'language' => 'lang', 'identifier' => 'isbn');
$query = str_replace(array_keys($courtesy_renames), $courtesy_renames, $query);
$query = preg_replace('/(author|desc|isbn|lang|tags|title):\ ?/i', '&$1=', $query, -1, $count);
......
......@@ -194,7 +194,8 @@ WHERE library.id = {$id}";
// First item does not need an AND
if ($value === reset($query_array)) {
$query .= " {$property} LIKE '%{$value}%'";
} else {
}
else {
$query .= " AND {$property} LIKE '%{$value}%'";
}
}
......
......@@ -18,8 +18,8 @@ $mime_type = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $file);
switch($mime_type) {
case 'application/epub+zip':
include __DIR__ . '/inc/reader-epub/reader.php';
break;
include __DIR__ . '/inc/reader-epub/reader.php';
break;
case 'application/pdf':
include __DIR__ . '/inc/reader-pdf/web/viewer.php';
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment