Page Index Toggle Pages: 1
Topic Tools
Normal Topic Downloads.pl (Read 700 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,383
Location: Earth

YaBB 2.6.1
Downloads.pl
Aug 8th, 2013 at 5:16pm
Post Tools
I'm guessing that very few Forums allowing attachments actually end up with more than 25 attachments in a single thread.

If this bug has actually been addressed, I never saw it mentioned here when looking for 2.4/2.5 bug fixes when working on 2.5.2. There is a passing mention of it in this thread: http://www.carsten-dalgaard.dk/cgi-bin/yabb2/YaBB.pl?num=1330826437/0#0 but I think everyone assumed the 403 problem mentioned was related to the attachments selection issue that was addressed in Downloads.pl for 2.5AE

When the number of attachments in a thread requires going to a second page, the second page fails, bringing up a 403, or a directory index, or the folder index page (which one depends on if there is an index page and how the server is set up.)

The fix:
In Downloads.pl find all instances of:
Code (Perl)
Select All
$scripturl?action=downloadfile;  


and replace it with:
Code (Perl)
Select All
$scripturl?action=viewdownloads;thread=$thread; 



I'll be putting a new version of the file into the 2.5.2 SVN later today - the same file should work for 2.5AE installs as well
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,383
Location: Earth

YaBB 2.6.1
Re: Downloads.pl
Reply #1 - Aug 8th, 2013 at 5:21pm
Post Tools
And Many thanks to Derek Barnstorm for coming up with the bug fix. Smiley
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,383
Location: Earth

YaBB 2.6.1
Re: Downloads.pl
Reply #2 - Aug 8th, 2013 at 7:25pm
Post Tools
The download of Download.pl for 2.5.2 and 2.5AE is: Here
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,383
Location: Earth

YaBB 2.6.1
Re: Downloads.pl
Reply #3 - Aug 10th, 2013 at 3:20pm
Post Tools
Carsten pointed out an error in the posted fix code (it's not a problem in the file in the SVN)

The fix:
In Downloads.pl find all instances of:
Code (Perl)
Select All
href="$scripturl?action=downloadfile;   



and replace it with:
Code (Perl)
Select All
href="$scripturl?action=viewdownloads;thread=$thread;  



  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top