Code

Added label extraction
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Mar 2010 10:05:37 +0000 (10:05 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Mar 2010 10:05:37 +0000 (10:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15888 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index 447e9a1aa75f1fa089127b8b46fd0bb27f037b26..9ee6532c779f6e20a429f09cc21d9ba8ed13a3ba 100644 (file)
@@ -3546,9 +3546,8 @@ function image($path, $action= "", $title= "", $align= "middle")
   $styles= session::global_get('img-styles');
 
   /* Extract labels from path */
-  if (preg_match("/(-[a-z0-9]+)\.png$/", $path, $matches)) {
-    print_a($matches);
-    exit;
+  if (preg_match("/\.png\[(.*)\]$/", $path, $matches)) {
+    $label= $matches[1];
   }
 
   $lbl= "";