FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » FudAPI Examples
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: FudAPI Examples [message #36103 is a reply to message #36100] Sun, 04 March 2007 18:50 Go to previous messageGo to previous message
dardhal is currently offline  dardhal   Spain
Messages: 9
Registered: November 2006
Location: Spain
Karma:
Junior Member
Ilia wrote on Sun, 04 March 2007 18:58

This is a bug in fudapi, here is the URL to the patch that fixes the bug

http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11749


I think the above patch doesn't fully fix the bug. If I use the fix above, there is no complain message, but the attachment is not even created, in fact it is not shown in the message.

I think this is a problem with function attach_add, which is defined as:
function attach_add($at, $owner, $attach_opt=0, $ext=0)


The patch above makes FUDapi call the function with attach_opt set to 1, and while I don't know the meaning of this parameter, I think what the patch tried to set is ext, not attach_opt.

In fact, I remade the patch to the following:
-			$val = attach_add($at, $msg->poster_id);
+			$val = attach_add($at, $msg->poster_id, 0, 1);


Tried again, and now it works (but when the script is run as root, the browser is unable to download the attachment, due to permissions, the script run as www-data is ok). So I think my theory is right, or at least points in the right direction.

Hope it helps.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Deleting Moderation Queue
Next Topic: integration with a cms (the user database) possible?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 01:58:45 GMT 2024

Total time taken to generate the page: 0.04258 seconds