summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-29 15:47:35 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-29 15:47:35 -0400
commit575f70545171f6f5c94214ce88e5b07a1f517810 (patch)
tree1766ff8056e19c1bbeb1dc2b031ad40013269894
parentf26ed4626641d934eb8be8359bcc4aef03c97968 (diff)
if-else instead of ?:
darcs-hash:20080729194735-84dde-246582a47d4a384375d153bff0e724c778c4b3af.gz
-rw-r--r--actions/tag.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/actions/tag.php b/actions/tag.php
index 35d841f09..c0201d1a8 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -121,13 +121,21 @@ class TagAction extends StreamAction {
function show_tag($tag, $weight, $relative) {
# XXX: these should probably tune to the size of the site
- $cls = ($relative > 0.1) ? 'largest' :
- ($relative > 0.05) ? 'verylarge' :
- ($relative > 0.02) ? 'large' :
- ($relative > 0.01) ? 'medium' :
- ($relative > 0.005) ? 'small' :
- ($relative > 0.002) ? 'verysmall' :
- 'smallest';
+ if ($relative > 0.1) {
+ $cls = 'largest';
+ } else if ($relative > 0.05) {
+ $cls = 'verylarge';
+ } else if ($relative > 0.02) {
+ $cls = 'large';
+ } else if ($relative > 0.01) {
+ $cls = 'medium';
+ } else if ($relative > 0.005) {
+ $cls = 'small';
+ } else if ($relative > 0.002) {
+ $cls = 'verysmall';
+ } else {
+ $cls = 'smallest';
+ }
common_element('a', array('class' => "$cls weight-$weight relative-$relative",
'href' => common_local_url('tag', array('tag' => $tag))),