summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-01 12:55:00 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-01 12:55:00 +0100
commit2c33b25c82ee1b2a5eaf4eb4f8839cc47bf8425e (patch)
treef5ffd18bf4178aba0cca6e26dd67aaf69532f598 /phpfspot.class.php
parent5bc350814a9426a89e8ab06728badad9430d4015 (diff)
added some comments
display "no tags selected" when nothing is selected. otherwise it looks like a bit kind of error when empty
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index eaa788a..edf3965 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -523,6 +523,7 @@ class PHPFSPOT {
*/
public function getAvailableTags()
{
+ /* retrive tags from database */
$this->get_tags();
$output = "";
@@ -566,10 +567,10 @@ class PHPFSPOT {
if(isset($_SESSION['selected_tags']) && in_array($key, $_SESSION['selected_tags']))
continue;
- // calculate CSS font-size
- // find the $value in excess of $min_qty
- // multiply by the font-size increment ($size)
- // and add the $min_size set above
+ // calculate CSS font-size
+ // find the $value in excess of $min_qty
+ // multiply by the font-size increment ($size)
+ // and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
$size = ceil($size);
@@ -594,9 +595,11 @@ class PHPFSPOT {
*/
public function getSelectedTags()
{
+ /* retrive tags from database */
$this->get_tags();
$output = "";
+
foreach($this->avail_tags as $tag)
{
// return all selected tags
@@ -605,8 +608,13 @@ class PHPFSPOT {
}
}
- $output = substr($output, 0, strlen($output)-2);
- print $output;
+ if($output != "") {
+ $output = substr($output, 0, strlen($output)-2);
+ return $output;
+ }
+ else {
+ return "no tags selected";
+ }
} // getSelectedTags()