ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: ahrasis on February 10, 2017, 12:01:01 am

Title: maximum number of attachments
Post by: ahrasis on February 10, 2017, 12:01:01 am
QuoteAllowed file types: doc, gif, jpg, mpg, pdf, png, txt, zip, gz, php, css, psd, js, xml, svg
Restrictions: 10 per post, 0 remaining
You have reached the maximum number of attachments allowed per post.

While limit is probably ok even for addon's author, I wish we can be allowed to remove some of them if we want to add a new version. Otherwise, we can't no longer put our addon as a post as there is no option to remove as well when we already reached 10 files.
Title: Re: maximum number of attachments
Post by: emanuele on February 10, 2017, 07:33:25 am
Why is that in site feedback when it is clearly a bug? ;)
Title: Re: maximum number of attachments
Post by: FF / MFG on February 10, 2017, 07:41:43 am
10
Title: Re: maximum number of attachments
Post by: FF / MFG on February 10, 2017, 07:42:44 am
1
Title: Re: maximum number of attachments
Post by: emanuele on February 10, 2017, 08:43:12 am
My connection is saturated for other stuff I'm doing, as soon as I have some bandwidth available I'll fix it here and push a fix.
Title: Re: maximum number of attachments
Post by: emanuele on February 10, 2017, 02:07:52 pm
Now here should work fine.
The "fix" I applied is just in Post.template.php:
Code: [Select]
if ($context['attachments']['num_allowed'] > 0 || !empty($context['dont_show_them']))
to:
Code: [Select]
if (empty($context['dont_show_them']))
I also inverted the !empty, because if I'm not wrong this was actually wrong.
Title: Re: maximum number of attachments
Post by: ahrasis on February 10, 2017, 03:13:55 pm
This happening in this site not mine. ;)
Title: Re: maximum number of attachments
Post by: emanuele on February 18, 2017, 03:36:55 pm
Was that broken in 1.0 as well?

ETA: apparently not.