diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa
index be1de84a2d90655e40ba4101bbf61538b427f95e..6e5eece048256789a46f1e40a9ea5f6b78026f9c 100755 (executable)
--- a/gosa-core/update-gosa
+++ b/gosa-core/update-gosa
// Move X cursor to the next position
$cursorX+= $imageWidth;
- $maxX=($colX > $maxX)?$colX:$maxX;
+ $maxX=($colX+$imageWidth > $maxX)?$colX+$imageWidth:$maxX;
}
// Print maximum dimensions
// Insert source image...
- // And eventually convert it to grey before
+ // Eventually convert it to grey before
if (preg_match('/-grey\.png$/', $imagePath)) {
if (!function_exists("imageFilter")){
exec("convert ".$paths[$imagePath]." -colorspace Gray /tmp/grey-converted.png");
imageCopyResampled($dst, $src, $x, $y, 0, 0, $imageWidth, $imageHeight, $imageWidth, $imageHeight);
imageDestroy($src);
- // Eventually overload with grey part
- if (isset($duplicates[$imagePath])){
- $imageHeight= $heights[$duplicates[$imagePath]];
- $imageWidth= $widths[$duplicates[$imagePath]];
- $x= $posX[$duplicates[$imagePath]];
- $y= $posY[$duplicates[$imagePath]];
- }
-
// Store style
$styles[$imagePath]= "background-position:-".$x."px -".$y."px;width:".$imageWidth."px;height:".$imageHeight."px";
flush();
}
+ /* Add duplicates */
+ foreach ($duplicates as $imagePath => $realPath) {
+ $styles[$imagePath]= $styles[$realPath];
+ }
+
imagePNG($dst, "html/themes/$theme/img.png", 9);
imageDestroy($dst);