issue38, removed pending comma on last selected-tag entry
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 10 Jul 2007 17:24:16 +0000 (17:24 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 10 Jul 2007 17:24:16 +0000 (17:24 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@184 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index 32c2df71cd647ec1fd3f1e6ef4c8f30eae234aba..3a6a59082a7c04e6943d18fb265fad8497f02fd2 100644 (file)
@@ -287,15 +287,18 @@ class PHPFSPOT {
 
    public function getSelectedTags()
    {
+      $output = "";
       foreach($this->avail_tags as $tag)
       {
          // return all selected tags
          if(isset($_SESSION['selected_tags']) && in_array($tag, $_SESSION['selected_tags'])) {
-            print "<a href=\"javascript:Tags('del', ". $tag .");\" class=\"tag\">". $this->tags[$tag] ."</a>, ";
+            $output.= "<a href=\"javascript:Tags('del', ". $tag .");\" class=\"tag\">". $this->tags[$tag] ."</a>, ";
          }
-
       }
 
+      $output = substr($output, 0, strlen($output)-2);
+      print $output;
+
    } // getSelectedTags()
 
    public function addTag($tag)