mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:35:14 +00:00
fix for bug 827 to provide partial backward compatibility with album names in photo items from < hubzilla 2.4
this will only work part of the time - which is why the behaviour was changed
This commit is contained in:
parent
ecb1515e5d
commit
0d062251b6
1 changed files with 9 additions and 0 deletions
|
@ -593,6 +593,15 @@ function photos_album_exists($channel_id, $observer_hash, $album) {
|
|||
intval($channel_id)
|
||||
);
|
||||
|
||||
// partial backward compatibility with Hubzilla < 2.4 when we used the filename only
|
||||
// (ambiguous which would get chosen if you had two albums of the same name in different directories)
|
||||
|
||||
if(! $r) {
|
||||
$r = q("SELECT folder, hash, is_dir, filename, os_path, display_path FROM attach WHERE filename = '%s' AND is_dir = 1 AND uid = %d $sql_extra limit 1",
|
||||
dbesc(hex2bin($album)),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
return (($r) ? $r[0] : false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue