From 7fb9020255dbf64841db89744eb5ca495869538b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 31 Aug 2009 22:33:54 -0700 Subject: [PATCH] Don't show the faces checklist if there aren't any associated tags. --- modules/tagfaces/controllers/tagfaces.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/tagfaces/controllers/tagfaces.php b/modules/tagfaces/controllers/tagfaces.php index 685eb697..e4dec3a7 100644 --- a/modules/tagfaces/controllers/tagfaces.php +++ b/modules/tagfaces/controllers/tagfaces.php @@ -229,12 +229,14 @@ class tagfaces_Controller extends Controller { $oneFace->tag_id)->name, false); } - // Add a checklist to the form. - $tags_group = $form->group("ExistingFaces") - ->label(t("Tags with faces:")); - $tags_group->checklist("facesList") - ->options($array_faces) - ->label(t("Select the tag(s) that correspond(s) to the face(s) you wish to delete:")); + if ($array_faces) { + // Add a checklist to the form. + $tags_group = $form->group("ExistingFaces") + ->label(t("Tags with faces:")); + $tags_group->checklist("facesList") + ->options($array_faces) + ->label(t("Select the tag(s) that correspond(s) to the face(s) you wish to delete:")); + } // Add the id# of the photo and a delete button to the form. $form->hidden("item_id")->value($id);