### Eclipse Workspace Patch 1.0
#P zoneplus
Index: sites/all/modules/contrib/signwriter/signwriter.module
===================================================================
--- sites/all/modules/contrib/signwriter/signwriter.module	(revision 821)
+++ sites/all/modules/contrib/signwriter/signwriter.module	(working copy)
@@ -550,9 +550,13 @@
   $imagefileid = "$tag:$text-". serialize($profile);
   $key = md5($imagefileid);
 
+  //For big sites - using subdirs so we dont end up with tens of thousand files in one dir
+  $cachedir = $cachedir . '/' . substr($key, 0, 4);
+  file_check_directory($cachedir, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+  
   // for shorter filenames that are still unique and repeatable (for caching)
   $imagefilename = preg_replace('/[^\w\d]/', '', $text) .'-'. $key .'-signwriter.'. $profile->imagetype;
-  $imagefile = "$cachedir/$imagefilename";
+  $imagefile = "$cachedir//$imagefilename";
   if ($imageinfo) {
     $imageinfo->key = $key;
     $imageinfo->path = $imagefile;
@@ -647,7 +651,7 @@
     }
 
     // calculate the maximum possible hight of the text to properly vertically align multiple images
-    $biggest_box = imagettfbbox($image->fontsize[0], $angle, $image->fontfile[0], "Ã…ÃŸÃ¥Å®Å¯ÃƒÃ•Ã‘Ã?Ã‰Ã?Ã“ÃšÃ„Ã‹Ã?Ã–ÃœÃ€ÃˆÃŒÃ’Ã™Ã‚ÃŠÃŽÃ”Ã›Ã‡Ã§abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
+    $biggest_box = imagettfbbox($image->fontsize[0], $angle, $image->fontfile[0], "Ãƒâ€¦ÃƒÅ¸ÃƒÂ¥Ã…Â®Ã…Â¯ÃƒÆ’Ãƒâ€¢Ãƒâ€˜Ãƒï¿½Ãƒâ€°Ãƒï¿½Ãƒâ€œÃƒÅ¡Ãƒâ€žÃƒâ€¹Ãƒï¿½Ãƒâ€“ÃƒÅ“Ãƒâ‚¬ÃƒË†ÃƒÅ’Ãƒâ€™Ãƒâ„¢Ãƒâ€šÃƒÅ ÃƒÅ½Ãƒâ€?Ãƒâ€ºÃƒâ€¡ÃƒÂ§abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
     foreach (array(1, 3, 5, 7) as $i) {
       $box[$i] = $biggest_box[$i];
     }
@@ -1184,6 +1188,3 @@
   }
   return $page_match;
 }
-
-//---------------------------------------------------------
-//>>>> check implementation
