Page MenuHomePhabricator

D10818.diff
No OneTemporary

D10818.diff

diff --git a/src/applications/phriction/query/PhrictionDocumentQuery.php b/src/applications/phriction/query/PhrictionDocumentQuery.php
--- a/src/applications/phriction/query/PhrictionDocumentQuery.php
+++ b/src/applications/phriction/query/PhrictionDocumentQuery.php
@@ -155,38 +155,6 @@
}
}
- foreach ($documents as $document) {
- $document->attachProject(null);
- }
-
- $project_slugs = array();
- foreach ($documents as $key => $document) {
- $slug = $document->getSlug();
- if (!PhrictionDocument::isProjectSlug($slug)) {
- continue;
- }
- $project_slugs[$key] = PhrictionDocument::getProjectSlugIdentifier($slug);
- }
-
- if ($project_slugs) {
- $projects = id(new PhabricatorProjectQuery())
- ->setViewer($this->getViewer())
- ->withPhrictionSlugs($project_slugs)
- ->execute();
- $projects = mpull($projects, null, 'getPhrictionSlug');
- foreach ($documents as $key => $document) {
- $slug = idx($project_slugs, $key);
- if ($slug) {
- $project = idx($projects, $slug);
- if (!$project) {
- unset($documents[$key]);
- continue;
- }
- $document->attachProject($project);
- }
- }
- }
-
return $documents;
}
diff --git a/src/applications/phriction/query/PhrictionSearchEngine.php b/src/applications/phriction/query/PhrictionSearchEngine.php
--- a/src/applications/phriction/query/PhrictionSearchEngine.php
+++ b/src/applications/phriction/query/PhrictionSearchEngine.php
@@ -121,9 +121,6 @@
$phids = array();
foreach ($documents as $document) {
$content = $document->getContent();
- if ($document->hasProject()) {
- $phids[] = $document->getProject()->getPHID();
- }
$phids[] = $content->getAuthorPHID();
}
@@ -161,11 +158,6 @@
->addByline($byline)
->addIcon('none', $updated);
- if ($document->hasProject()) {
- $item->addAttribute(
- $handles[$document->getProject()->getPHID()]->renderLink());
- }
-
$item->addAttribute($slug_uri);
switch ($document->getStatus()) {
diff --git a/src/applications/phriction/storage/PhrictionDocument.php b/src/applications/phriction/storage/PhrictionDocument.php
--- a/src/applications/phriction/storage/PhrictionDocument.php
+++ b/src/applications/phriction/storage/PhrictionDocument.php
@@ -18,7 +18,6 @@
private $contentObject = self::ATTACHABLE;
private $ancestors = array();
- private $project = self::ATTACHABLE;
public function getConfiguration() {
return array(
@@ -132,19 +131,6 @@
return $this->assertAttached($this->contentObject);
}
- public function getProject() {
- return $this->assertAttached($this->project);
- }
-
- public function attachProject(PhabricatorProject $project = null) {
- $this->project = $project;
- return $this;
- }
-
- public function hasProject() {
- return (bool)$this->getProject();
- }
-
public function getAncestors() {
return $this->ancestors;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 5, 1:58 AM (3 h, 55 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7091144
Default Alt Text
D10818.diff (3 KB)

Event Timeline