- Made a small improvement to format_name()
parent
2db432e3d3
commit
91d1115768
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue