issue48, make sure no pending comma is shown at the end of the available-tags
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 15 Jul 2007 15:10:42 +0000 (15:10 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 15 Jul 2007 15:10:42 +0000 (15:10 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@211 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index 265fa1d6c70b6e22d37695c09d1a461b469dfea9..2e491c5f4e4af4e2da07fa26ab98ded6faeb8c81 100644 (file)
@@ -367,6 +367,8 @@ class PHPFSPOT {
     */
    public function getAvailableTags()
    {
+      $output = "";
+
       $result = $this->db->db_query("
          SELECT tag_id as id, count(tag_id) as quantity
          FROM photo_tags
@@ -414,10 +416,13 @@ class PHPFSPOT {
           // uncomment if you want sizes in whole %:
          $size = ceil($size);
 
-         print "<a href=\"javascript:Tags('add', ". $key .");\" class=\"tag\" style=\"font-size: ". $size ."%;\">". $this->tags[$key] ."</a>, ";
+         $output.= "<a href=\"javascript:Tags('add', ". $key .");\" class=\"tag\" style=\"font-size: ". $size ."%;\">". $this->tags[$key] ."</a>, ";
 
       }
 
+      $output = substr($output, 0, strlen($output)-2);
+      print $output;
+
    } // getAvailableTags()
 
    /**