Merged MDL-13725 Remove tag_get_tag_by_id completely. I also re-ordered tag/lib.php a bit

This commit is contained in:
moodler 2008-02-29 06:26:21 +00:00
parent 15234a92a1
commit 8479c2e0dd
6 changed files with 445 additions and 429 deletions

View file

@ -43,13 +43,13 @@ class block_tag_flickr extends block_base {
$tag = optional_param('tag', '', PARAM_TAG); // tag
if ($tag) {
$tag_object = tag_get_id($tag, TAG_RETURN_OBJECT);
} elseif (!$tag && $tagid) {
$tag_object = tag_get_tag_by_id($tagid);
} else {
// can't display the block if no tag was submitted!
// todo: something useful here.
error('Missing tag parameter');
$tag_object = tag_get('name', $tag);
} else if ($tagid) {
$tag_object = tag_get('id', $tagid);
}
if (empty($tag_object)) {
errorcode('tagnotfound');
}
//include related tags in the photo query ?

View file

@ -82,13 +82,13 @@ class block_tag_youtube extends block_base {
$tag = optional_param('tag', '', PARAM_TAG); // tag
if ($tag) {
$tag_object = tag_get_id($tag, TAG_RETURN_OBJECT);
} elseif (!$tag && $tagid) {
$tag_object = tag_get_tag_by_id($tagid);
} else {
// can't display the block if no tag was submitted!
// todo: something useful here.
error('Missing tag parameter');
$tag_object = tag_get('name', $tag);
} else if ($tagid) {
$tag_object = tag_get('id', $tagid);
}
if (empty($tag_object)) {
errorcode('tagnotfound');
}
$query_tag = html_entity_decode(tag_display_name($tag_object));
@ -114,13 +114,13 @@ class block_tag_youtube extends block_base {
$tag = optional_param('tag', '', PARAM_TAG); // tag
if ($tag) {
$tag_object = tag_get_id($tag, TAG_RETURN_OBJECT);
} elseif (!$tag && $tagid) {
$tag_object = tag_get_tag_by_id($tagid);
} else {
// can't display the block if no tag was submitted!
// todo: something useful here.
error('Missing tag parameter');
$tag_object = tag_get('name', $tag);
} else if ($tagid) {
$tag_object = tag_get('id', $tagid);
}
if (empty($tag_object)) {
errorcode('tagnotfound');
}
$query_tag = html_entity_decode(tag_display_name($tag_object));