aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/river.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-07 12:15:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-07 12:15:38 +0000
commit142aef30294caab47a184393103aa6644131ba19 (patch)
tree495f2308c99f76f2e33bdac26ceff4f0c9ff5496 /engine/lib/river.php
parent5991e7a915191a0d7655b51794dfdc1ac05ce5d7 (diff)
downloadelgg-142aef30294caab47a184393103aa6644131ba19.tar.gz
elgg-142aef30294caab47a184393103aa6644131ba19.tar.bz2
Refs #2895 entity menu uses new menu system
git-svn-id: http://code.elgg.org/elgg/trunk@8622 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/river.php')
-rw-r--r--engine/lib/river.php57
1 files changed, 0 insertions, 57 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 6bc0645a9..3a351805e 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -506,61 +506,6 @@ function update_river_access_by_object($object_guid, $access_id) {
}
/**
- * Add the comment and like links to river actions menu
- */
-function elgg_river_add_menu_items($hook, $type, $return, $params) {
- if (elgg_is_logged_in()) {
- $item = $params['item'];
- $object = $item->getObjectEntity();
- // comments and non-objects cannot be commented on or liked
- if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
- // comments
- if ($object->canComment()) {
- $options = array(
- 'name' => 'comment',
- 'href' => "#comments-add-$object->guid",
- 'text' => elgg_echo('generic_comments:text'),
- 'class' => "elgg-toggler",
- 'priority' => 50,
- );
- $return[] = ElggMenuItem::factory($options);
- }
-
- // like this
- if ($object->canAnnotate(0, 'likes')) {
- if (!elgg_annotation_exists($object->getGUID(), 'likes')) {
- $url = "action/likes/add?guid={$object->getGUID()}";
- $options = array(
- 'name' => 'like',
- 'href' => $url,
- 'text' => elgg_echo('likes:likethis'),
- 'is_action' => true,
- 'priority' => 100,
- );
- } else {
- $likes = elgg_get_annotations(array(
- 'guid' => $guid,
- 'annotation_name' => 'likes',
- 'owner_guid' => elgg_get_logged_in_user_guid()
- ));
- $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}";
- $options = array(
- 'name' => 'like',
- 'href' => $url,
- 'text' => elgg_echo('likes:remove'),
- 'is_action' => true,
- 'priority' => 100,
- );
- }
- $return[] = ElggMenuItem::factory($options);
- }
- }
- }
-
- return $return;
-}
-
-/**
* Page handler for activiy
*
* @param array $page
@@ -589,8 +534,6 @@ function elgg_river_init() {
elgg_register_page_handler('activity', 'elgg_river_page_handler');
$item = new ElggMenuItem('activity', elgg_echo('activity'), 'pg/activity');
elgg_register_menu_item('site', $item);
-
- elgg_register_plugin_hook_handler('register', 'menu:river', 'elgg_river_add_menu_items');
}
elgg_register_event_handler('init', 'system', 'elgg_river_init');