aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/navigation.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-07-29 11:42:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-07-29 11:42:02 -0300
commitbb3c9a26bb75c76c5934d327548bf08606467b9f (patch)
tree26760aa866799fc70683ef6845bf54fb17bdc955 /engine/lib/navigation.php
parent2feedf39f6484879333a7b77fdc3c184150db8c7 (diff)
parent398572fd96c72b363fd5a252fb9cbe1cecab1e04 (diff)
downloadelgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.gz
elgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.bz2
Merge branch 'floxglove-3' into saravea
Conflicts: .gitmodules
Diffstat (limited to 'engine/lib/navigation.php')
-rw-r--r--engine/lib/navigation.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 86624cd7c..118a7214c 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -126,6 +126,7 @@ function elgg_unregister_menu_item($menu_name, $item_name) {
}
foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
+ /* @var ElggMenuItem $menu_object */
if ($menu_object->getName() == $item_name) {
unset($CONFIG->menus[$menu_name][$index]);
return true;
@@ -151,7 +152,8 @@ function elgg_is_menu_item_registered($menu_name, $item_name) {
return false;
}
- foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
+ foreach ($CONFIG->menus[$menu_name] as $menu_object) {
+ /* @var ElggMenuItem $menu_object */
if ($menu_object->getName() == $item_name) {
return true;
}
@@ -311,8 +313,8 @@ function elgg_site_menu_setup($hook, $type, $return, $params) {
// check if we have anything selected
$selected = false;
- foreach ($return as $section_name => $section) {
- foreach ($section as $key => $item) {
+ foreach ($return as $section) {
+ foreach ($section as $item) {
if ($item->getSelected()) {
$selected = true;
break 2;
@@ -345,6 +347,7 @@ function elgg_site_menu_setup($hook, $type, $return, $params) {
function elgg_river_menu_setup($hook, $type, $return, $params) {
if (elgg_is_logged_in()) {
$item = $params['item'];
+ /* @var ElggRiverItem $item */
$object = $item->getObjectEntity();
// comments and non-objects cannot be commented on or liked
if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
@@ -388,6 +391,7 @@ function elgg_entity_menu_setup($hook, $type, $return, $params) {
}
$entity = $params['entity'];
+ /* @var ElggEntity $entity */
$handler = elgg_extract('handler', $params, false);
// access
@@ -433,6 +437,7 @@ function elgg_entity_menu_setup($hook, $type, $return, $params) {
function elgg_widget_menu_setup($hook, $type, $return, $params) {
$widget = $params['entity'];
+ /* @var ElggWidget $widget */
$show_edit = elgg_extract('show_edit', $params, true);
$collapse = array(
@@ -481,6 +486,7 @@ function elgg_widget_menu_setup($hook, $type, $return, $params) {
*/
function elgg_annotation_menu_setup($hook, $type, $return, $params) {
$annotation = $params['annotation'];
+ /* @var ElggAnnotation $annotation */
if ($annotation->name == 'generic_comment' && $annotation->canEdit()) {
$url = elgg_http_add_url_query_elements('action/comments/delete', array(