Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2992423
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/fact/controller/PhabricatorFactChartController.php b/src/applications/fact/controller/PhabricatorFactChartController.php
index 4004f6f27c..c22ec2d129 100644
--- a/src/applications/fact/controller/PhabricatorFactChartController.php
+++ b/src/applications/fact/controller/PhabricatorFactChartController.php
@@ -1,69 +1,73 @@
<?php
final class PhabricatorFactChartController
extends PhabricatorFactController {
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$chart_key = $request->getURIData('chartKey');
if (!$chart_key) {
return new Aphront404Response();
}
$engine = id(new PhabricatorChartRenderingEngine())
->setViewer($viewer);
$chart = $engine->loadChart($chart_key);
if (!$chart) {
return new Aphront404Response();
}
// When drawing a chart, we send down a placeholder piece of HTML first,
// then fetch the data via async request. Determine if we're drawing
// the structure or actually pulling the data.
$mode = $request->getURIData('mode');
$is_draw_mode = ($mode === 'draw');
$want_data = $is_draw_mode;
// In developer mode, always pull the data in the main request. We'll
// throw it away if we're just drawing the chart frame, but this currently
// makes errors quite a bit easier to debug.
if (PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) {
$want_data = true;
}
if ($want_data) {
$chart_data = $engine->newChartData();
if ($is_draw_mode) {
return id(new AphrontAjaxResponse())->setContent($chart_data);
}
}
$chart_view = $engine->newChartView();
return $this->newChartResponse($chart_view);
}
private function newChartResponse($chart_view) {
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Chart'))
->appendChild($chart_view);
$crumbs = $this->buildApplicationCrumbs()
->addTextCrumb(pht('Chart'))
->setBorder(true);
$title = pht('Chart');
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild(
array(
$box,
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 09:34 (1 d, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1181247
Default Alt Text
(2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment