/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2013 *
+ * Copyright (c) 2001-2014 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
else if (!file_exists($file) OR !is_readable($file)) {
$status = 404;
} else {
- $where = "documents.fichier=".sql_quote(set_spip_doc($file))
- . ($arg ? " AND documents.id_document=".intval($arg): '');
+ $where = "D.fichier=".sql_quote(set_spip_doc($file))
+ . ($arg ? " AND D.id_document=".intval($arg): '');
$doc = sql_fetsel("D.id_document, D.titre, D.fichier, T.mime_type, T.inclus, D.extension", "spip_documents AS D LEFT JOIN spip_types_documents AS T ON D.extension=T.extension",$where);
if (!$doc) {