From d2568ac463daa852ffbefa1d86519bafbec54ad3 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 3 Dec 2012 10:22:57 -0800 Subject: [PATCH] fix getAvailableIcons so uiexample works Summary: D4027 introduced this along with associated awesomeness. Test Plan: viewed uiexample and saw some actions. also no more errors. Reviewers: epriestley Reviewed By: epriestley CC: chad, aran, Korvin Differential Revision: https://secure.phabricator.com/D4066 --- src/view/layout/PhabricatorActionView.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index 10f3a49115..3b94243ee6 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -129,11 +129,12 @@ final class PhabricatorActionView extends AphrontView { $results = array(); $prefix = 'action-'; foreach ($manifest['sprites'] as $sprite) { - if (preg_match('/-(white|grey)$/', $sprite)) { + $name = $sprite['name']; + if (preg_match('/-(white|grey)$/', $name)) { continue; } - if (!strncmp($sprite, $prefix, strlen($prefix))) { - $results[] = substr($sprite, strlen($prefix)); + if (!strncmp($name, $prefix, strlen($prefix))) { + $results[] = substr($name, strlen($prefix)); } }