Add a config option to not use URL rewriting by default
Also fix a bug preventing download
Este commit está contenido en:
padre
93f1f72a65
commit
fe55e86def
Se han modificado 3 ficheros con 21 adiciones y 3 borrados
11
data.php
11
data.php
|
@ -70,7 +70,16 @@ class Data extends Base {
|
|||
}
|
||||
|
||||
public function getHtmlLink () {
|
||||
return "download/" . $this->id . "/" . urlencode ($this->getFilename ());
|
||||
global $config;
|
||||
|
||||
if ($config['cops_use_url_rewriting'] == "1")
|
||||
{
|
||||
return "download/" . $this->id . "/" . urlencode ($this->getFilename ());
|
||||
}
|
||||
else
|
||||
{
|
||||
return str_replace ("&", "&", "fetch.php?id=" . $this->book->id . "&data=" . $this->id . "&type=" . $this->extension);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL)
|
||||
|
|
Cargando…
Añadir tabla
Añadir enlace
Referenciar en una nueva incidencia