Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[feature/attach-dl] Added docblock for renamed download_check_forum_auth

PHPBB3-11042
  • Loading branch information...
commit e8830c3369dbd4b25a4798eeb3fe2c7834825c42 1 parent 6da4755
@Fyorl authored
Showing with 12 additions and 3 deletions.
  1. +2 −2 phpBB/download/file.php
  2. +10 −1 phpBB/includes/functions_download.php
View
4 phpBB/download/file.php
@@ -230,7 +230,7 @@
{
if (!$attachment['in_message'])
{
- phpbb_download_handle_passworded_forum($db, $auth, $attachment['topic_id']);
+ phpbb_download_check_forum_auth($db, $auth, $attachment['topic_id']);
}
else
{
@@ -329,7 +329,7 @@
// sizeof($attachments) >= 1
if (!$attachment['in_message'])
{
- phpbb_download_handle_passworded_forum($db, $auth, $attachment['topic_id']);
+ phpbb_download_check_forum_auth($db, $auth, $attachment['topic_id']);
}
if (!class_exists('compress'))
View
11 phpBB/includes/functions_download.php
@@ -614,7 +614,16 @@ function phpbb_increment_downloads($db, $ids)
$db->sql_query($sql);
}
-function phpbb_download_handle_passworded_forum($db, $auth, $topic_id)
+/**
+* Checks that the user has permission to download attachments from the forum
+*
+* @param dbal $db The database object
+* @param phpbb_auth $auth The authentication object
+* @param int $topic_id The id of the topic that we are downloading from
+*
+* @return null
+*/
+function phpbb_download_check_forum_auth($db, $auth, $topic_id)
{
$sql = 'SELECT t.forum_id, f.forum_password, f.parent_id
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
Please sign in to comment.
Something went wrong with that request. Please try again.