]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5572 not including embed link in longtext menu for users who are logged out
authorCash Costello <cash.costello@gmail.com>
Fri, 31 May 2013 11:52:42 +0000 (07:52 -0400)
committerCash Costello <cash.costello@gmail.com>
Fri, 31 May 2013 11:52:42 +0000 (07:52 -0400)
mod/embed/start.php

index e14e0efd49ca5a523fbc9bf554dca3f1bc4fddf3..1da35aa46a83f41aa0585b5684b2a64a8d016d9b 100644 (file)
@@ -14,8 +14,10 @@ elgg_register_event_handler('init', 'system', 'embed_init');
 function embed_init() {
        elgg_extend_view('css/elgg', 'embed/css');
        elgg_extend_view('css/admin', 'embed/css');
-       
-       elgg_register_plugin_hook_handler('register', 'menu:longtext', 'embed_longtext_menu');
+
+       if (elgg_is_logged_in()) {
+               elgg_register_plugin_hook_handler('register', 'menu:longtext', 'embed_longtext_menu');
+       }
        elgg_register_plugin_hook_handler('register', 'menu:embed', 'embed_select_tab', 1000);
 
        // Page handler for the modal media embed