summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-04 09:01:23 -1000
committerEvan Prodromou <evan@status.net>2010-01-04 09:01:23 -1000
commitb5e0f7d5725d4e106cf9f4b6383e0477a597fac6 (patch)
tree9b004ebacec1b71f724ce9c89e2d1c0fc362024a /actions
parent5a1ea0b9b28138bc4e06d96e2910b0cf3be1eab2 (diff)
parente3466ab51cf68bd62ecd914a3771ed33de824e52 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/newnotice.php2
-rw-r--r--actions/publictagcloud.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 8d89e9da0..a4ed87bb6 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -184,7 +184,7 @@ class NewnoticeAction extends Action
$options = array('reply_to' => ($replyto == 'false') ? null : $replyto);
- if ($user->shareLocation() && $this->arg('notice_data-location_enabled')) {
+ if ($user->shareLocation() && $this->arg('notice_data-geo')) {
$locOptions = Notice::locationOptions($this->trimmed('lat'),
$this->trimmed('lon'),
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php
index e7f6ee36c..5c7074029 100644
--- a/actions/publictagcloud.php
+++ b/actions/publictagcloud.php
@@ -136,7 +136,12 @@ class PublictagcloudAction extends Action
$this->elementStart('dd');
$this->elementStart('ul', 'tags xoxo tag-cloud');
foreach ($tw as $tag => $weight) {
- $this->showTag($tag, $weight, $weight/$sum);
+ if ($sum) {
+ $weightedSum = $weight/$sum;
+ } else {
+ $weightedSum = 1;
+ }
+ $this->showTag($tag, $weight, $weightedSum);
}
$this->elementEnd('ul');
$this->elementEnd('dd');