Index: trunk/kernel/include/item.php =================================================================== diff -u -r3145 -r3162 --- trunk/kernel/include/item.php (.../item.php) (revision 3145) +++ trunk/kernel/include/item.php (.../item.php) (revision 3162) @@ -1112,8 +1112,15 @@ function StripDisallowed($string) { $not_allowed = Array(' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|'); - $string = str_replace($not_allowed, '_', $string); - return preg_replace('/(_+)/', '_', $string); + $string = str_replace($not_allowed, '_', $string); + $string = preg_replace('/(_+)/', '_', $string); + + while( preg_match('/(.*)_([\d]+)$/', $string, $rets) ) + { + $string = $rets[1]; + } + + return $string; } function GenerateFilename()