- Patch #7466 by TDobes: comments module would add a link of register even if "user_register" was set to 0.

4.5.x
Dries Buytaert 2004-07-14 05:44:36 +00:00
parent 1c52b145ba
commit 9b49f01f11
2 changed files with 12 additions and 2 deletions

View File

@ -1608,7 +1608,12 @@ function theme_comment_post_forbidden() {
return t("you can't post comments");
}
else {
return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register')));
if (variable_get('user_register', 1)) {
return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register')));
}
else {
return t('<a href="%login">login</a> to post comments', array('%login' => url('user/login')));
}
}
}

View File

@ -1608,7 +1608,12 @@ function theme_comment_post_forbidden() {
return t("you can't post comments");
}
else {
return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register')));
if (variable_get('user_register', 1)) {
return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register')));
}
else {
return t('<a href="%login">login</a> to post comments', array('%login' => url('user/login')));
}
}
}