@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.

Valdiate custom field keys

Summary:
Validates the keys on page load, alerts if there is a problem.

Fixes T3432

Test Plan: Use some good and bad keys, ensure we get the error at the right time.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3432

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

authored by

Gareth Evans and committed by
epriestley
ff14d7d7 b26549b5

+13
+13
src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php
··· 174 174 break; 175 175 } 176 176 177 + $stripped_auxiliary_key = preg_replace( 178 + '/[\w\d\.\-\:]+/', '', $this->getAuxiliaryKey()); 179 + 180 + if (strlen($stripped_auxiliary_key)) { 181 + $unique_key_chars = array_unique(str_split($stripped_auxiliary_key)); 182 + $unique_key_chars = implode(" ,", $unique_key_chars); 183 + $control->setDisabled(true); 184 + $control->setCaption( 185 + "This control is not configured correctly, the key must only contain 186 + ( a-z, A-Z, 0-9, ., -, : ) but has ( {$unique_key_chars} ), so it can 187 + not be rendered, go fix your config."); 188 + } 189 + 177 190 return $control; 178 191 } 179 192