Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
4.0.0
-
None
-
Operating System: WinXP Fr
PHP Version: PHP5.2.4
Description
When i upload a image attribute in a object with a chinese name, the image is created with a name strange in system. But in database, the name is correct in chinese.
So it can't find the image in BO because the name is not correct in system.
I look in the file kernel/classes/datatypes/ezimage/ezimagealiashandler.php
function imageName( $contentObjectAttribute, $contentVersion, $language = false )
{
...
$objectName = $contentVersion->versionName( $language );
...
}
The image name is the object name (chinese charset)
i tested in the file lib/ezutils/classes/ezhttpfile.php
if ( !move_uploaded_file( $this->Filename, $dest_name ) )
the $dest_name is in chinese. But after the file created, the name is changed like a codage strange.
My solution : give the image name by obj_id and obj_version
i changed the code in kernel/classes/datatypes/ezimage/ezimagealiashandler.php
//for function imageName and imageNameByNode //added by LIU Bin for the chinese image name if ( is_object( $contentObjectAttribute ) ) { $objectName = $contentObjectAttribute->attribute('id')."_".$contentObjectAttribute->attribute('version'); } else { $objectName = $contentObjectAttribute['id']."_".$contentObjectAttribute['version']; }
Somebody has a better solution ??? Thanks
Attachments
Issue Links
- duplicates
-
EZP-12236 images cannot be added, because of UTF8 symbols in path
- Closed