Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/celerity/controller/CelerityPhabricatorResourceController.php b/src/applications/celerity/controller/CelerityPhabricatorResourceController.php
index 2f4cd113a5..c5f878b61e 100644
--- a/src/applications/celerity/controller/CelerityPhabricatorResourceController.php
+++ b/src/applications/celerity/controller/CelerityPhabricatorResourceController.php
@@ -1,55 +1,53 @@
<?php
/**
* Delivers CSS and JS resources to the browser. This controller handles all
* `/res/` requests, and manages caching, package construction, and resource
* preprocessing.
*/
final class CelerityPhabricatorResourceController
extends CelerityResourceController {
private $path;
private $hash;
private $library;
private $postprocessorKey;
public function getCelerityResourceMap() {
return CelerityResourceMap::getNamedInstance($this->library);
}
- public function willProcessRequest(array $data) {
- $this->path = $data['path'];
- $this->hash = $data['hash'];
- $this->library = $data['library'];
- $this->postprocessorKey = idx($data, 'postprocessor');
- }
+ public function handleRequest(AphrontRequest $request) {
+ $this->path = $request->getURIData('path');
+ $this->hash = $request->getURIData('hash');
+ $this->library = $request->getURIData('library');
+ $this->postprocessorKey = $request->getURIData('postprocessor');
- public function processRequest() {
// Check that the resource library exists before trying to serve resources
// from it.
try {
$this->getCelerityResourceMap();
} catch (Exception $ex) {
return new Aphront400Response();
}
return $this->serveResource($this->path);
}
protected function buildResourceTransformer() {
$minify_on = PhabricatorEnv::getEnvConfig('celerity.minify');
$developer_on = PhabricatorEnv::getEnvConfig('phabricator.developer-mode');
$should_minify = ($minify_on && !$developer_on);
return id(new CelerityResourceTransformer())
->setMinify($should_minify)
->setPostprocessorKey($this->postprocessorKey)
->setCelerityMap($this->getCelerityResourceMap());
}
protected function getCacheKey($path) {
return parent::getCacheKey($path.';'.$this->postprocessorKey);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 24, 12:19 PM (11 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
386217
Default Alt Text
(2 KB)

Event Timeline