Решение
Решение проблемы с сохранением изменения информации о фотографии.
Только для для Альбомы v3.06
Открываем user_album_update.php
Ищем строку:
PHP:
$album_info = $database->database_fetch_assoc($album);
После нее вставляем:
PHP:
// SET VARS
$result = 0;
$album = new se_album($user->user_info[user_id]);
// ROTATE
if($task == "rotate") {
$media_id = $_GET['media_id'];
$dir = $_GET['dir'];
if($dir == "cc") { $dir = 90; } else { $dir = 270; }
// ROTATE IMAGE
$album->album_media_rotate($media_id, $dir);
// SET THUMBPATH
$thumb_path = $url->url_userdir($user->user_info[user_id]).$media_id."_thumb.jpg?".rand();
// SEND AJAX CONFIRMATION
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><script type='text/javascript'>";
echo "var img = window.parent.document.getElementById('file_$media_id');";
echo "img.src = '$thumb_path';";
echo "</script></head><body></body></html>";
exit();
// SET PROFILE PHOTO KMODS
} elseif($task == "setprofilephoto") {
$media_id = $_GET['media_id'];
$media_ext = $_GET['media_ext'];
if( stristr($user->user_info['user_photo'], 'upload') )
{
$old_photo = substr( strrchr($user->user_info['user_photo'], '/'), 1, strrpos(strrchr($user->user_info['user_photo'], '/'), ".")-7);
$thumb_path = $url->url_userdir($album_info['album_user_id']).$media_id."_thumb.jpg";
}
else
{
$old_photo = substr($user->user_info[user_photo],0,substr($user->user_info['user_photo'], 0, strrpos($user->user_info['user_photo'], ".")-7));
$thumb_path = $url->url_userdir($album_info['album_user_id']).$media_id."_thumb.jpg";
}
$database->database_query("UPDATE se_users SET user_photo='$thumb_path' WHERE user_id='".$user->user_info[user_id]."'");
// DETERMINE SIZE OF THUMBNAIL TO SHOW IN ACTION
$photo_width = 100;
$photo_height = 100;
// INSERT ACTION
$action_media = Array(Array('media_link'=>$url->url_create('profile', $user->user_info[user_username]), 'media_path'=>$thumb_path, 'media_width'=>$photo_width, 'media_height'=>$photo_height));
$actions->actions_add($user, "editphoto", Array($user->user_info[user_username], $user->user_displayname), $action_media, 999999999, TRUE, "user", $user->user_info[user_id], $user->user_info[user_privacy]);
// SEND AJAX CONFIRMATION
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><script type='text/javascript'>";
echo "window.parent.document.getElementById('profilephotomsg_$media_id').innerHTML = '<img src=\'./images/icons/profile_editphoto16.gif\' border=\'0\' class=\'button\'><strong>".SE_Language::get(20000802)."</strong>';";
echo "window.parent.document.getElementById('profilephotomsg_$old_photo').innerHTML = '<a href=\'javascript:void(0);\' onClick=\"\$(\'ajaxframe\').src=\'user_album_update.php?task=setprofilephoto&album_id={$album_info[album_id]}&media_id=$old_photo&media_ext=$media_ext\';this.blur();\"><img src=\'./images/icons/profile_editphoto_dim16.gif\' border=\'0\' class=\'button\'>".SE_Language::get(20000801)."</a>';";
// echo "window.parent.document.getElementById('profilephotomsg_$old_photo').innerHTML = '';";
echo "</script></head><body></body></html>";
exit();
// UPDATE FILES IN THIS ALBUM
} elseif($task == "doupdate") {
// GET TOTAL FILES
$total_files = $album->album_files($album_info[album_id]);
// DELETE NECESSARY FILES
$album->album_media_delete(0, $total_files, "media_id ASC", "(media_album_id='$album_info[album_id]')");
// UPDATE NECESSARY FILES
$media_array = $album->album_media_update(0, $total_files, "media_id ASC", "(media_album_id='$album_info[album_id]')");
// SET ALBUM COVER AND UPDATE DATE
$newdate = time();
$album_info[album_cover] = $_POST['album_cover'];
if(!in_array($album_info[album_cover], $media_array)) { $album_info[album_cover] = $media_array[0]; }
$database->database_query("UPDATE se_albums SET album_cover='$album_info[album_cover]', album_dateupdated='$newdate' WHERE album_id='$album_info[album_id]'");
// UPDATE LAST UPDATE DATE (SAY THAT 10 TIMES FAST)
$user->user_lastupdate();
// SHOW SUCCESS MESSAGE
$result = 1;
// MOVE MEDIA UP
} elseif($task == "moveup") {
$media_id = $_GET['media_id'];
$media_query = $database->database_query("SELECT media_id, media_order, media_album_id FROM se_media LEFT JOIN se_albums ON se_media.media_album_id=se_albums.album_id WHERE media_id='$media_id' AND se_albums.album_user_id='".$user->user_info[user_id]."'");
if($database->database_num_rows($media_query) == 1) {
$media_info = $database->database_fetch_assoc($media_query);
$prev_query = $database->database_query("SELECT media_id, media_order FROM se_media LEFT JOIN se_albums ON se_media.media_album_id=se_albums.album_id WHERE se_media.media_album_id='$media_info[media_album_id]' AND se_albums.album_user_id='".$user->user_info[user_id]."' AND media_order<$media_info[media_order] ORDER BY media_order DESC LIMIT 1");
if($database->database_num_rows($prev_query) == 1) {
$prev_info = $database->database_fetch_assoc($prev_query);
// SWITCH ORDER
$database->database_query("UPDATE se_media SET media_order=$prev_info[media_order] WHERE media_id=$media_info[media_id]");
$database->database_query("UPDATE se_media SET media_order=$media_info[media_order] WHERE media_id=$prev_info[media_id]");
// SEND AJAX CONFIRMATION
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><script type='text/javascript'>";
echo "window.parent.reorderMedia('$media_info[media_id]', '$prev_info[media_id]');";
echo "</script></head><body></body></html>";
exit();
}
}
}
Сохраняем и грузим на сервер и заменой. Чистим кеш сайта. Все.
Восстановил работу (c) Bugsmafia