Commit 91d11157 authored by Dries's avatar Dries

- Made a small improvement to format_name()
parent 2db432e3
......@@ -295,14 +295,21 @@ function format_date($timestamp, $type = "medium", $format = "") {
}
function format_name($object) {
global $PHP_SELF;
if ($object->uid && $object->name) {
return "<a href=\"module.php?mod=user&op=view&id=$object->uid\">$object->name</a>";
if (strstr($PHP_SELF, "admin.php")) {
$output = "<a href=\"admin.php?mod=user&op=edit&id=$object->uid\">$object->name</a>";
}
else {
$output = "<a href=\"module.php?mod=user&op=view&id=$object->uid\">$object->name</a>";
}
}
else {
return variable_get(anonymous, "Anonymous");
$output = variable_get(anonymous, "Anonymous");
}
return $output;
}
function format_email($address) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment