Enable kepub.epub download. re #39

This commit is contained in:
Sébastien Lucas 2013-02-05 21:08:28 +01:00
parent 0d1506a078
commit 4bce0d3349
5 changed files with 44 additions and 21 deletions

View file

@ -95,7 +95,11 @@ class Data extends Base {
if ($config['cops_use_url_rewriting'] == "1")
{
return "download/" . $this->id . "/" . urlencode ($this->getFilename ());
if ($config['cops_provide_kepub'] == "1" && preg_match("/Kobo/", $_SERVER['HTTP_USER_AGENT'])) {
return "download/" . $this->id . "/" . urlencode ($this->getUpdatedFilenameKepub ());
} else {
return "download/" . $this->id . "/" . urlencode ($this->getFilename ());
}
}
else
{