diff options
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php index 2f1661e83..a18118f32 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -411,19 +411,25 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie } // internalname => name (1.8) - if (isset($vars['internalname']) && !isset($vars['name'])) { + if (isset($vars['internalname']) && !isset($vars['__ignoreInternalname']) && !isset($vars['name'])) { elgg_deprecated_notice('You should pass $vars[\'name\'] now instead of $vars[\'internalname\']', 1.8, 2); $vars['name'] = $vars['internalname']; $test=false; } elseif (isset($vars['name'])) { + if (!isset($vars['internalname'])) { + $vars['__ignoreInternalname'] = ''; + } $vars['internalname'] = $vars['name']; } // internalid => id (1.8) - if (isset($vars['internalid']) && !isset($vars['name'])) { + if (isset($vars['internalid']) && !isset($vars['__ignoreInternalid']) && !isset($vars['name'])) { elgg_deprecated_notice('You should pass $vars[\'id\'] now instead of $vars[\'internalid\']', 1.8, 2); $vars['id'] = $vars['internalid']; } elseif (isset($vars['id'])) { + if (!isset($vars['internalid'])) { + $vars['__ignoreInternalid'] = ''; + } $vars['internalid'] = $vars['id']; } @@ -703,9 +709,9 @@ function elgg_view_layout($layout_name, $vars = array()) { * * This function triggers a 'register', 'menu:<menu name>' plugin hook that enables * plugins to add menu items just before a menu is rendered. This is used by - * context-sensitive menus (menus that are specific to a particular entity such - * as the user hover menu). Using elgg_register_menu_item() in response to the hook - * can cause incorrect links to show up. See the blog plugin's blog_owner_block_menu() + * dynamic menus (menus that change based on some input such as the user hover + * menu). Using elgg_register_menu_item() in response to the hook can cause + * incorrect links to show up. See the blog plugin's blog_owner_block_menu() * for an example of using this plugin hook. * * An additional hook is the 'prepare', 'menu:<menu name>' which enables plugins @@ -718,8 +724,9 @@ function elgg_view_layout($layout_name, $vars = array()) { * @param array $vars An associative array of display options for the menu. * Options include: * sort_by => string or php callback - * string options: 'name', 'priority', 'title' (default), 'register' (registration order) - * php callback: a compare function for usort + * string options: 'name', 'priority', 'title' (default), + * 'register' (registration order) or a + * php callback (a compare function for usort) * handler: string the page handler to build action URLs * entity: ElggEntity to use to build action URLs * class: string the class for the entire menu. @@ -738,7 +745,7 @@ function elgg_view_menu($menu_name, array $vars = array()) { $menu = $CONFIG->menus[$menu_name]; // Give plugins a chance to add menu items just before creation. - // This supports context sensitive menus (ex. user_hover). + // This supports dynamic menus (example: user_hover). $menu = elgg_trigger_plugin_hook('register', "menu:$menu_name", $vars, $menu); $builder = new ElggMenuBuilder($menu); @@ -1038,7 +1045,7 @@ $list_type_toggle = true, $pagination = true) { function elgg_view_annotation_list($annotations, array $vars = array()) { $defaults = array( 'items' => $annotations, - 'list_class' => 'elgg-annotation-list', + 'list_class' => 'elgg-list-annotation elgg-annotation-list', // @todo remove elgg-annotation-list in Elgg 1.9 'full_view' => true, 'offset_key' => 'annoff', ); @@ -1547,6 +1554,7 @@ function elgg_views_boot() { elgg_register_simplecache_view('css/elgg'); elgg_register_simplecache_view('css/ie'); elgg_register_simplecache_view('css/ie6'); + elgg_register_simplecache_view('css/ie7'); elgg_register_simplecache_view('js/elgg'); elgg_register_js('jquery', '/vendors/jquery/jquery-1.6.2.min.js', 'head'); @@ -1568,7 +1576,7 @@ function elgg_views_boot() { elgg_register_css('lightbox', $lightbox_css_url); $elgg_css_url = elgg_get_simplecache_url('css', 'elgg'); - elgg_register_css('elgg', $elgg_css_url, 1); + elgg_register_css('elgg', $elgg_css_url); elgg_load_css('elgg'); elgg_register_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link'); |