From dcb2e439606c9e3394df95ade649e56917462f9d Mon Sep 17 00:00:00 2001 From: leon Date: Thu, 14 Apr 2011 16:17:39 -0700 Subject: [PATCH] Removing reordering code that wasn't needed Summary: Remove reordering code for package array as it's ordered in the first place Test Plan: Called API through conduit console, still works Reviewed By: epriestley Reviewers: epriestley, tuomaspelkonen CC: ju, dpepper, epriestley Blame Revision: 126 Differential Revision: 141 --- .../storage/package/PhabricatorOwnersPackage.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/applications/owners/storage/package/PhabricatorOwnersPackage.php b/src/applications/owners/storage/package/PhabricatorOwnersPackage.php index 18928ed0e9..4bbd924944 100644 --- a/src/applications/owners/storage/package/PhabricatorOwnersPackage.php +++ b/src/applications/owners/storage/package/PhabricatorOwnersPackage.php @@ -135,15 +135,9 @@ class PhabricatorOwnersPackage extends PhabricatorOwnersDAO { $packages = $package->loadAllWhere('id in (%Ld)', array_keys($order)); - $result = array(); - // Reorder packages according to specificity. - foreach ($packages as $package) { - $result[$package->getID()] = $package; - } + $packages = array_select_keys($packages, array_keys($order)); - $result = array_select_keys($result, array_keys($order)); - - return $result; + return $packages; } public function save() {