Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14031688
D15571.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
25 KB
Referenced Files
None
Subscribers
None
D15571.id.diff
View Options
diff --git a/src/applications/phragment/controller/PhragmentBrowseController.php b/src/applications/phragment/controller/PhragmentBrowseController.php
--- a/src/applications/phragment/controller/PhragmentBrowseController.php
+++ b/src/applications/phragment/controller/PhragmentBrowseController.php
@@ -2,21 +2,15 @@
final class PhragmentBrowseController extends PhragmentController {
- private $dblob;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -83,16 +77,19 @@
$list->addItem($item);
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $current_box,
- $list,
- ),
- array(
- 'title' => pht('Browse Fragments'),
- ));
+ $title = pht('Browse Fragments');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $current_box,
+ $list,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentCreateController.php b/src/applications/phragment/controller/PhragmentCreateController.php
--- a/src/applications/phragment/controller/PhragmentCreateController.php
+++ b/src/applications/phragment/controller/PhragmentCreateController.php
@@ -2,18 +2,12 @@
final class PhragmentCreateController extends PhragmentController {
- private $dblob;
-
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
$parent = null;
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -124,15 +118,18 @@
$box->setInfoView($error_view);
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- ),
- array(
- 'title' => pht('Create Fragment'),
- ));
+ $title = pht('Create Fragments');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentHistoryController.php b/src/applications/phragment/controller/PhragmentHistoryController.php
--- a/src/applications/phragment/controller/PhragmentHistoryController.php
+++ b/src/applications/phragment/controller/PhragmentHistoryController.php
@@ -2,21 +2,15 @@
final class PhragmentHistoryController extends PhragmentController {
- private $dblob;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -97,16 +91,19 @@
$first = false;
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $current_box,
- $list,
- ),
- array(
- 'title' => pht('Fragment History'),
- ));
+ $title = pht('Fragment History');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $current_box,
+ $list,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentPatchController.php b/src/applications/phragment/controller/PhragmentPatchController.php
--- a/src/applications/phragment/controller/PhragmentPatchController.php
+++ b/src/applications/phragment/controller/PhragmentPatchController.php
@@ -2,28 +2,21 @@
final class PhragmentPatchController extends PhragmentController {
- private $aid;
- private $bid;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->aid = idx($data, 'aid', 0);
- $this->bid = idx($data, 'bid', 0);
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $aid = $request->getURIData('aid');
+ $bid = $request->getURIData('bid');
// If "aid" is "x", then it means the user wants to generate
// a patch of an empty file to the version specified by "bid".
- $ids = array($this->aid, $this->bid);
- if ($this->aid === 'x') {
- $ids = array($this->bid);
+ $ids = array($aid, $bid);
+ if ($aid === 'x') {
+ $ids = array($bid);
}
$versions = id(new PhragmentFragmentVersionQuery())
@@ -32,14 +25,14 @@
->execute();
$version_a = null;
- if ($this->aid !== 'x') {
- $version_a = idx($versions, $this->aid, null);
+ if ($aid !== 'x') {
+ $version_a = idx($versions, $aid, null);
if ($version_a === null) {
return new Aphront404Response();
}
}
- $version_b = idx($versions, $this->bid, null);
+ $version_b = idx($versions, $bid, null);
if ($version_b === null) {
return new Aphront404Response();
}
diff --git a/src/applications/phragment/controller/PhragmentPolicyController.php b/src/applications/phragment/controller/PhragmentPolicyController.php
--- a/src/applications/phragment/controller/PhragmentPolicyController.php
+++ b/src/applications/phragment/controller/PhragmentPolicyController.php
@@ -2,17 +2,11 @@
final class PhragmentPolicyController extends PhragmentController {
- private $dblob;
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
-
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -95,15 +89,18 @@
->setValidationException(null)
->setForm($form);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- ),
- array(
- 'title' => pht('Edit Fragment Policies'),
- ));
+ $title = pht('Edit Fragment Policies');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentRevertController.php b/src/applications/phragment/controller/PhragmentRevertController.php
--- a/src/applications/phragment/controller/PhragmentRevertController.php
+++ b/src/applications/phragment/controller/PhragmentRevertController.php
@@ -2,21 +2,14 @@
final class PhragmentRevertController extends PhragmentController {
- private $dblob;
- private $id;
-
- public function willProcessRequest(array $data) {
- $this->dblob = $data['dblob'];
- $this->id = $data['id'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('id');
+ $dblob = $request->getURIData('dblob');
$fragment = id(new PhragmentFragmentQuery())
->setViewer($viewer)
- ->withPaths(array($this->dblob))
+ ->withPaths(array($dblob))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
@@ -30,7 +23,7 @@
$version = id(new PhragmentFragmentVersionQuery())
->setViewer($viewer)
->withFragmentPHIDs(array($fragment->getPHID()))
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->executeOne();
if ($version === null) {
return new Aphront404Response();
@@ -58,7 +51,7 @@
}
return id(new AphrontRedirectResponse())
- ->setURI($this->getApplicationURI('/history/'.$this->dblob));
+ ->setURI($this->getApplicationURI('/history/'.$dblob));
}
return $this->createDialog($fragment, $version);
@@ -68,12 +61,11 @@
PhragmentFragment $fragment,
PhragmentFragmentVersion $version) {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ $viewer = $this->getViewer();
$dialog = id(new AphrontDialogView())
->setTitle(pht('Really revert this fragment?'))
- ->setUser($request->getUser())
+ ->setUser($this->getViewer())
->addSubmitButton(pht('Revert'))
->addCancelButton(pht('Cancel'))
->appendParagraph(pht(
diff --git a/src/applications/phragment/controller/PhragmentSnapshotCreateController.php b/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
--- a/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
+++ b/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
@@ -2,17 +2,11 @@
final class PhragmentSnapshotCreateController extends PhragmentController {
- private $dblob;
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
-
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -159,15 +153,18 @@
->setFormErrors($errors)
->setForm($form);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- ),
- array(
- 'title' => pht('Create Fragment'),
- ));
+ $title = pht('Create Snapshot');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentSnapshotDeleteController.php b/src/applications/phragment/controller/PhragmentSnapshotDeleteController.php
--- a/src/applications/phragment/controller/PhragmentSnapshotDeleteController.php
+++ b/src/applications/phragment/controller/PhragmentSnapshotDeleteController.php
@@ -2,15 +2,9 @@
final class PhragmentSnapshotDeleteController extends PhragmentController {
- private $id;
-
- public function willProcessRequest(array $data) {
- $this->id = $data['id'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('id');
$snapshot = id(new PhragmentSnapshotQuery())
->setViewer($viewer)
@@ -18,7 +12,7 @@
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->executeOne();
if ($snapshot === null) {
return new Aphront404Response();
@@ -37,12 +31,11 @@
}
public function createDialog() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ $viewer = $this->getViewer();
$dialog = id(new AphrontDialogView())
->setTitle(pht('Really delete this snapshot?'))
- ->setUser($request->getUser())
+ ->setUser($this->getViewer())
->addSubmitButton(pht('Delete'))
->addCancelButton(pht('Cancel'))
->appendParagraph(pht(
diff --git a/src/applications/phragment/controller/PhragmentSnapshotPromoteController.php b/src/applications/phragment/controller/PhragmentSnapshotPromoteController.php
--- a/src/applications/phragment/controller/PhragmentSnapshotPromoteController.php
+++ b/src/applications/phragment/controller/PhragmentSnapshotPromoteController.php
@@ -2,32 +2,26 @@
final class PhragmentSnapshotPromoteController extends PhragmentController {
- private $dblob;
- private $id;
private $targetSnapshot;
private $targetFragment;
private $snapshots;
private $options;
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', null);
- $this->id = idx($data, 'id', null);
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('id');
+ $dblob = $request->getURIData('dblob');
// When the user is promoting a snapshot to the latest version, the
// identifier is a fragment path.
- if ($this->dblob !== null) {
+ if ($dblob !== null) {
$this->targetFragment = id(new PhragmentFragmentQuery())
->setViewer($viewer)
->requireCapabilities(array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
- ->withPaths(array($this->dblob))
+ ->withPaths(array($dblob))
->executeOne();
if ($this->targetFragment === null) {
return new Aphront404Response();
@@ -41,14 +35,14 @@
// When the user is promoting a snapshot to another snapshot, the
// identifier is another snapshot ID.
- if ($this->id !== null) {
+ if ($id !== null) {
$this->targetSnapshot = id(new PhragmentSnapshotQuery())
->setViewer($viewer)
->requireCapabilities(array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->executeOne();
if ($this->targetSnapshot === null) {
return new Aphront404Response();
@@ -72,8 +66,8 @@
$this->snapshots,
'getName',
'getID');
- if ($this->id !== null) {
- unset($this->options[$this->id]);
+ if ($id !== null) {
+ unset($this->options[$id]);
}
// If there's no options, show a dialog telling the
@@ -84,7 +78,7 @@
->setTitle(pht('No snapshots to promote'))
->appendParagraph(pht(
'There are no snapshots available to promote.'))
- ->setUser($request->getUser())
+ ->setUser($this->getViewer())
->addCancelButton(pht('Cancel')));
}
@@ -108,7 +102,7 @@
$child->delete();
}
- if ($this->id === null) {
+ if ($id === null) {
// The user is promoting the snapshot to the latest version.
$children = id(new PhragmentFragmentQuery())
->setViewer($viewer)
@@ -150,7 +144,7 @@
}
$snapshot->saveTransaction();
- if ($this->id === null) {
+ if ($id === null) {
return id(new AphrontRedirectResponse())
->setURI($this->targetFragment->getURI());
} else {
@@ -159,20 +153,19 @@
}
}
- return $this->createDialog();
+ return $this->createDialog($id);
}
- public function createDialog() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function createDialog($id) {
+ $viewer = $this->getViewer();
$dialog = id(new AphrontDialogView())
->setTitle(pht('Promote which snapshot?'))
- ->setUser($request->getUser())
+ ->setUser($this->getViewer())
->addSubmitButton(pht('Promote'))
->addCancelButton(pht('Cancel'));
- if ($this->id === null) {
+ if ($id === null) {
// The user is promoting a snapshot to the latest version.
$dialog->appendParagraph(pht(
'Select the snapshot you want to promote to the latest version:'));
diff --git a/src/applications/phragment/controller/PhragmentSnapshotViewController.php b/src/applications/phragment/controller/PhragmentSnapshotViewController.php
--- a/src/applications/phragment/controller/PhragmentSnapshotViewController.php
+++ b/src/applications/phragment/controller/PhragmentSnapshotViewController.php
@@ -2,23 +2,17 @@
final class PhragmentSnapshotViewController extends PhragmentController {
- private $id;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->id = idx($data, 'id', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('id');
$snapshot = id(new PhragmentSnapshotQuery())
->setViewer($viewer)
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->executeOne();
if ($snapshot === null) {
return new Aphront404Response();
@@ -71,16 +65,18 @@
$list->addItem($item);
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- $list,
- ),
- array(
- 'title' => pht('View Snapshot'),
- ));
+ $title = pht('View Snapshot');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ $list,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
}
protected function createSnapshotView($snapshot) {
diff --git a/src/applications/phragment/controller/PhragmentUpdateController.php b/src/applications/phragment/controller/PhragmentUpdateController.php
--- a/src/applications/phragment/controller/PhragmentUpdateController.php
+++ b/src/applications/phragment/controller/PhragmentUpdateController.php
@@ -2,17 +2,11 @@
final class PhragmentUpdateController extends PhragmentController {
- private $dblob;
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
-
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
@@ -69,15 +63,18 @@
->setValidationException(null)
->setForm($form);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- ),
- array(
- 'title' => pht('Update Fragment'),
- ));
+ $title = pht('Update Fragment');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/phragment/controller/PhragmentVersionController.php b/src/applications/phragment/controller/PhragmentVersionController.php
--- a/src/applications/phragment/controller/PhragmentVersionController.php
+++ b/src/applications/phragment/controller/PhragmentVersionController.php
@@ -2,23 +2,17 @@
final class PhragmentVersionController extends PhragmentController {
- private $id;
-
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->id = idx($data, 'id', 0);
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $id = $request->getURIData('id');
$version = id(new PhragmentFragmentVersionQuery())
->setViewer($viewer)
- ->withIDs(array($this->id))
+ ->withIDs(array($id))
->executeOne();
if ($version === null) {
return new Aphront404Response();
@@ -71,23 +65,23 @@
->setHeader($header)
->addPropertyList($properties);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $this->renderConfigurationWarningIfRequired(),
- $box,
- $this->renderPreviousVersionList($version),
- ),
- array(
- 'title' => pht('View Version'),
- ));
+ $title = pht('View Version');
+
+ $view = array(
+ $this->renderConfigurationWarningIfRequired(),
+ $box,
+ $this->renderPreviousVersionList($version),
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
}
private function renderPreviousVersionList(
PhragmentFragmentVersion $version) {
-
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ $viewer = $this->getViewer();
$previous_versions = id(new PhragmentFragmentVersionQuery())
->setViewer($viewer)
diff --git a/src/applications/phragment/controller/PhragmentZIPController.php b/src/applications/phragment/controller/PhragmentZIPController.php
--- a/src/applications/phragment/controller/PhragmentZIPController.php
+++ b/src/applications/phragment/controller/PhragmentZIPController.php
@@ -2,35 +2,28 @@
final class PhragmentZIPController extends PhragmentController {
- private $dblob;
- private $snapshot;
-
private $snapshotCache;
public function shouldAllowPublic() {
return true;
}
- public function willProcessRequest(array $data) {
- $this->dblob = idx($data, 'dblob', '');
- $this->snapshot = idx($data, 'snapshot', null);
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $dblob = $request->getURIData('dblob');
+ $snapshot = $request->getURIData('snapshot');
- $parents = $this->loadParentFragments($this->dblob);
+ $parents = $this->loadParentFragments($dblob);
if ($parents === null) {
return new Aphront404Response();
}
$fragment = idx($parents, count($parents) - 1, null);
- if ($this->snapshot !== null) {
+ if ($snapshot !== null) {
$snapshot = id(new PhragmentSnapshotQuery())
->setViewer($viewer)
->withPrimaryFragmentPHIDs(array($fragment->getPHID()))
- ->withNames(array($this->snapshot))
+ ->withNames(array($snapshot))
->executeOne();
if ($snapshot === null) {
return new Aphront404Response();
@@ -63,7 +56,7 @@
$dialog->setTitle(pht('ZIP Extension Not Installed'));
$dialog->appendParagraph($inst);
- $dialog->addCancelButton('/phragment/browse/'.$this->dblob);
+ $dialog->addCancelButton('/phragment/browse/'.$dblob);
return id(new AphrontDialogResponse())->setDialog($dialog);
}
@@ -71,7 +64,8 @@
throw new Exception(pht('Unable to create ZIP archive!'));
}
- $mappings = $this->getFragmentMappings($fragment, $fragment->getPath());
+ $mappings = $this->getFragmentMappings(
+ $fragment, $fragment->getPath(), $snapshot);
$phids = array();
foreach ($mappings as $path => $file_phid) {
@@ -130,14 +124,17 @@
/**
* Returns a list of mappings like array('some/path.txt' => 'file PHID');
*/
- private function getFragmentMappings(PhragmentFragment $current, $base_path) {
+ private function getFragmentMappings(
+ PhragmentFragment $current,
+ $base_path,
+ $snapshot) {
$mappings = $current->getFragmentMappings(
$this->getRequest()->getUser(),
$base_path);
$result = array();
foreach ($mappings as $path => $fragment) {
- $version = $this->getVersion($fragment);
+ $version = $this->getVersion($fragment, $snapshot);
if ($version !== null) {
$result[$path] = $version->getFilePHID();
}
@@ -145,8 +142,8 @@
return $result;
}
- private function getVersion($fragment) {
- if ($this->snapshot === null) {
+ private function getVersion($fragment, $snapshot) {
+ if ($snapshot === null) {
return $fragment->getLatestVersion();
} else {
return idx($this->snapshotCache, $fragment->getPHID(), null);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 11:44 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6746903
Default Alt Text
D15571.id.diff (25 KB)
Attached To
Mode
D15571: Moderize Phragment
Attached
Detach File
Event Timeline
Log In to Comment