From 05a14efe4cc890ce1532648668acf3662485d243 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Thu, 11 Mar 2010 05:30:41 +0200 Subject: [PATCH] Feature #272 - "Dropbox" tool, downloading zip-archives: Adding html-metadata to the generated supplemental file "overview.html" (which you may find inside the downloaded archive). --- main/dropbox/dropbox_functions.inc.php | 33 ++++++++++++++++---------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/main/dropbox/dropbox_functions.inc.php b/main/dropbox/dropbox_functions.inc.php index eb7185ce58..43627f0c92 100755 --- a/main/dropbox/dropbox_functions.inc.php +++ b/main/dropbox/dropbox_functions.inc.php @@ -1217,18 +1217,27 @@ function cleanup_temp_dropbox() { } /** -* @desc generates the contents of a html file that gives an overview of all the files in the zip file. -* This is to know the information of the files that are inside the zip file (who send it, the comment, ...) -* @author Patrick Cool , Ghent University -* @version march 2006 -*/ + * @desc Generates the contents of a html file that gives an overview of all the files in the zip file. + * This is to know the information of the files that are inside the zip file (who send it, the comment, ...) + * @author Patrick Cool , Ghent University, March 2006 + * @author Ivan Tcholakov, 2010, code for html metadata has been added. + */ function generate_html_overview($files, $dont_show_columns = array(), $make_link = array()) { - $return = "\n\n\t".get_lang('OverviewOfFilesInThisZip')."\n"; - $return .= "\n\n\n"; + $return = ''."\n"; + $return .= ''."\n"; + + $return .= "\n\t".get_lang('OverviewOfFilesInThisZip')."\n"; + $return .= "\t".''."\n"; + $return .= "\n\n"; + $return .= ''."\n\n"; + $return .= "
\n"; $counter = 0; foreach ($files as $key => $value) { - // We add the header + + // Adding the header. if ($counter == 0) { $columns_array = array_keys($value); $return .= "\n"; @@ -1238,11 +1247,11 @@ function generate_html_overview($files, $dont_show_columns = array(), $make_link } $column[] = $columns_array_value; } - $return .= "\n"; + $return .= "\n\n"; } $counter++; - // We add the content + // Adding the content. $return .= "\n"; foreach ($column as $column_key => $column_value) { if (!in_array($column_value,$dont_show_columns)) { @@ -1255,9 +1264,7 @@ function generate_html_overview($files, $dont_show_columns = array(), $make_link $return .= ""; } } - $return .= "\n"; - - + $return .= "\n\n"; } $return .= "\n
\n\n"; $return .= "\n";