A pdf uploaded using the upload module with private serving is displayed to the user as text, since text/plain has been added to its content type by fckeditor.module's hook_file_download function.

Changing line 1882 from

   if ($file = db_fetch_object($result)) {

to

   if ($file2 = db_fetch_object($result)) {



fixes it for me, looks like you accidentally overwrote the $file parameter sent to the function.

Comments

kbogert’s picture

sorry, that should be line 1884

wwalc’s picture

Status: Active » Fixed

Actually I don't see any reason to assign variable there

 if (db_fetch_object($result)) {

should do the trick as well and I fixed it in CVS this way.

However, could you confirm that it works correctly without assigning $file2 as suggested?

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.