Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php
Show All 39 Lines | foreach ($handles as $phid => $handle) { | ||||
$handle->setURI("/project/view/{$id}/"); | $handle->setURI("/project/view/{$id}/"); | ||||
} | } | ||||
} | } | ||||
public static function getProjectMonogramPatternFragment() { | public static function getProjectMonogramPatternFragment() { | ||||
// NOTE: This explicitly does not match strings which contain only | // NOTE: This explicitly does not match strings which contain only | ||||
// digits, because digit strings like "#123" are used to reference tasks at | // digits, because digit strings like "#123" are used to reference tasks at | ||||
// Facebook and are somewhat conventional in general. | // Facebook and are somewhat conventional in general. | ||||
return '[^\s.!,:;]*[^\s\d.!,:;]+[^\s.!,:;]*'; | return '[^\s.!,:;{}#]*[^\s\d.!,:;{}#]+[^\s.!,:;{}#]*'; | ||||
} | } | ||||
public function canLoadNamedObject($name) { | public function canLoadNamedObject($name) { | ||||
$fragment = self::getProjectMonogramPatternFragment(); | $fragment = self::getProjectMonogramPatternFragment(); | ||||
return preg_match('/^#'.$fragment.'$/i', $name); | return preg_match('/^#'.$fragment.'$/i', $name); | ||||
} | } | ||||
public function loadNamedObjects( | public function loadNamedObjects( | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |