Skip to content

Commit

Permalink
helpers/icon: allow for img urls outside of icons
Browse files Browse the repository at this point in the history
Icon images where restricted to img/icons, this did not allow modules
to use custom images. Left behaviour for img urls without slash
untouched.
  • Loading branch information
Thomas-Gelf committed Oct 1, 2015
1 parent d6283f1 commit 270520e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Icinga/Web/View/helpers/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@
$properties['class'] = 'icon';
}

return $view->img('img/icons/' . $img, $properties);
if (strpos($img, '/') === false) {
return $view->img('img/icons/' . $img, $properties);
} else {
return $view->img($img, $properties);
}
}

$ariaHidden = array_key_exists('aria-hidden', $properties) ? $properties['aria-hidden'] : null;
Expand Down

0 comments on commit 270520e

Please sign in to comment.