Revision 238

Date:
2012/09/03 18:15:48
Author:
ahitrov
Revision Log:
Additional functions for name-field
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/users/lib/users/UserProfile.pm

     
    40 40 )
    41 41 }
    42 42
    43 sub name_full
    44 {
    45 my $self = shift;
    46 my $name = $self->name;
    47 if ( $name =~ /^(.*?),[\ \t]+(.*)$/ ) {
    48 $name = $2.' '.$1;
    49 }
    50 return $name;
    51 }
    52
    53 sub name_part
    54 {
    55 my $self = shift;
    56 my $name = $self->name;
    57 if ( $name =~ /^(.*?),[\ \t]+(.*)$/ ) {
    58 $name = $2;
    59 }
    60 return $name;
    61 }
    62
    63 sub name_family
    64 {
    65 my $self = shift;
    66 my $name = $self->name;
    67 if ( $name =~ /^(.*?),[\ \t]+(.*)$/ ) {
    68 $name = $1;
    69 }
    70 return $name;
    71 }
    72
    43 73 sub class_name
    44 74 {
    45 75 return 'Профиль пользователя';