aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-07-18 13:18:37 +0200
committerMario <mario@mariovavti.com>2018-07-18 13:19:35 +0200
commit5fa3e10701f3e745d2d13a0bcbd0120b9841eb3e (patch)
tree2d28b8b3557034015ef5fef836c1b62b9027a3f9 /include/attach.php
parent95355ddec0a4d92ee0367aeb6436ced005ab0c02 (diff)
downloadvolse-hubzilla-5fa3e10701f3e745d2d13a0bcbd0120b9841eb3e.tar.gz
volse-hubzilla-5fa3e10701f3e745d2d13a0bcbd0120b9841eb3e.tar.bz2
volse-hubzilla-5fa3e10701f3e745d2d13a0bcbd0120b9841eb3e.zip
set the correct album name when moving photos
(cherry picked from commit eb322e831297ee8fd773049c1a00c915c49dc93e)
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/attach.php b/include/attach.php
index 0d2b43b58..ec72bb946 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -2325,6 +2325,7 @@ function attach_move($channel_id, $resource_id, $new_folder_hash) {
return false;
$newdirname = $n[0]['filename'];
+ $newalbumname = $n[0]['display_path'];
$newstorepath = dbunescbin($n[0]['content']) . '/' . $resource_id;
}
else {
@@ -2332,6 +2333,7 @@ function attach_move($channel_id, $resource_id, $new_folder_hash) {
// root directory
$newdirname = EMPTY_STR;
+ $newalbumname = EMPTY_STR;
$newstorepath = 'store/' . $c['channel_address'] . '/' . $resource_id;
}
@@ -2419,7 +2421,7 @@ function attach_move($channel_id, $resource_id, $new_folder_hash) {
if($r[0]['is_photo']) {
$t = q("update photo set album = '%s', filename = '%s', os_path = '%s', display_path = '%s'
where resource_id = '%s' and uid = %d",
- dbesc($newdirname),
+ dbesc($newalbumname),
dbesc($filename),
dbesc($x['os_path']),
dbesc($x['path']),