diff --git a/blog/tags.html b/blog/tags.html index c664b835770..a4c60cc186a 100755 --- a/blog/tags.html +++ b/blog/tags.html @@ -42,8 +42,14 @@ print_heading(get_string('tagmanagement')); prefix.'tags WHERE type=\'personal\' AND userid = '.$USER->id.' ORDER by text ASC'); - $ptags2 = get_records_sql('SELECT * from '.$CFG->prefix.'tags WHERE type=\'personal\' AND userid <> '.$USER->id.' ORDER by text ASC');; - $ptags = array_merge($ptags1, $ptags2); + $ptags2 = get_records_sql('SELECT * from '.$CFG->prefix.'tags WHERE type=\'personal\' AND userid <> '.$USER->id.' ORDER by text ASC'); + + if (!empty($ptags1)) { + $ptags = array_merge($ptags1, $ptags2); + } else { + $ptags = $ptags2; + } + foreach ($ptags as $ptag) { echo ''.$ptag->text.''; } diff --git a/blog/tags.php b/blog/tags.php index 7d559393942..1d909ea0f51 100755 --- a/blog/tags.php +++ b/blog/tags.php @@ -71,7 +71,7 @@ switch ($mode) { // you can only delete your own tags, or you have to be an admin if (!isadmin() and $USER->id != $blogtag->userid) { - notify('no right to delete'); + notify(get_string('norighttodeletetag','blog', $blogtag->text)); continue; }