Цитата |
---|
Время: 06.09.2010 17:07:48
От кого: [16899] (C_arter) Evgeny Petrichenko Добрый день, Ошибку у вас на сайте исправили. Не подключался файл с нужной функцией, т.е. в пути файла подставлялась не так константа - BX_PERSONAL_ROOT, вместо BX_ROOT. |
Код |
---|
__ResizeImage($File, $arRealFile, $Sight, 1); |
Код |
---|
if (empty($arResult["VARIABLES"]["GALLERY"])) { if ($arParams["PERMISSION"] >= "W" && ($object == "group" || ($object == "user" && $arResult["VARIABLES"]["user_id"] == $USER->GetID()))) { $arFiles = array(); if ($object == "user") { CheckDirPath($_SERVER["DOCUMENT_ROOT"].BX_PERSONAL_ROOT."/tmp/"); $dbUser = CUser::GetByID($USER->GetID()); $arResult["USER"] = $dbUser->GetNext(); $arResult["USER"]["PERSONAL_PHOTO"] = intVal($arResult["USER"]["PERSONAL_PHOTO"]); if ($arResult["USER"]["PERSONAL_PHOTO"] > 0) { $arFile = CFile::GetFileArray($arResult["USER"]["PERSONAL_PHOTO"]); if (!empty($arFile)) { $src = "/".(COption::GetOptionString("main", "upload_dir", "upload"))."/".$arFile["SUBDIR"]."/".$arFile["FILE_NAME"]; $src = str_replace("//","/",$src); $arRealFile = array( "name" => preg_replace("/[^a-z_.1-9]/is", "_", $arFile["ORIGINAL_NAME"]), "type" => $arFile["CONTENT_TYPE"], "tmp_name" => $_SERVER["DOCUMENT_ROOT"].$src, "error" => 0, "size" => $arFile["FILE_SIZE"]); include_once($_SERVER["DOCUMENT_ROOT"]."/".BX_PERSONAL_ROOT."/components/bitrix/photogallery.upload/functions.php"); $arAlbumSights = array( "DETAIL_PICTURE" => array( "code" => "album", "notes" => "for_album", "width" => $arParams["PHOTO"]["ALL"]["GALLERY_AVATAR_SIZE"], "height" => $arParams["PHOTO"]["ALL"]["GALLERY_AVATAR_SIZE"]), "PICTURE" => array( "code" => "album_thumbs", "notes" => "for_album", "width" => $arParams["PHOTO"]["ALL"]["GALLERY_AVATAR_THUMBS_SIZE"], "height" => $arParams["PHOTO"]["ALL"]["GALLERY_AVATAR_THUMBS_SIZE"])); foreach ($arAlbumSights as $key => $Sight) { $File = $arRealFile; $File["name"] = "avatar_".$Sight["code"].$arRealFile["name"]; $File["tmp_name"] = $_SERVER["DOCUMENT_ROOT"].BX_PERSONAL_ROOT."/tmp/".$File["name"]; __ResizeImage($File, $arRealFile, $Sight, 1); $File["MODULE_ID"] = "i |