At the moment we don't enforce uniqueness we need too.

Comments

kylebrowning’s picture

Assigned: marcingy » kylebrowning

Ill fix this.

kylebrowning’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

attached is the patch.

marcingy’s picture

Status: Needs review » Needs work

Can we pass this through t()

  form_set_error('domain', 'Domain "'. $values['domain'] . '" already exists.');

Plus why not do this

$domain = $form_state['values']['domain'];

kylebrowning’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB

Re-rolled patch with changes suggested in #3

marcingy’s picture

Status: Needs work » Needs review

The t() call should utilse string replacement placeholders rather than concatenating the value directly.

t('Domain @domain already exists.', array('@domain' => $domain));
marcingy’s picture

Status: Needs review » Needs work
kylebrowning’s picture

Status: Needs review » Needs work
StatusFileSize
new1.12 KB

Re-rolled patch according to #5

kylebrowning’s picture

Status: Needs work » Needs review

Setting to needs review for simpletest

kylebrowning’s picture

StatusFileSize
new1.12 KB

Updated patch for mistake.

marcingy’s picture

form_set_error('domain', t('Domain @domain already exists.', array('@domain', $domain)));

should be

form_set_error('domain', t('Domain @domain already exists.', array('@domain' => $domain)));

Then I think this is good to go.

Kyle thanks for tackling this.

kylebrowning’s picture

Woops sorry was trying to finish it before gorillaz ill
Fix it tomorrow

kylebrowning’s picture

StatusFileSize
new1.12 KB

ok, here we go.

marcingy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

kylebrowning’s picture

Status: Reviewed & tested by the community » Fixed

This has been fixed and commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.