I added the hack above but it didn't fix for me on an existing article with "the problem".
Dug some more and came up with another idea. If the image name is whitespace, don't create the html option.
Seems to work, my client will be stoked...
Small change surround by comments in file:
includes/joomla.php
Code: Select all
function GetSavedImages( &$row, $path ) {
$images2 = array();
foreach( $row->images as $file ) {
$temp = explode( '|', $file );
if( strrchr($temp[0], '/') ) {
$filename = substr( strrchr($temp[0], '/' ), 1 );
//John is making this hack recklessly for mosimage adding space problem
} elseif( strlen(trim($temp[0])) == 0) {
continue;
//end hacking
} else {
$filename = $temp[0];
}
$images2[] = mosHTML::makeOption( $file, $filename );
}
$javascript = "onchange=\"previewImage( 'imagelist', 'view_imagelist', '$path/' ); showImageProps( '$path/' ); \"";
$imagelist = mosHTML::selectList( $images2, 'imagelist', 'class="inputbox" size="10" '. $javascript, 'value', 'text' );
return $imagelist;
}