From: brettp Date: Thu, 17 Mar 2011 00:24:04 +0000 (+0000) Subject: Fixes #2242. Can now delete admin notices manually. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fb143a5701f15a8e9792c25ec7c0a030786896d6;p=lorea%2Felgg.git Fixes #2242. Can now delete admin notices manually. git-svn-id: http://code.elgg.org/elgg/trunk@8737 36083f99-b078-4883-b0ff-0f9b5a30f544 --- 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 @@ +delete())) { + register_error(elgg_echo("admin:notices:could_not_delete")); +} + +forward(REFERER); \ No newline at end of file diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 8ef01e7cc..efb1a4581 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -25,6 +25,9 @@ */ function elgg_add_admin_notice($id, $message) { if ($id && $message) { + if (elgg_admin_notice_exists($id)) { + return false; + } $admin_notice = new ElggObject(); $admin_notice->subtype = 'admin_notice'; // admins can see ACCESS_PRIVATE but no one else can. @@ -173,6 +176,8 @@ function admin_init() { elgg_register_action('admin/menu/save', '', 'admin'); + elgg_register_action('admin/delete_admin_notice', '', 'admin'); + elgg_register_action('admin/plugins/simple_update_states', '', 'admin'); elgg_register_action('profile/fields/reset', '', 'admin'); diff --git a/languages/en.php b/languages/en.php index 375ba6135..ad052870a 100644 --- a/languages/en.php +++ b/languages/en.php @@ -606,6 +606,8 @@ $english = array( 'admin:plugins:category:extension' => 'Extensions', 'admin:plugins:category:service' => 'Service/API', + 'admin:notices:could_not_delete' => 'Could not delete notice.', + /** * Plugins @@ -971,6 +973,8 @@ Once you have logged in, we highly recommend that you change your password. Upgrading Elgg documentation. If you require assistance, please post to the Community Support Forums.', + 'update:twitter_api:settings_found_unknown_status' => 'Twitter API (previously Twitter Service) settings were found, but its status could not be determined. Please re-activate it manually.', + 'deprecated:function' => '%s() was deprecated by %s()', /** diff --git a/views/default/css/admin.php b/views/default/css/admin.php index 2a107b1ca..c896095df 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -1072,7 +1072,7 @@ ul.admin_plugins { color: black; border: 1px solid blue; font-weight: bold; - padding:3px 10px; + padding: 3px 0px 3px 10px; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); @@ -1083,6 +1083,9 @@ ul.admin_plugins { border-radius: 4px; } +.admin_notices a { + float: right; +} .add-user form { width:300px; diff --git a/views/default/js/admin.php b/views/default/js/admin.php index afffe95f0..2f2f59287 100644 --- a/views/default/js/admin.php +++ b/views/default/js/admin.php @@ -5,6 +5,7 @@ * @since 1.8 */ ?> +//