From 4a0daed7f6d1b5c5410e3d52979184ae490ad35b Mon Sep 17 00:00:00 2001 From: scyrma Date: Wed, 30 Apr 2008 06:37:23 +0000 Subject: [PATCH] Fix tag documentation and add a missing 'return true'. (merge from 1.9) --- tag/lib.php | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/tag/lib.php b/tag/lib.php index 9d91cee794..bc73d4ae4c 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -1,19 +1,12 @@ 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. -- 2.39.5