]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Embed correctly passes text area name to elggEmbedInsertContent().
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 30 Jun 2010 17:09:25 +0000 (17:09 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 30 Jun 2010 17:09:25 +0000 (17:09 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6595 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/embed/start.php
mod/embed/views/default/embed/embed.php

index a3b8113713641d118de767aa2ebdc05ddc489d99..29dc7853080b2d258a84819d45cbb8e3b5e4177b 100644 (file)
@@ -53,11 +53,13 @@ function embed_page_handler($page) {
                        asort($sections, SORT_LOCALE_STRING);
                        asort($upload_sections, SORT_LOCALE_STRING);
                        $active_section = get_input('active_section', NULL);
+                       $internal_name = get_input('internalname', NULL);
 
                        echo elgg_view('embed/embed', array(
                                'sections' => $sections,
                                'active_section' => $active_section,
-                               'upload_sections' => $upload_sections
+                               'upload_sections' => $upload_sections,
+                               'internal_name' => $internal_name
                        ));
 
                        break;
index e90d28005cde09d2a07cac8d7da3030186feb0f3..250a7a4651bc8f8058712dcc29c1eef884e5073d 100644 (file)
@@ -12,6 +12,7 @@
 $sections = elgg_get_array_value('sections', $vars, array());
 $active_section = elgg_get_array_value('active_section', $vars, array_shift(array_keys($sections)));
 $upload_sections = elgg_get_array_value('upload_sections', $vars, array());
+$internal_name = elgg_get_array_value('internal_name', $vars, array());
 
 if (!$sections) {
        $content = elgg_echo('embed:no_sections');
@@ -122,7 +123,7 @@ $(document).ready(function() {
        // insert embed codes
        $('.embed_data').click(function() {
                var embed_code = $(this).data('embed_code');
-               elggEmbedInsertContent(embed_code);
+               elggEmbedInsertContent(embed_code, '<?php echo addslashes($internal_name); ?>');
        });
 
        // tabs