From 42b50a5d0ff5addd51da09bd169c0474ee3949a7 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 15 Apr 2003 18:56:31 +0000 Subject: fixed delete post bug, use extension cache while posting, fix download counter for images git-svn-id: file:///svn/phpbb/trunk@3838 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 30325e5bd6..e31b3c9b08 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1027,18 +1027,18 @@ if ($row = $db->sql_fetchrow($result)) // NOTE: If you want to use the download.php everytime an image is displayed inlined, replace the // Section between BEGIN and END with (Without the // of course): // $img_source = $phpbb_root_path . 'download.' . $phpEx . $SID . '&id=' . $attachment['attach_id']; - // $download_link = TRUE; + // $linked_image = TRUE; // // BEGIN if ((intval($config['ftp_upload'])) && (trim($config['upload_dir']) == '')) { $img_source = $phpbb_root_path . 'download.' . $phpEx . $SID . '&id=' . $attachment['attach_id']; - $download_link = TRUE; + $linked_image = TRUE; } else { $img_source = $filename; - $download_link = FALSE; + $linked_image = FALSE; } // END @@ -1046,9 +1046,9 @@ if ($row = $db->sql_fetchrow($result)) $download_link = $img_source; // Directly Viewed Image ... update the download count - if (!$download_link) + if (!$linked_image) { - $update_count = true; + $update_count = TRUE; } } @@ -1134,9 +1134,9 @@ if ($row = $db->sql_fetchrow($result)) if ($update_count) { - $sql = 'UPDATE ' . ATTACHMENTS_DESC_TABLE . ' + $sql = "UPDATE " . ATTACHMENTS_DESC_TABLE . " SET download_count = download_count + 1 - WHERE attach_id = ' . $attachment['attach_id']; + WHERE attach_id = " . $attachment['attach_id']; $db->sql_query($sql); } } -- cgit v1.2.1