Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15489762
D10836.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
D10836.diff
View Options
diff --git a/resources/sql/autopatches/20141107.phriction.policy.2.php b/resources/sql/autopatches/20141107.phriction.policy.2.php
--- a/resources/sql/autopatches/20141107.phriction.policy.2.php
+++ b/resources/sql/autopatches/20141107.phriction.policy.2.php
@@ -16,11 +16,16 @@
continue;
}
- // project documents get the project policy
- if (PhrictionDocument::isProjectSlug($doc->getSlug())) {
+ // If this was previously a magical project wiki page (under projects/, but
+ // not projects/ itself) we need to apply the project policies. Otherwise,
+ // apply the default policies.
+ $slug = $doc->getSlug();
+ $slug = PhabricatorSlug::normalize($slug);
+ $prefix = 'projects/';
+ if (($slug != $prefix) && (strncmp($slug, $prefix, strlen($prefix)) === 0)) {
+ $parts = explode('/', $slug);
+ $project_slug = $parts[1].'/';
- $project_slug =
- PhrictionDocument::getProjectSlugIdentifier($doc->getSlug());
$project_slugs = array($project_slug);
$project = id(new PhabricatorProjectQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 12, 12:05 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7458508
Default Alt Text
D10836.diff (1 KB)
Attached To
Mode
D10836: Fix Phriction document migration after project magic removal
Attached
Detach File
Event Timeline
Log In to Comment