fix deleting of album for remote channel

This commit is contained in:
Mario Vavti 2015-06-16 12:54:29 +02:00
parent 93f48cd8bb
commit 40ee0d41dc

View file

@ -452,13 +452,13 @@ function photos_album_rename($channel_id, $oldname, $newname) {
function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') {
if ($remote_xchan) {
$r = q("SELECT distinct resource_id as from photo where xchan = '%s' and uid = %d and album = '%s' ",
$r = q("SELECT distinct resource_id from photo where xchan = '%s' and uid = %d and album = '%s' ",
dbesc($remote_xchan),
intval($channel_id),
dbesc($album)
);
} else {
$r = q("SELECT distinct resource_id from photo where uid = %d and album = '%s' ",
$r = q("SELECT distinct resource_id from photo where uid = %d and album = '%s' ",
intval($channel_id),
dbesc($album)
);