Page MenuHomePhabricator

D10836.diff
No OneTemporary

D10836.diff

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

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)

Event Timeline