Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17942314
D7527.id16974.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7527.id16974.diff
View Options
Index: src/applications/phriction/controller/PhrictionNewController.php
===================================================================
--- src/applications/phriction/controller/PhrictionNewController.php
+++ src/applications/phriction/controller/PhrictionNewController.php
@@ -33,7 +33,11 @@
->addSubmitButton(pht('Edit Document'));
return id(new AphrontDialogResponse())->setDialog($dialog);
- } elseif (substr($slug, 0, 9) == 'projects/') {
+ } else if (PhrictionDocument::isProjectSlug($slug)) {
+ $project = id(new PhabricatorProject())->loadOneWhere(
+ 'phrictionSlug = %s',
+ PhrictionDocument::getProjectSlugIdentifier($slug));
+ if (!$project) {
$dialog = new AphrontDialogView();
$dialog->setSubmitURI('/w/')
->setTitle(pht('Oops!'))
@@ -44,12 +48,12 @@
Create a new project with this name first.'))
->addCancelButton('/w/', 'Okay');
return id(new AphrontDialogResponse())->setDialog($dialog);
-
- } else {
- $uri = '/phriction/edit/?slug='.$slug;
- return id(new AphrontRedirectResponse())
- ->setURI($uri);
+ }
}
+
+ $uri = '/phriction/edit/?slug='.$slug;
+ return id(new AphrontRedirectResponse())
+ ->setURI($uri);
}
if ($slug == '/') {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 1 2025, 6:38 AM (5 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8788815
Default Alt Text
D7527.id16974.diff (1 KB)
Attached To
Mode
D7527: Phriction - make the check for project sub pages more fine-grained
Attached
Detach File
Event Timeline
Log In to Comment