Attachments seem to be uploaded as
TWikiContributor. Nobody knows
who this is besides the
TWikiContributors themselves. Whatever
AutoAttaching
is ment to be: if there
is the information about who has uploaded a file
it must not drop this information. Only if a file is found in the pub area of
a topic
out of a sudden dummy info is needed. Better leave the attachment
owner empty or use some other tag than
TWikiContributor.
--
Thanks for the feedback - that's why we test!
I will get to it this evening but in case you need it urgently:
This and
Item451's behaviour are set by TWiki::Store::_findAttachments, lines 360-366.
The default user is set by TWiki::RcsFile::_constructAttributesForAutoAttached, around line 964
MC
I committed r6539 last night, that closed
Item451 but reveals a hole. Looking into that now.
MC
AutoAttachments now logs found entries against
UnknownUser and reports the correct user. Please test.
r6607
Side Notes - may be moved to a new topic.
I do know the code is called too aggressively - will do disk access for any topic referenced, not just the one in view.
- e.g. if you put a SEARCH on a page it will, when aggregating the page, check for attachments on all of the search hits. Arguably this is correct but is it desirable?
Further, changing properties causes autoattachments to be cached into Metadata: does this really matter though given that obsolete meta data is ignored? I've added a field autoattached, =1 when the attachment was found. Perhaps we ought filter this out whenever it is noticed?
Will clean up - many comments. Debug log should now be clean.
Tests need adjusting as I changed parameters on a sub.
r6607
Also would be good to be able to enable it on a per-web basis.
Something like {AutomaticAttachments}{WebName}{Enabled} = 1
Thoughts?
AFAICT this is now longer an issue for Dakar, so I'm closing it. Any bugs will result in a new report. please move speculative disucssion to Codev.
CC