Page MenuHomePhabricator

D8162.id18467.diff
No OneTemporary

D8162.id18467.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
Sat, Dec 28, 10:55 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6941304
Default Alt Text
D8162.id18467.diff (1000 B)

Event Timeline