Permalink
Browse files

fix for 5916, when blogs disabled do not print link of blog in profile

  • Loading branch information...
1 parent d3d91e9 commit a73a0a6d8c80c0719903d79235ac2cfc1c6d5853 toyomoyo committed Jun 26, 2006
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/weblib.php
View
6 lib/weblib.php
@@ -2825,9 +2825,11 @@ function print_user($user, $course, $messageselect=false) {
}
echo '</div></td><td class="links">';
//link to blogs
+ if ($CFG->bloglevel > 0) {
+ echo '<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.get_string('blogs','blog').'</a><br />';
+ }
- echo '<a href="'.$CFG->wwwroot.'/blog/index.php?userid='.$user->id.'">'.get_string('blogs','blog').'</a><br />';
- if ($isteacher) {
+ if ($isteacher) {
$timemidnight = usergetmidnight(time());
echo '<a href="'. $CFG->wwwroot .'/course/user.php?id='. $course->id .'&amp;user='. $user->id .'">'. $string->activity .'</a><br />';
if (!iscreator($user->id) or ($isadmin and !isadmin($user->id))) { // Includes admins

0 comments on commit a73a0a6

Please sign in to comment.