ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: AaronB on March 23, 2014, 08:09:54 pm

Title: Attachment Integrity Check does not functon properly
Post by: AaronB on March 23, 2014, 08:09:54 pm
Attachment and Avatars>File Maintenance: Attachment Integrity Check

Please see the attachment. ( if my screen grabber ever runs out of film, I will be in trouble )  ;)

First issue is that every time I run the check, the response is always one file to delete. I presume it is speaking of a file but it may be speaking of the database link to a non-existing file. Anyway, I did notice that no files were ever deleted from the disk.

Second issue is the "1 files" being displayed and not "1 file". I know that is picky, picky, picky but it is the little things like this that take the shine off of something.  :)   Maybe test for file count and display "1 file" or "2 files"; the easier way would be to simply state "One or more files ....... ".




Title: Re: Attachment Integrity Check does not functon properly
Post by: emanuele on March 25, 2014, 04:17:44 pm
Two changes in sources/admin/ManageAttachments.controller.php:
Code: (find) [Select]
							elseif ($file != 'index.php')
Code: (replace with) [Select]
							elseif ($file != 'index.php' && !is_dir($attach_dir . '/' . $file))

Then, just after:
Code: (find) [Select]
		$context['completed'] = $fix_errors ? true : false;
add:
Code: (add) [Select]
		$context['errors_found'] = false;

ETA: I'm not 100% sure this will fix your issue, though it fixed mine... lol
Title: Re: Attachment Integrity Check does not functon properly
Post by: AaronB on March 25, 2014, 09:31:10 pm
:)  100% it fixed the problem on mine also.

Thanks!
Title: Re: Attachment Integrity Check does not functon properly
Post by: emanuele on March 26, 2014, 03:42:12 pm
https://github.com/emanuele45/Dialogo/commit/a47b1fd9c4c4da256ad161aa01a377e4cd6698d1