diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggMenuBuilder.php | 4 | ||||
-rw-r--r-- | engine/classes/ElggMenuItem.php | 24 | ||||
-rw-r--r-- | engine/lib/admin.php | 4 | ||||
-rw-r--r-- | engine/lib/deprecated-1.8.php | 4 | ||||
-rw-r--r-- | engine/lib/navigation.php | 6 | ||||
-rw-r--r-- | engine/lib/user_settings.php | 6 | ||||
-rw-r--r-- | engine/lib/users.php | 12 | ||||
-rw-r--r-- | engine/lib/views.php | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php index 4f9e7b447..9112c9535 100644 --- a/engine/classes/ElggMenuBuilder.php +++ b/engine/classes/ElggMenuBuilder.php @@ -153,8 +153,8 @@ class ElggMenuBuilder { // scan looking for a selected item foreach ($this->menu as $menu_item) { - if ($menu_item->getURL()) { - if (elgg_http_url_is_identical(full_url(), $menu_item->getURL())) { + if ($menu_item->getHref()) { + if (elgg_http_url_is_identical(full_url(), $menu_item->getHref())) { $menu_item->setSelected(true); return $menu_item; } diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php index 0a1b948cc..8bff0abba 100644 --- a/engine/classes/ElggMenuItem.php +++ b/engine/classes/ElggMenuItem.php @@ -21,7 +21,7 @@ class ElggMenuItem { /** * @var string The menu url */ - protected $url = null; + protected $href = null; /** * @var array Classes to apply to the anchor tag. @@ -78,13 +78,13 @@ class ElggMenuItem { * * @param string $name Identifier of the menu item * @param string $text Display text of the menu item - * @param string $url URL of the menu item + * @param string $href URL of the menu item */ - public function __construct($name, $text, $url) { + public function __construct($name, $text, $href) { $this->name = $name; $this->text = $text; - if ($url) { - $this->url = elgg_normalize_url($url); + if ($href) { + $this->href = elgg_normalize_url($href); } } @@ -92,7 +92,7 @@ class ElggMenuItem { * ElggMenuItem factory method * * This static method creates an ElggMenuItem from an associative array. - * Required keys are name, title, and url. + * Required keys are name, text, and href. * * @param array $options Option array of key value pairs * @@ -103,10 +103,10 @@ class ElggMenuItem { return NULL; } - $item = new ElggMenuItem($options['name'], $options['text'], $options['url']); + $item = new ElggMenuItem($options['name'], $options['text'], $options['href']); unset($options['name']); unset($options['text']); - unset($options['url']); + unset($options['href']); // special catch in case someone uses context rather than contexts if (isset($options['context'])) { @@ -149,8 +149,8 @@ class ElggMenuItem { * * @return string */ - public function getURL() { - return $this->url; + public function getHref() { + return $this->href; } /** @@ -409,8 +409,8 @@ class ElggMenuItem { */ public function getLink(array $vars = array()) { $vars['text'] = $this->text; - if ($this->url) { - $vars['href'] = $this->url; + if ($this->href) { + $vars['href'] = $this->href; } if ($this->linkClass) { $vars['class'] = $this->linkClass; diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 3f4a331de..1c78ce210 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -137,7 +137,7 @@ function elgg_add_admin_menu_item($section_id, $section_title, $parent_id = NULL return elgg_register_menu_item('page', array( 'name' => $name, - 'url' => $href, + 'href' => $href, 'text' => $section_title, 'context' => 'admin', 'parent_name' => $parent_id, @@ -204,7 +204,7 @@ function admin_init() { // dashboard elgg_register_menu_item('page', array( 'name' => 'dashboard', - 'url' => 'pg/admin/dashboard', + 'href' => 'pg/admin/dashboard', 'text' => elgg_echo('admin:dashboard'), 'context' => 'admin', 'weight' => 10, diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php index e31a9f8ba..8aaf003dc 100644 --- a/engine/lib/deprecated-1.8.php +++ b/engine/lib/deprecated-1.8.php @@ -1205,7 +1205,7 @@ function add_submenu_item($label, $link, $group = 'default', $onclick = false, $ $context = 'all'; } - $item = array('name' => $label, 'text' => $label, 'url' => $link, 'context' => $context, + $item = array('name' => $label, 'text' => $label, 'href' => $link, 'context' => $context, 'section' => $group,); if ($selected) { @@ -1251,7 +1251,7 @@ function add_menu($menu_name, $menu_url, $menu_children = array(), $context = "" elgg_deprecated_notice('add_menu() deprecated by elgg_register_menu_item()', 1.8); return elgg_register_menu_item('site', array('name' => $menu_name, 'text' => $menu_name, - 'url' => $menu_url,)); + 'href' => $menu_url,)); } /** diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 1d3098938..5e03641a1 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -14,11 +14,11 @@ * userprofile, groupprofile, or any custom menu * @param mixed $menu_item A ElggMenuItem object or an array of options in format: * name => STR Menu item identifier (required) - * title => STR Menu item title (required) - * url => STR Menu item URL (required) + * text => STR Menu item display text (required) + * href => STR Menu item URL (required) * contexts => ARR Page context strings * section => STR Menu section identifier - * tooltip => STR Menu item tooltip + * title => STR Menu item tooltip * selected => BOOL Is this menu item currently selected * parent_name => STR Identifier of the parent menu item * diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index 25aa36dbd..f3e586851 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -254,19 +254,19 @@ function usersettings_pagesetup() { $params = array( 'name' => '1_account', 'text' => elgg_echo('usersettings:user:opt:linktext'), - 'url' => "pg/settings/user/{$user->username}", + 'href' => "pg/settings/user/{$user->username}", ); elgg_register_menu_item('page', $params); $params = array( 'name' => '1_plugins', 'text' => elgg_echo('usersettings:plugins:opt:linktext'), - 'url' => "pg/settings/plugins/{$user->username}", + 'href' => "pg/settings/plugins/{$user->username}", ); elgg_register_menu_item('page', $params); $params = array( 'name' => '1_statistics', 'text' => elgg_echo('usersettings:statistics:opt:linktext'), - 'url' => "pg/settings/statistics/{$user->username}", + 'href' => "pg/settings/statistics/{$user->username}", ); elgg_register_menu_item('page', $params); } diff --git a/engine/lib/users.php b/engine/lib/users.php index 9d1cb1ff6..8a5289a03 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1089,13 +1089,13 @@ function collections_submenu_items() { elgg_register_menu_item('page', array( 'name' => 'friends:collections:view', 'text' => elgg_echo('friends:collections'), - 'url' => "pg/collections/$user->username", + 'href' => "pg/collections/$user->username", )); elgg_register_menu_item('page', array( 'name' => 'friends:collections:add', 'text' => elgg_echo('friends:collections:add'), - 'url' => "pg/collections/add", + 'href' => "pg/collections/add", )); } @@ -1468,7 +1468,7 @@ function users_pagesetup() { $params = array( 'name' => 'friends', 'text' => elgg_echo('friends'), - 'url' => 'pg/friends/' . elgg_get_page_owner_entity()->username, + 'href' => 'pg/friends/' . elgg_get_page_owner_entity()->username, 'contexts' => array('friends') ); elgg_register_menu_item('page', $params); @@ -1476,7 +1476,7 @@ function users_pagesetup() { $params = array( 'name' => 'friendsof', 'text' => elgg_echo('friends:of'), - 'url' => 'pg/friendsof/' . elgg_get_page_owner_entity()->username, + 'href' => 'pg/friendsof/' . elgg_get_page_owner_entity()->username, 'contexts' => array('friends') ); elgg_register_menu_item('page', $params); @@ -1509,14 +1509,14 @@ function users_init() { if ($user) { $params = array( 'name' => 'edit_avatar', - 'url' => "pg/avatar/edit/{$user->username}", + 'href' => "pg/avatar/edit/{$user->username}", 'text' => elgg_echo('avatar:edit'), 'contexts' => array('profile_edit'), ); elgg_register_menu_item('page', $params); $params = array( 'name' => 'edit_profile', - 'url' => "pg/profile/{$user->username}/edit", + 'href' => "pg/profile/{$user->username}/edit", 'text' => elgg_echo('profile:edit'), 'contexts' => array('profile_edit'), ); diff --git a/engine/lib/views.php b/engine/lib/views.php index db510a275..1ae89bac2 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -681,7 +681,7 @@ function elgg_view_menu($menu_name, array $vars = array()) { $vars['name'] = $menu_name; - $sort_by = elgg_extract('sort_by', $vars, 'title'); + $sort_by = elgg_extract('sort_by', $vars, 'text'); $menu = $CONFIG->menus[$menu_name]; |