merge to 10219
This commit is contained in:
parent
ae28bf79c8
commit
4c1307e3d0
194 changed files with 8203 additions and 2134 deletions
|
|
@ -51,7 +51,7 @@ sub appendCommonVars {
|
|||
my $self = shift;
|
||||
my $var = shift;
|
||||
my $session = $self->session;
|
||||
my $user = $session->user;
|
||||
my $user = $self->getUser;
|
||||
|
||||
$var->{'user_full_name' } = $user->getWholeName;
|
||||
$var->{'user_member_since'} = $user->dateCreated;
|
||||
|
|
@ -242,7 +242,9 @@ sub editSettingsFormSave {
|
|||
|
||||
=head2 getLayoutTemplateId ( )
|
||||
|
||||
Override this method to return the template Id for the account layout.
|
||||
Override this method to return the template Id for the account layout. The default
|
||||
account layout draws a tabbed interface to the different account plugins, and displays
|
||||
the content from a particular screen from the account plugin.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -253,9 +255,10 @@ sub getLayoutTemplateId {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplate ( )
|
||||
=head2 getStyleTemplateId ( )
|
||||
|
||||
Override this method to return the template for the main style.
|
||||
Override this method to return the template for the main style. The style would
|
||||
be for the page that the account layout template is embedded in.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -278,8 +281,8 @@ the current module and do values will be used.
|
|||
|
||||
=head3 appendUID
|
||||
|
||||
If this flag is set and uid is passed along the url, the uid passed in will be
|
||||
appended to the end of it to the end of the url
|
||||
If this flag is set and uid is passed as a URL param, that uid will be
|
||||
appended to the end of the url.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -289,8 +292,8 @@ sub getUrl {
|
|||
my $appendUID = shift;
|
||||
|
||||
my $session = $self->session;
|
||||
my $form = $session->form;
|
||||
|
||||
my $uid = $self->uid;
|
||||
if($pairs) {
|
||||
#Append op=account to the url if it doesn't already exist
|
||||
unless ($pairs =~ m/op=account/){
|
||||
|
|
@ -301,7 +304,6 @@ sub getUrl {
|
|||
$pairs = q{op=account;module=}.$self->module.q{;do=}.$self->method;
|
||||
}
|
||||
|
||||
my $uid = $self->uid;
|
||||
$pairs .= ";uid=".$uid if($appendUID && $uid);
|
||||
|
||||
return $session->url->page($pairs);
|
||||
|
|
@ -309,6 +311,25 @@ sub getUrl {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getUser
|
||||
|
||||
Gets the user, either specified by the uid URL parameter, or the
|
||||
session user.
|
||||
|
||||
=cut
|
||||
|
||||
sub getUser {
|
||||
my $self = shift;
|
||||
if ($self->uid) {
|
||||
return WebGUI::User->new($self->session, $self->uid);
|
||||
}
|
||||
else {
|
||||
return $self->session->user;
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 new ( session, module [,method ,uid] )
|
||||
|
||||
Constructor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue