aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-17 00:24:04 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-17 00:24:04 +0000
commitfb143a5701f15a8e9792c25ec7c0a030786896d6 (patch)
treef014b07dad8e23d07959e2a25b1f19612d581d00 /actions
parent3d3ecfa207a47198fca5658bb6aa6e27cb0f13da (diff)
downloadelgg-fb143a5701f15a8e9792c25ec7c0a030786896d6.tar.gz
elgg-fb143a5701f15a8e9792c25ec7c0a030786896d6.tar.bz2
Fixes #2242. Can now delete admin notices manually.
git-svn-id: http://code.elgg.org/elgg/trunk@8737 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/delete_admin_notice.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/actions/admin/delete_admin_notice.php b/actions/admin/delete_admin_notice.php
new file mode 100644
index 000000000..a9c3b8758
--- /dev/null
+++ b/actions/admin/delete_admin_notice.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Removes an admin notice.
+ */
+
+$guid = get_input('guid');
+$notice = get_entity($guid);
+
+if (!(elgg_instanceof($notice, 'object', 'admin_notice') && $notice->delete())) {
+ register_error(elgg_echo("admin:notices:could_not_delete"));
+}
+
+forward(REFERER); \ No newline at end of file