Permalink
Browse files

fix(ckeditor): do not draw a menu item if id is missing

fixes #8563
  • Loading branch information...
jdalsem committed Apr 12, 2016
1 parent 61c0a54 commit edf382b0d8dda49bc0938524b494a0e9253bd73a
Showing with 6 additions and 1 deletion.
  1. +6 −1 mod/ckeditor/start.php
View
@@ -34,10 +34,15 @@ function ckeditor_init() {
function ckeditor_longtext_menu($hook, $type, $items, $vars) {
$id = elgg_extract('id', $vars);
if ($id === null) {
return;
}
$items[] = ElggMenuItem::factory(array(
'name' => 'ckeditor_toggler',
'link_class' => 'ckeditor-toggle-editor elgg-longtext-control hidden',
'href' => "#{$vars['id']}",
'href' => "#{$id}",
'text' => elgg_echo('ckeditor:html'),
));

0 comments on commit edf382b

Please sign in to comment.