]> git.mjollnir.org Git - moodle.git/commitdiff
Fix tag documentation and add a missing 'return true'. (merge from 1.9)
authorscyrma <scyrma>
Wed, 30 Apr 2008 06:37:23 +0000 (06:37 +0000)
committerscyrma <scyrma>
Wed, 30 Apr 2008 06:37:23 +0000 (06:37 +0000)
tag/lib.php

index 9d91cee794dc74d0bf402819b74cbad24a2356b0..bc73d4ae4c94507a0b83ca94958ea3ee5c062e8c 100644 (file)
@@ -1,19 +1,12 @@
 <?php // $Id$
 
 /**
- * lib.php - moodle tag library
- *
- * @version: $Id$
- * @licence http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package moodlecore
- *
- * A "tag string" is always a rawurlencode'd string. This is the same behavior 
- * as http://del.icio.us
- * @see http://www.php.net/manual/en/function.urlencode.php
+ * Moodle tag library
  *
  * Tag strings : you can use any character in tags, except the comma (which is 
  * the separator) and the '\' (backslash).  Note that many spaces (or other 
- * blank characters) will get "compressed" into one.
+ * blank characters) will get "compressed" into one. A tag string is always a 
+ * rawurlencode'd string. This is the same behavior as http://del.icio.us.
  *
  * A "record" is a php array (note that an object will work too) that contains 
  * the following variables : 
  *
  * BASIC INSTRUCTIONS : 
  *  - to "tag a blog post" (for example): 
- *      tag_set('post', $blog_post->id, $array_of_tags);
+ *        tag_set('post', $blog_post->id, $array_of_tags);
  *
  *  - to "remove all the tags on a blog post":
- *      tag_set('post', $blog_post->id, array());
+ *        tag_set('post', $blog_post->id, array());
+ *
+ * Tag set will create tags that need to be created.
  *
- * Tag set will create tags that need to be created.  
+ * @version: $Id$
+ * @licence http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @package moodlecore
+ * @subpackage tag
+ * @see http://www.php.net/manual/en/function.urlencode.php
  */
 
 define('TAG_RETURN_ARRAY', 0);
@@ -533,6 +532,8 @@ function tag_delete_instance($record_type, $record_id, $tagid) {
     } else {
         return false;
     }
+
+    return true;
 }
 
 
@@ -594,14 +595,11 @@ function tag_find_records($tag, $type, $limitfrom='', $limitnum='') {
 /////////////////// PRIVATE TAG API ///////////////////
 
 /**
- * A * @param array $record the record that will be tagged
- * @param string $tags the comma-separated tags to set on the record. If 
- *     given an empty array, all tags will be removed.
-dds one or more tag in the database.  This function should not be called 
+ * Adds one or more tag in the database.  This function should not be called 
  * directly : you should use tag_set.
  *
  * @param mixed $tags one tag, or an array of tags, to be created
- * @param string $tag_type type of tag to be created ("default" is the default 
+ * @param string $type type of tag to be created ("default" is the default 
  *     value and "official" is the only other supported value at this time). An
  *     official tag is kept even if there are no records tagged with it.
  * @return an array of tags ids, indexed by their lowercase normalized names.