diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 4 | ||||
-rw-r--r-- | engine/lib/navigation.php | 38 | ||||
-rw-r--r-- | engine/lib/upgrades/2010121702.php | 10 | ||||
-rw-r--r-- | engine/lib/views.php | 20 |
4 files changed, 1 insertions, 71 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 3cc4ddb1d..c97fa433c 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1795,7 +1795,7 @@ function elgg_walled_garden() { /** * Elgg's main init. * - * Handles core actions for comments and likes, the JS pagehandler, and the shutdown function. + * Handles core actions for comments, the JS pagehandler, and the shutdown function. * * @elgg_event_handler init system * @return void @@ -1805,8 +1805,6 @@ function elgg_init() { elgg_register_action('comments/add'); elgg_register_action('comments/delete'); - elgg_register_action('likes/add'); - elgg_register_action('likes/delete'); elgg_register_page_handler('js', 'js_page_handler'); elgg_register_page_handler('css', 'css_page_handler'); diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index b79156986..8c71de03a 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -226,35 +226,6 @@ function elgg_river_menu_setup($hook, $type, $return, $params) { ); $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); - } } } @@ -303,15 +274,6 @@ function elgg_entity_menu_setup($hook, $type, $return, $params) { $return[] = ElggMenuItem::factory($options); } - // likes - $options = array( - 'name' => 'likes', - 'text' => elgg_view_likes($entity), - 'href' => false, - 'priority' => 1000, - ); - $return[] = ElggMenuItem::factory($options); - return $return; } diff --git a/engine/lib/upgrades/2010121702.php b/engine/lib/upgrades/2010121702.php deleted file mode 100644 index 1c4a931b1..000000000 --- a/engine/lib/upgrades/2010121702.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * Change the location of the likes river view - */ - -$query = "UPDATE {$CONFIG->dbprefix}river - SET view='river/annotation/likes/create', action_type='create' - WHERE view='annotation/annotatelike' AND action_type='likes'"; -update_data($query); - diff --git a/engine/lib/views.php b/engine/lib/views.php index 09325c2c0..905458a9a 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1125,26 +1125,6 @@ function elgg_view_latest_comments($owner_guid, $type = 'object', $subtype = '', } /** - * Returns the HTML for "likes" on entities. - * - * @param ElggEntity $entity The entity to like - * - * @return string|false The HTML for the likes, or false on failure - * - * @since 1.8.0 - * @see @elgg_view core/likes/display - */ -function elgg_view_likes($entity) { - if (!($entity instanceof ElggEntity)) { - return false; - } - - $params = array('entity' => $entity); - - return elgg_view('core/likes/display', $params); -} - -/** * Wrapper function for the image block display pattern. * * Fixed width media on the side (image, icon, flash, etc.). |