1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

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
This commit is contained in:
Bob Trahan 2012-12-03 10:22:57 -08:00
parent 7154bea03c
commit d2568ac463

View file

@ -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));
}
}