1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: Properly render labelled icons if default materialize CSS theme is used.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -3663,6 +3663,14 @@
global $BASE_DIR;
$label= null;
+ /* Extract labels from path */
+ preg_match("/(.*\.png)\[(.*)\]$/", $path, $matches);
+
+ if (count($matches) == 3) {
+ $path = $matches[1];
+ $label= $matches[2];
+ }
+
$theme = getThemeName();
switch ($theme) {
@@ -3694,14 +3702,6 @@
return "";
}
- /* Extract labels from path */
- preg_match("/(.*\.png)\[(.*)\]$/", $path, $matches);
-
- if (count($matches) == 3) {
- $path = $matches[1];
- $label= $matches[2];
- }
-
$baseImage = str_replace('['.$label.']', '', $path);
if (!array_key_exists($baseImage, $styles)) {
return "";
|