Page MenuHomePhabricator

D10836.id26006.diff
No OneTemporary

D10836.id26006.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,15 @@
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
+ $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
Tue, Mar 25, 11:36 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7722879
Default Alt Text
D10836.id26006.diff (1022 B)

Event Timeline