This question about Configuration, Missing functionality: Answered

Prohibit creating of two topics with the same name but different upper / lower case

Hello,

is it possible to define that it is forbidden to create a topic, if another topic with the same name but different upper / lower case already exists?

We use the publish plugin to create monthly backups from our wiki. If we restore this backup on Windows, we get name clashes, because Windows doesn't make a difference between upper and lower case.

Thanks

-- KlausReithmaier - 01 Aug 2014

No way that I'm aware of easily. Foswiki depends upon the file system to be "case sensitive" and "case preserving" Unfortunately windows preserves case but is not "case sensitive".

Something like this could be done by a plugin maybe in a beforeSaveHandler. You'd need to do a case-insensitive search of web and topic names for every save, and throw an error if the topic name already exists with a different case.

You could look at the ApprovalPlugin for an example of preventing a save. It implements a beforeSaveHandler and beforeAttachmentSaveHandler. It doesn't check for duplicate names, it shows the concept of rejecting save events.

http://trac.foswiki.org/browser/trunk/ApprovalPlugin/lib/Foswiki/Plugins/ApprovalPlugin.pm

-- GeorgeClark - 01 Aug 2014
 

QuestionForm edit

Subject Configuration, Missing functionality
Extension
Version Foswiki 1.1.9
Status Answered
Related Topics
Topic revision: r2 - 01 Aug 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy