mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Update cache on photo edit only when album name has changed
This commit is contained in:
parent
08fb35838c
commit
a6d7ad0755
2 changed files with 10 additions and 6 deletions
|
@ -384,6 +384,7 @@ function photos_post(&$a) {
|
|||
$rawtags = ((x($_POST,'newtag')) ? notags(trim($_POST['newtag'])) : '');
|
||||
$item_id = ((x($_POST,'item_id')) ? intval($_POST['item_id']) : 0);
|
||||
$albname = ((x($_POST,'albname')) ? notags(trim($_POST['albname'])) : '');
|
||||
$origaname = ((x($_POST,'origaname')) ? notags(trim($_POST['origaname'])) : '');
|
||||
$str_group_allow = perms2str($_POST['group_allow']);
|
||||
$str_contact_allow = perms2str($_POST['contact_allow']);
|
||||
$str_group_deny = perms2str($_POST['group_deny']);
|
||||
|
@ -467,9 +468,11 @@ function photos_post(&$a) {
|
|||
dbesc($resource_id),
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
// Update the photo albums cache
|
||||
// Update the photo albums cache if album name was changed
|
||||
if ($albname !== $origaname) {
|
||||
photo_albums($page_owner_uid, true);
|
||||
}
|
||||
}
|
||||
|
||||
/* Don't make the item visible if the only change was the album name */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<form action="photos/{{$nickname}}/{{$resource_id}}" method="post" id="photo_edit_form" >
|
||||
|
||||
<input type="hidden" name="item_id" value="{{$item_id}}" />
|
||||
<input type="hidden" name="origaname" value="{{$album.2}}" />
|
||||
|
||||
{{include file="field_input.tpl" field=$album}}
|
||||
{{include file="field_input.tpl" field=$caption}}
|
||||
|
|
Loading…
Reference in a new issue