X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Fmedias%2Faction%2Facceder_document.php;h=c5eba15e452e93f5811994efc6f95ceae2708deb;hp=485568b391368086341871f3bd60aeed188c754a;hb=122c920eb07e3f665789f8734965b576e6c25515;hpb=226942065cd4f604eb464addf45a065c9e5bc916 diff --git a/www/plugins-dist/medias/action/acceder_document.php b/www/plugins-dist/medias/action/acceder_document.php index 485568b3..c5eba15e 100644 --- a/www/plugins-dist/medias/action/acceder_document.php +++ b/www/plugins-dist/medias/action/acceder_document.php @@ -3,7 +3,7 @@ /***************************************************************************\ * 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. * @@ -36,8 +36,8 @@ function action_acceder_document_dist() { 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) {