Fixing queries due the single database see #3910

skala
Julio Montoya 13 years ago
parent 573b428c81
commit 275dfc192a
  1. 3
      main/document/downloadfolder.inc.php

@ -61,11 +61,12 @@ if (api_is_allowed_to_edit()) {
$querypath = Database::escape_string($querypath); $querypath = Database::escape_string($querypath);
// Search for all files that are not deleted => visibility != 2 // Search for all files that are not deleted => visibility != 2
$sql = "SELECT path FROM $doc_table AS docs, $prop_table AS props $sql = "SELECT path FROM $doc_table AS docs, $prop_table AS props
WHERE props.tool='".TOOL_DOCUMENT."' AND WHERE props.tool ='".TOOL_DOCUMENT."' AND
docs.id = props.ref AND docs.id = props.ref AND
docs.path LIKE '".$querypath."/%' AND docs.path LIKE '".$querypath."/%' AND
docs.filetype = 'file' AND props.visibility<>'2' AND docs.filetype = 'file' AND props.visibility<>'2' AND
props.to_group_id = ".$to_group_id." AND props.to_group_id = ".$to_group_id." AND
props.c_id = ".$course_id." AND
docs.c_id = ".$course_id." "; docs.c_id = ".$course_id." ";
$query = Database::query($sql); $query = Database::query($sql);
// Add tem to the zip file // Add tem to the zip file

Loading…
Cancel
Save