Hi
I a got this version g2.1.2, edit modules/core/ItemAddFromServer.inc
I paste you the function if you want help me to do the correction I will be very appreciated! ;)
Is it just in this function I have to do correction ?
function addItem($parentId, $file, $useSymlink, $textFields, &$status, &$error) {
$fileName = basename($file);
list ($base, $extension) = GalleryUtilities::getFileNameComponents($fileName);
list ($ret, $mimeType) = GalleryCoreApi::convertExtensionToMime($extension);
if ($ret) {
return $ret->wrap(__FILE__, __LINE__);
}
$base = GalleryCoreApi::convertToUtf8($base);
GalleryUtilities::sanitizeInputValues($base);
$title = ($textFields['title']) ? $base : '';
$summary = ($textFields['summary']) ? $base : '';
$description = ($textFields['description']) ? $base : '';
list ($ret, $newItem) = GalleryCoreApi::addItemToAlbum($file,
$fileName,
$title,
$summary,
$description,
$mimeType,
$parentId,
$useSymlink);
if ($ret) {
return $ret->wrap(__FILE__, __LINE__);
}
$status['addedFiles'][] = array('fileName' => GalleryCoreApi::convertToUtf8($fileName),
'id' => $newItem->getId(),
'warnings' => array());
return null;
}
Thanks so mutch!
-=Pedro=-