ePages 6.11.0 - DE_EPAGES/ImageGallery/API/ImageGallery.pm

Package DE_EPAGES::ImageGallery::API::ImageGallery

API helper functions for image galleries.

@EXPORT_OK
RenameGalleryImageFile

Functions

RenameGalleryImageFile

RenameGalleryImageFile

Does a file move operation for the given file name. The file extension and it's directory location remains untouched. Also renames all derivatives of the image file, namely thumbnail, mgt and medium. In addition, update the galleryimage's object attributes with the new filename as well. If another file with the given new name already exists, an error is thrown.

Syntax
my $hResult = RenameGalleryImageFile (
    $ImageGallery,
    $ImagePath,
    $RelPathWithMG,
    $OldFilePath,
    $OldFileName,
    $NewFileName,
    $FileExt
);
Input
$ImageGallery (object)
ImageGallery object instance
$ImagePath (string)
absolute path to the image directory
$RelPathWithMG (string)
relative path in mediagallery, including the
"MediaGallery/"
$OldFilePath (string)
relative path to the old file name
$OldFileName (string)
file name without extension of the current file
$NewFileName (string)
new file name without extension for the file
$FileExt (string)
file extension
Return
$hAttributes (reference to hash)
hash containing the changed galleryimage object attributes