backend work to allow admin to delete photos. Still requires frontend work to give admin access to either the photos and/or the delete link.
This commit is contained in:
@@ -786,17 +786,31 @@ function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') {
|
||||
);
|
||||
}
|
||||
if ($r) {
|
||||
$arr = array();
|
||||
foreach ($r as $rr) {
|
||||
$arr[] = "'" . dbesc($rr['hash']) . "'" ;
|
||||
}
|
||||
$str = implode(',',$arr);
|
||||
return $str;
|
||||
return ids_to_querystr($r,'hash',true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function photos_album_get_db_idstr_admin($channel_id, $album) {
|
||||
|
||||
if(! is_site_admin())
|
||||
return false;
|
||||
|
||||
$r = q("SELECT hash from attach where uid = %d and folder = '%s' ",
|
||||
intval($channel_id),
|
||||
dbesc($album)
|
||||
);
|
||||
|
||||
if ($r) {
|
||||
return ids_to_querystr($r,'hash',true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Creates a new photo item.
|
||||
*
|
||||
|
Reference in New Issue
Block a user