diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php
index 2f180f8d44..e99fad36bb 100644
--- a/src/aphront/configuration/AphrontApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontApplicationConfiguration.php
@@ -165,9 +165,6 @@ abstract class AphrontApplicationConfiguration {
// do crazy stuff here if it wants.
$path = '/phame/live/'.$blog->getID().'/'.$path;
-
- $celerity = CelerityAPI::getStaticResourceResponse();
- $celerity->setUseFullURI(true);
}
list($controller, $uri_data) = $this->buildControllerForPath($path);
diff --git a/src/infrastructure/celerity/CelerityStaticResourceResponse.php b/src/infrastructure/celerity/CelerityStaticResourceResponse.php
index 93e1734bab..c801fb3fe2 100644
--- a/src/infrastructure/celerity/CelerityStaticResourceResponse.php
+++ b/src/infrastructure/celerity/CelerityStaticResourceResponse.php
@@ -33,7 +33,6 @@ final class CelerityStaticResourceResponse {
private $metadataBlock = 0;
private $behaviors = array();
private $hasRendered = array();
- private $useFullURI = false;
public function __construct() {
if (isset($_REQUEST['__metablock__'])) {
@@ -86,19 +85,6 @@ final class CelerityStaticResourceResponse {
return $this;
}
- /**
- * If set to true, Celerity will print full URIs (including the domain)
- * for static resources.
- */
- public function setUseFullURI($should) {
- $this->useFullURI = $should;
- return $this;
- }
-
- private function shouldUseFullURI() {
- return $this->useFullURI;
- }
-
public function renderSingleResource($symbol) {
$map = CelerityResourceMap::getInstance();
$resolved = $map->resolveResources(array($symbol));
@@ -129,31 +115,32 @@ final class CelerityStaticResourceResponse {
$output[] = $this->renderResource($resource);
}
- return implode("\n", $output);
+ return implode("\n", $output)."\n";
}
private function renderResource(array $resource) {
- $uri = $this->getURI($resource['uri']);
+ $uri = PhabricatorEnv::getCDNURI($resource['uri']);
switch ($resource['type']) {
case 'css':
- return '';
+ return phutil_render_tag(
+ 'link',
+ array(
+ 'rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => $uri,
+ ));
case 'js':
- return '';
+ return phutil_render_tag(
+ 'script',
+ array(
+ 'type' => 'text/javascript',
+ 'src' => $uri,
+ ),
+ '');
}
throw new Exception("Unable to render resource.");
}
- private function getURI($path) {
- $path = phutil_escape_html($path);
- if ($this->shouldUseFullURI()) {
- $uri = PhabricatorEnv::getCDNURI($path);
- } else {
- $uri = $path;
- }
- return $uri;
- }
-
public function renderHTMLFooter() {
$data = array();
if ($this->metadata) {