@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Check that Phurl alias is unique

Summary: Ref T8992, Phurl aliases must be unique. Otherwise throw an error.

Test Plan: Create two Phurl's both with alias 'asdf'. When saving second Phurl, form should show an error about the duplicate alias.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14401

+14
+14
src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
··· 248 248 return $body; 249 249 } 250 250 251 + protected function didCatchDuplicateKeyException( 252 + PhabricatorLiskDAO $object, 253 + array $xactions, 254 + Exception $ex) { 255 + 256 + $errors = array(); 257 + $errors[] = new PhabricatorApplicationTransactionValidationError( 258 + PhabricatorPhurlURLTransaction::TYPE_ALIAS, 259 + pht('Duplicate'), 260 + pht('This alias is already in use.'), 261 + null); 262 + 263 + throw new PhabricatorApplicationTransactionValidationException($errors); 264 + } 251 265 252 266 }