mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-20 10:48:40 +01:00
Phriction - improve workflow for when user entered slug needs to be normalized.
Summary: Encountered this playing with T8402 on my test instance. I think warning the user about adding a trailing "/" is unnecessary so don't do it. I think its confusing to not call out spaces / to lump them in with special characters so call out the sapces. Test Plan: moved a page around and verified no warning if the slug is missing a "/" as user specified and that a change to spaces is called out Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13316
This commit is contained in:
parent
ca8adac1eb
commit
db9fc369ca
1 changed files with 3 additions and 2 deletions
|
@ -36,13 +36,14 @@ final class PhrictionMoveController extends PhrictionController {
|
|||
// about it.
|
||||
if (strlen($v_slug)) {
|
||||
$normal_slug = PhabricatorSlug::normalize($v_slug);
|
||||
if ($normal_slug !== $v_slug) {
|
||||
$no_slash_slug = rtrim($normal_slug, '/');
|
||||
if ($normal_slug !== $v_slug && $no_slash_slug !== $v_slug) {
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Adjust Path'))
|
||||
->appendParagraph(
|
||||
pht(
|
||||
'The path you entered (%s) is not a valid wiki document '.
|
||||
'path. Paths may not contain special characters.',
|
||||
'path. Paths may not contain spaces or special characters.',
|
||||
phutil_tag('strong', array(), $v_slug)))
|
||||
->appendParagraph(
|
||||
pht(
|
||||
|
|
Loading…
Add table
Reference in a new issue