Quote:
Originally Posted by reitube
Hi Andrew,
LDM (2.2.5) works fine, but when I use the "allow_duplicates"-option with "no", it seems to have no effect. The users get the option "New entry even if it exits". And some of them use it with "yes".
Is there any chance to prevent duplicates effectively? Or did I miss another option?
Thanx
Regards
|
For the time being, you can fix this by editing the links_addnewlink template. Find the sequence that reads:
Code:
<if condition="$links_defaults['allow_duplicates']">
<input type="radio" name="linkdups" value="1" checked="checked" /> $vbphrase[ll_yes]
<input type="radio" name="linkdups" value="-1" /> $vbphrase[ll_no]
<else />
<input type="radio" name="linkdups" value="1" /> $vbphrase[ll_yes]
<input type="radio" name="linkdups" value="-1" checked="checked" /> $vbphrase[ll_no]
</if>
and replace it by the following
Code:
<if condition="$links_defaults['allow_duplicates']">
<input type="radio" name="linkdups" value="1" checked="checked" /> $vbphrase[ll_yes]
<input type="radio" name="linkdups" value="-1" /> $vbphrase[ll_no]
<else />
<if condition="$links_permissions['can_set_permissions']">
<input type="radio" name="linkdups" value="1" /> $vbphrase[ll_yes]
<input type="radio" name="linkdups" value="-1" checked="checked" /> $vbphrase[ll_no]
<else />
<input type="hidden" name="linkdups" value="-1" /> $vbphrase[ll_no]
</if>
</if>
This will effectively stop anybody who does not have LDM's can_set_permissions priv from adding a duplicate entry when allow_duplicates is off.
The error message they get when they try is not great, and I will correct this in the next release.