1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Fix PhabricatorActionView::getAvailableIcons

Summary: `getAvailableIcons` parses icon(s).json, which has recently been pluralized in D5890.

Test Plan: /uiexample/view/PhabricatorActionListExample/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5902
This commit is contained in:
Edward Speyer 2013-05-11 17:38:02 +01:00
parent 57ca8de61c
commit e9e3a28930

View file

@ -134,12 +134,12 @@ final class PhabricatorActionView extends AphrontView {
public static function getAvailableIcons() { public static function getAvailableIcons() {
$root = dirname(phutil_get_library_root('phabricator')); $root = dirname(phutil_get_library_root('phabricator'));
$path = $root.'/resources/sprite/manifest/icon.json'; $path = $root.'/resources/sprite/manifest/icons.json';
$data = Filesystem::readFile($path); $data = Filesystem::readFile($path);
$manifest = json_decode($data, true); $manifest = json_decode($data, true);
$results = array(); $results = array();
$prefix = 'action-'; $prefix = 'icons-';
foreach ($manifest['sprites'] as $sprite) { foreach ($manifest['sprites'] as $sprite) {
$name = $sprite['name']; $name = $sprite['name'];
if (preg_match('/-(white|grey)$/', $name)) { if (preg_match('/-(white|grey)$/', $name)) {