mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merged MDL-13725 Remove tag_get_tag_by_id completely. I also re-ordered tag/lib.php a bit
This commit is contained in:
parent
15234a92a1
commit
8479c2e0dd
6 changed files with 445 additions and 429 deletions
|
@ -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 ?
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue