Page MenuHomePhabricator

D8162.diff
No OneTemporary

D8162.diff

Index: resources/sql/patches/20131118.ownerorder.php
===================================================================
--- resources/sql/patches/20131118.ownerorder.php
+++ resources/sql/patches/20131118.ownerorder.php
@@ -3,6 +3,9 @@
$table = new ManiphestTask();
$conn_w = $table->establishConnection('w');
+$user_table = new PhabricatorUser();
+$user_conn = $user_table->establishConnection('r');
+
foreach (new LiskMigrationIterator($table) as $task) {
$id = $task->getID();
@@ -14,13 +17,14 @@
continue;
}
- $owner_handle = id(new PhabricatorHandleQuery())
- ->setViewer(PhabricatorUser::getOmnipotentUser())
- ->withPHIDs(array($owner_phid))
- ->executeOne();
+ $owner_row = queryfx_one(
+ $user_conn,
+ 'SELECT * FROM %T WHERE phid = %s',
+ $user_table->getTableName(),
+ $owner_phid);
- if ($owner_handle) {
- $value = $owner_handle->getName();
+ if ($owner_row) {
+ $value = $owner_row['userName'];
} else {
$value = null;
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 11, 2:12 AM (1 d, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712546
Default Alt Text
D8162.diff (1000 B)

Event Timeline