summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-26 05:20:47 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-26 05:20:47 +0000
commite31456af47ce19d63976e41244b7e48e26c3add9 (patch)
tree7520536c3074b6b8585da34c829e8ef74fcf1cb4
parent03bf3a6af26a5311ab0411616911c443332a8821 (diff)
Remove stray 'filter' instances
-rw-r--r--modules/tag/helpers/tag.php16
-rw-r--r--modules/tag/helpers/tag_block.php5
-rw-r--r--modules/tag/views/tag_block.html.php2
3 files changed, 10 insertions, 13 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 4e3c0643..2ff73e62 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -19,7 +19,7 @@
*/
class tag_Core {
public static $NUMBER_OF_BUCKETS = 7;
-
+
/**
* Associate a tag with an item. Create the tag if it doesn't already exist.
*
@@ -51,14 +51,12 @@ class tag_Core {
}
/**
- * Assign a css class to the tags based on frequency of use. Optionally, allow a filter value
- * which allows for adjusting the granularity of the cloud by ignoring any frequencies below
- * the specified value. This code is based on the code from: http://www.hawkee.com/snippet/1485/
+ * Assign a css class to the tags based on frequency of use. This code is based on the code
+ * from: http://www.hawkee.com/snippet/1485/
*
- * @param int $filter Minimum frequency to be included in the tag cloud
* @return array List of tags each entry has the following format:
- * array("id" => "tag_id", "name" => "tag_name", "count" => "frequency",
- * "class" => "bucket")
+ * array("id" => "tag_id", "name" => "tag_name", "count" => "frequency",
+ * "class" => "bucket")
*/
public static function load_buckets() {
$tag_list = array();
@@ -77,14 +75,14 @@ class tag_Core {
$bucket_count < self::$NUMBER_OF_BUCKETS) {
$bucket_count++;
$bucket_items = 0;
-
+
// Calculate a new minimum number if tags for the remaining classes.
$remaining_tags = count($tags) - $tags_set;
$min_tags = $remaining_tags / self::$NUMBER_OF_BUCKETS;
}
// Set the tag to the current class
- $tag_list[$key] = array("id" => $tag->id, "name" => $tag->name, "count" => $tag->count,
+ $tag_list[$key] = array("id" => $tag->id, "name" => $tag->name, "count" => $tag->count,
"class" => "$bucket_count");
$bucket_items++;
$tags_set++;
diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php
index 6adf5ca6..629008b6 100644
--- a/modules/tag/helpers/tag_block.php
+++ b/modules/tag/helpers/tag_block.php
@@ -19,13 +19,12 @@
*/
class tag_block_Core {
- public static function sidebar_blocks($theme, $filter=1) {
+ public static function sidebar_blocks($theme) {
$block = new Block();
$block->id = "gTag";
$block->title = _("Tags");
$block->content = new View("tag_block.html");
- $block->content->tag_list = tag::load_buckets($filter);
- $block->content->filter = $filter;
+ $block->content->tag_list = tag::load_buckets();
return $block;
}
} \ No newline at end of file
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index 485c6d20..a949182b 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -3,7 +3,7 @@
<? foreach ($tag_list as $tag): ?>
<li class="size<?=$tag["class"] ?>">
<span><?= $tag["count"] ?> photos are tagged with </span>
- <a href="<?=url::site("/tag/{$tag["id"]}?filter=$filter") ?>"><?=$tag["name"] ?></a>
+ <a href="<?=url::site("/tag/{$tag["id"]}") ?>"><?=$tag["name"] ?></a>
</li>
<? endforeach; ?>
</ul>