Only consider the current user's tags while auto completing, not
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 6 May 2009 15:50:55 +0000 (11:50 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 6 May 2009 15:50:55 +0000 (11:50 -0400)
the entire tag set.

kronolith/lib/Tagger.php

index 802d3a5..923f825 100644 (file)
@@ -181,17 +181,18 @@ class Kronolith_Tagger
     }
 
     /**
-     * Search for resources are tagged with all of the requested tags.
+     * Search for resources that are tagged with all of the requested tags.
      *
      * @param array $tags  An array of tag_names.
      */
-    public function search($tags, $content_type = null)
+    public function search($tags, $content_type = null, $userId = null)
     {
 
     }
 
     /**
-     * List tags beginning with $token.  Used for autocomplete code.
+     * List tags belonging to the current user beginning with $token.
+     * Used for autocomplete code.
      *
      * @param string $token  The token to match the start of the tag with.
      *
@@ -199,7 +200,7 @@ class Kronolith_Tagger
      */
     public function listTags($token)
     {
-        return self::$_tagger->getTags(array('q' => $token));
+        return self::$_tagger->getTags(array('q' => $token, 'userId' => Auth::getAuth()));
     }
 
     /**