Download & Extend

Only show "delete picture" option if picture exists

Project:Drupal core
Version:6.x-dev
Component:user system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If pictures are enabled, the user edit page has two additional options: one to delete the current picture and one to upload a replacement picture. The delete option should only be shown if a picture already exists; if not the option is useless. This patch fixes this functionality.

AttachmentSizeStatusTest resultOperations
delete_picture.patch910 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» reviewed & tested by the community

Tested with:

  • DRUPAL-6-0-BETA-2
  • PHP 5.2.1
  • Apache 2.0.59 (MAMP)

Patch works as advertised. Marking as RTBC.

#2

Status:reviewed & tested by the community» fixed

Agreed, committed. The previous code was dependent on the theme function returning an empty string if there is no picture, but this might not be the case if for example you have a default picture or would otherwise return a placeholder anyway if there is no picture.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.