Oakley
💖 Chevereto Fan
This applies to versions 3.10.2 to 3.10.5
When viewing the content within an album I've noticed that the red "Delete album" link (at the top of the page) still appears even if the "Enable user content delete" option is set to disabled.
This seems to happen because there appears to be an if statement missing from album.php
Basically, in views/album.php from line 29
Should probably be something like:
The corresponding image.php file and the relevant tpl files all seem fine.
When viewing the content within an album I've noticed that the red "Delete album" link (at the top of the page) still appears even if the "Enable user content delete" option is set to disabled.
This seems to happen because there appears to be an if statement missing from album.php
Basically, in views/album.php from line 29
PHP:
<?php
if(is_owner() or is_admin()) {
?>
<div class="breadcrum-item">
<a class="edit-link" data-modal="edit"><span class="icon-edit"></span><span><?php _se('Edit album details'); ?></span></a>
</div>
<div class="breadcrum-item">
<a class="delete-link" data-confirm="<?php _se("Do you really want to delete this album and all of its images? This can't be undone."); ?>" data-submit-fn="CHV.fn.submit_resource_delete" data-ajax-deferred="CHV.fn.complete_resource_delete" data-ajax-url="<?php echo G\get_base_url("json"); ?>"><?php _se('Delete album'); ?></a>
</div>
<?php
}
?>
Should probably be something like:
PHP:
<?php
if(is_owner() or is_admin()) {
?>
<div class="breadcrum-item">
<a class="edit-link" data-modal="edit"><span class="icon-edit"></span><span><?php _se('Edit album details'); ?></span></a>
</div>
<?php
if(is_allowed_to_delete_content()) {
?>
<div class="breadcrum-item">
<a class="delete-link" data-confirm="<?php _se("Do you really want to delete this album and all of its images? This can't be undone."); ?>" data-submit-fn="CHV.fn.submit_resource_delete" data-ajax-deferred="CHV.fn.complete_resource_delete" data-ajax-url="<?php echo G\get_base_url("json"); ?>"><?php _se('Delete album'); ?></a>
</div>
<?php
}
}
?>
The corresponding image.php file and the relevant tpl files all seem fine.