add more debugging messages for addFileToIndex()
Change-Id: Ie313f726b1d73e8fd5c94c017540eb4d0b217c18
Signed-off-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
diff --git a/download.php b/download.php
index 538c290..aafc629 100755
--- a/download.php
+++ b/download.php
@@ -690,6 +690,13 @@
function addFileToIndex($in_file) {
global $app, $dbc_RW, $dbh_RW, $filetime, $filesize, $_debug;
+ if ($_debug == 1) {
+ echo '<br />---<br />Adding file to index: addFileToIndex()<br />';
+ echo 'File ($in_file): ' . var_export($in_file, TRUE) . '<br />';
+ echo 'Filetime ($filetime): ' . var_export($filetime, TRUE) . '<br />';
+ echo 'Filesize ($filesize): ' . var_export($filesize, TRUE) . '<br />';
+ }
+
# Add this file to the file index
if($in_file != "") {
$sql = "INSERT INTO download_file_index (file_id, file_name, download_count, timestamp_disk, size_disk_bytes)
@@ -697,6 +704,10 @@
$rs = mysqli_query($dbh_RW, $sql);
$inserted_id = mysqli_insert_id($dbh_RW);
mysqli_query($dbh_RW, "UNLOCK TABLES");
+ if ($_debug == 1) {
+ echo 'Inserted ID ($inserted_id): ' . var_export($inserted_id, TRUE) . '<br />';
+ echo '---<br />';
+ }
return $inserted_id;
}
else {