From 54f6c1732cc2482bb3329629b23a7efc901a92f3 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 8 Jul 2010 19:00:33 +0000 Subject: Sorting tabs and upload sections correctly by name instead of id. Passing internal_name to all views related to embedding to allow correct calls to elggEmbedInsertContent() in overrided layouts. git-svn-id: http://code.elgg.org/elgg/trunk@6666 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/embed/start.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod/embed/start.php') diff --git a/mod/embed/start.php b/mod/embed/start.php index 99d620746..eb4aef08d 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -49,9 +49,10 @@ function embed_page_handler($page) { // @todo trigger for all right now. If we categorize these later we can trigger // for certain categories. $sections = trigger_plugin_hook('embed_get_sections', 'all', NULL, array()); - $upload_sections = trigger_plugin_hook('embed_get_upload_sections', 'all', NULL, array()); - asort($sections, SORT_LOCALE_STRING); - asort($upload_sections, SORT_LOCALE_STRING); + $upload_sections = trigger_plugin_hook('embed_get_upload_sections', 'all', NULL, array()); + + elgg_sort_3d_array_by_value($sections, 'name'); + elgg_sort_3d_array_by_value($upload_sections, 'name'); $active_section = get_input('active_section', NULL); $internal_name = get_input('internal_name', NULL); @@ -65,6 +66,7 @@ function embed_page_handler($page) { break; } + // exit because this is in a modal display. exit; } -- cgit v1.2.3