summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/quick.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-14 10:38:02 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-14 10:38:02 -0700
commit7773d0afe835e040eb0238247b98eae305c0c9e9 (patch)
tree8a61b3be0f0df65a9d9bb594c50c7f8eb2d1223b /modules/gallery/controllers/quick.php
parentd95fcb189f7fb9709b5ee30cbeded611fc04a7a2 (diff)
parent390bc7c1f6b79924e42b326718ee244ee989243a (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/quick.php')
-rw-r--r--modules/gallery/controllers/quick.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index d6f5213f..30383307 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -95,6 +95,21 @@ class Quick_Controller extends Controller {
print json_encode(array("result" => "success", "reload" => 1));
}
+ public function form_delete($id) {
+ $item = model_cache::get("item", $id);
+ access::required("view", $item);
+ access::required("edit", $item);
+
+ if ($item->is_album()) {
+ print t("Delete the album <b>%title</b>? All items within the album will also be deleted.", array("title" => $item->title));
+ } else {
+ print t("Are you sure you want to delete <b>%title</b>?", array("title" => $item->title));
+ }
+
+ $form = item::get_delete_form($item);
+ print $form;
+ }
+
public function delete($id) {
access::verify_csrf();
$item = model_cache::get("item", $id);