Page MenuHomePhabricator

D10294.id24789.diff
No OneTemporary

D10294.id24789.diff

diff --git a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
--- a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
+++ b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php
@@ -246,6 +246,7 @@
case 'exec':
$info = $row['command'];
break;
+ case 's3':
case 'conduit':
$info = $row['method'];
break;
diff --git a/src/applications/files/engine/PhabricatorS3FileStorageEngine.php b/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
--- a/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
+++ b/src/applications/files/engine/PhabricatorS3FileStorageEngine.php
@@ -40,11 +40,18 @@
$name = 'phabricator/'.implode('/', $parts);
AphrontWriteGuard::willWrite();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'putObject',
+ ));
$s3->putObject(
$data,
$this->getBucketName(),
$name,
$acl = 'private');
+ $profiler->endServiceCall($call_id, array());
return $name;
}
@@ -54,9 +61,17 @@
* Load a stored blob from Amazon S3.
*/
public function readFile($handle) {
- $result = $this->newS3API()->getObject(
+ $s3 = $this->newS3API();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'getObject',
+ ));
+ $result = $s3->getObject(
$this->getBucketName(),
$handle);
+ $profiler->endServiceCall($call_id, array());
// NOTE: The implementation of the API that we're using may respond with
// a successful result that has length 0 and no body property.
@@ -73,9 +88,17 @@
*/
public function deleteFile($handle) {
AphrontWriteGuard::willWrite();
- $this->newS3API()->deleteObject(
+ $s3 = $this->newS3API();
+ $profiler = PhutilServiceProfiler::getInstance();
+ $call_id = $profiler->beginServiceCall(
+ array(
+ 'type' => 's3',
+ 'method' => 'deleteObject',
+ ));
+ $s3->deleteObject(
$this->getBucketName(),
$handle);
+ $profiler->endServiceCall($call_id, array());
}
diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
--- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php
+++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
@@ -27,7 +27,7 @@
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
$query = id(new PhabricatorPasteQuery())
- ->needRawContent(true)
+ ->needContent(true)
->withAuthorPHIDs($saved->getParameter('authorPHIDs', array()))
->withLanguages($saved->getParameter('languages', array()));
@@ -149,7 +149,7 @@
$created = phabricator_date($paste->getDateCreated(), $viewer);
$author = $handles[$paste->getAuthorPHID()]->renderLink();
- $lines = phutil_split_lines($paste->getRawContent());
+ $lines = phutil_split_lines($paste->getContent());
$preview = id(new PhabricatorSourceCodeView())
->setLimit(5)

File Metadata

Mime Type
text/plain
Expires
Sat, May 25, 11:13 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6287400
Default Alt Text
D10294.id24789.diff (3 KB)

Event Timeline