Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15309035
D19876.id47464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D19876.id47464.diff
View Options
diff --git a/resources/sql/patches/20130219.commitsummarymig.php b/resources/sql/patches/20130219.commitsummarymig.php
--- a/resources/sql/patches/20130219.commitsummarymig.php
+++ b/resources/sql/patches/20130219.commitsummarymig.php
@@ -12,9 +12,9 @@
continue;
}
- $data = $commit->loadOneRelative(
- new PhabricatorRepositoryCommitData(),
- 'commitID');
+ $data = id(new PhabricatorRepositoryCommitData())->loadOneWhere(
+ 'commitID = %d',
+ $commit->getID());
if (!$data) {
continue;
diff --git a/resources/sql/patches/20130409.commitdrev.php b/resources/sql/patches/20130409.commitdrev.php
--- a/resources/sql/patches/20130409.commitdrev.php
+++ b/resources/sql/patches/20130409.commitdrev.php
@@ -8,7 +8,9 @@
$edges = 0;
foreach (new LiskMigrationIterator($commit_table) as $commit) {
- $data = $commit->loadOneRelative($data_table, 'commitID');
+ $data = $data_table->loadOneWhere(
+ 'commitID = %d',
+ $commit->getID());
if (!$data) {
continue;
}
diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php
--- a/src/applications/people/storage/PhabricatorUser.php
+++ b/src/applications/people/storage/PhabricatorUser.php
@@ -458,14 +458,9 @@
}
public function loadPrimaryEmail() {
- $email = new PhabricatorUserEmail();
- $conn = $email->establishConnection('r');
-
- return $this->loadOneRelative(
- $email,
- 'userPHID',
- 'getPHID',
- qsprintf($conn, '(isPrimary = 1)'));
+ return id(new PhabricatorUserEmail())->loadOneWhere(
+ 'userPHID = %s AND isPrimary = 1',
+ $this->getPHID());
}
diff --git a/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
@@ -37,10 +37,9 @@
foreach ($branches as $branch) {
$full_branch_name = $branch->getName();
- $cut_point_commit = $branch->loadOneRelative(
- id(new PhabricatorRepositoryCommit()),
- 'phid',
- 'getCutPointCommitPHID');
+ $cut_point_commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
+ 'phid = %s',
+ $branch->getCutPointCommitPHID());
$results[] = array(
'project' => $project->getName(),
diff --git a/src/applications/releeph/storage/ReleephRequest.php b/src/applications/releeph/storage/ReleephRequest.php
--- a/src/applications/releeph/storage/ReleephRequest.php
+++ b/src/applications/releeph/storage/ReleephRequest.php
@@ -257,18 +257,17 @@
/* -( Loading external objects )------------------------------------------- */
public function loadPhabricatorRepositoryCommit() {
- return $this->loadOneRelative(
- new PhabricatorRepositoryCommit(),
- 'phid',
- 'getRequestCommitPHID');
+ return id(new PhabricatorRepositoryCommit())->loadOneWhere(
+ 'phid = %s',
+ $this->getRequestCommitPHID());
}
public function loadPhabricatorRepositoryCommitData() {
$commit = $this->loadPhabricatorRepositoryCommit();
if ($commit) {
- return $commit->loadOneRelative(
- new PhabricatorRepositoryCommitData(),
- 'commitID');
+ return id(new PhabricatorRepositoryCommitData())->loadOneWhere(
+ 'commitID = %d',
+ $commit->getID());
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 6:50 AM (4 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7324949
Default Alt Text
D19876.id47464.diff (3 KB)
Attached To
Mode
D19876: Remove application callsites to "LiskDAO->loadOneRelative()"
Attached
Detach File
Event Timeline
Log In to Comment