/***************************************************************************\
* 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. *
// soit que le document est publie, c'est-a-dire
// joint a au moins 1 article ou rubrique publie
-// http://doc.spip.org/@action_acceder_document_dist
+// http://code.spip.net/@action_acceder_document_dist
function action_acceder_document_dist() {
include_spip('inc/documents');
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) {