openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ad4be28244fb3bbb069ed1ae4916a380057020fd
parent 123bd55596c73ed36fd7d50053fdc1ffffa0eec3
Author: dankert <devnull@localhost>
Date:   Mon, 20 Dec 2004 23:03:57 +0100

neue Methode printUser()

Diffstat:
serviceClasses/Html.class.php | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/serviceClasses/Html.class.php b/serviceClasses/Html.class.php @@ -197,5 +197,19 @@ class Html echo 'document.forms[0].'.$name.'.focus();'."\n"; echo '//--></script>'."\n"; } + + + function printUser( $user ) + { + if ( empty($user->name) ) + $user->name = lang('GLOBAL_UNKNOWN'); + if ( empty($user->fullname) ) + $user->fullname = lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); + + if ( !empty($user->mail) ) + echo '<a href="mailto:'.$user->mail.'" title="'.$user->fullname.'">'.$user->name.'</a>'; + else + echo '<span title="'.$user->fullname.'"'.$user->name.'</span>'; + } } ?> \ No newline at end of file