]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
removed deprecated tag library calls
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 21 Nov 2010 13:21:44 +0000 (13:21 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 21 Nov 2010 13:21:44 +0000 (13:21 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7397 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/tags.php
mod/blog/views/default/blog/sidebar_menu.php
mod/file/start.php
mod/tagcloud/tagcloud.php
mod/tagcloud/views/default/widgets/tagcloud/view.php

index d5010118a00adc95b0a72cb14dda7a315bb1bcd1..9e81f4601c0e8829e0009d09984a747bd517eb1e 100644 (file)
@@ -144,10 +144,9 @@ function elgg_get_tags(array $options = array()) {
 
        $options = array_merge($defaults, $options);
 
-       $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid');
+       $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid', 'tag_name');
        $options = elgg_normalise_plural_options_array($options, $singulars);
 
-
        $registered_tags = elgg_get_registered_tag_metadata_names();
 
        if (!is_array($options['tag_names'])) {
@@ -369,7 +368,7 @@ function elgg_view_tagcloud(array $options = array()) {
 function display_tagcloud($threshold = 1, $limit = 10, $metadata_name = "", $entity_type = "object",
 $entity_subtype = "", $owner_guid = "", $site_guid = -1, $start_ts = "", $end_ts = "") {
 
-       elgg_deprecated_notice('display_cloud() was deprecated by elgg_view_tagcloud()!', 1.8);
+       elgg_deprecated_notice('display_tagcloud() was deprecated by elgg_view_tagcloud()!', 1.8);
 
        $tags = get_tags($threshold, $limit, $metadata_name, $entity_type,
                $entity_subtype, $owner_guid, $site_guid, $start_ts, $end_ts);
@@ -433,12 +432,15 @@ register_page_handler('tags', 'elgg_tagcloud_page_handler');
  * @return void
  */
 function elgg_tagcloud_page_handler($page) {
-       global $CONFIG;
-
        switch ($page[0]) {
                default:
                        $title = elgg_view_title(elgg_echo('tags:site_cloud'));
-                       $tags = display_tagcloud(0, 100, 'tags');
+                       $options = array(
+                               'threshold' => 0,
+                               'limit' => 100,
+                               'tag_name' => 'tags',
+                       );
+                       $tags = elgg_view_tagcloud($options);
                        $content = $title . $tags;
                        $body = elgg_view_layout('one_column_with_sidebar', array('content' => $content));
 
index 120237ac5e3ebdf567894d83800571fbd1cc1ca5..87b0a8cf9ab3fbd6f3e139e6690fea7026a68c65 100644 (file)
@@ -59,7 +59,22 @@ if ($page_owner) {
 
        // friends page lists all tags; mine lists owner's
        $owner_guid = ($vars['page'] == 'friends') ? '' : $page_owner->getGUID();
-       echo display_tagcloud(0, 50, 'tags', 'object', 'blog', $owner_guid);
+       $options = array(
+               'type' => 'object',
+               'subtype' => 'blog',
+               'owner_guid' => $owner_guid,
+               'threshold' => 0,
+               'limit' => 50,
+               'tag_name' => 'tags',
+       );
+       echo elgg_view_tagcloud($options);
 } else {
-       echo display_tagcloud(0, 50, 'tags', 'object', 'blog');
+       $options = array(
+               'type' => 'object',
+               'subtype' => 'blog',
+               'threshold' => 0,
+               'limit' => 50,
+               'tag_name' => 'tags',
+       );
+       echo elgg_view_tagcloud($options);
 }
index 78790d034f9dcba472beaff1452be4c1c57ba7db..10fbff27e98d2173d3061227dfe72bd0bd15ac70 100644 (file)
                }
 
                elgg_register_tag_metadata_name('simpletype');
-               $types = get_tags(0,10,'simpletype','object','file',$owner_guid);
+               $options = array(
+                       'type' => 'object',
+                       'subtype' => 'file',
+                       'owner_guid' => $owner_guid,
+                       'threshold' => 0,
+                       'limit' => 10,
+                       'tag_names' => array('simpletype')
+               );
+               $types = elgg_get_tags($options);
 
                return elgg_view('file/typecloud',array('owner_guid' => $owner_guid, 'friend_guid' => $friendofguid, 'types' => $types));
        }
index f5554ccba0f94e40be4833177e36811d2b05d836..ecbfc130c4b8694d172d6f0e4b88ad5a4cd1770d 100644 (file)
@@ -7,7 +7,13 @@
 require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
 
 $title = elgg_view_title(elgg_echo('tagcloud:site:title'));
-$tags = display_tagcloud(0, 100, 'tags');
+
+$options = array(
+       'threshold' => 0,
+       'limit' => 100,
+       'tag_name' => 'tags',
+);
+$tags = elgg_view_tagcloud($options);
 
 $params = array(
        'content' => $title . $tags,
index 662c02d97bc4af4b7827012ce311669924805910..5ed71d66a758f1b27cff239becfe55651fb370f9 100644 (file)
@@ -5,4 +5,10 @@ if (!isset($num_items)) {
        $num_items = 30;
 }
 
-echo display_tagcloud(1, $num_items, 'tags', '', '', elgg_get_page_owner_guid());
+$options = array(
+       'owner_guid' => elgg_get_page_owner_guid(),
+       'threshold' => 1,
+       'limit' => $num_items,
+       'tag_name' => 'tags',
+);
+echo elgg_view_tagcloud($options);