lots o fixes
This commit is contained in:
parent
81a26c6d18
commit
fa5439b099
16 changed files with 77 additions and 75 deletions
|
|
@ -370,7 +370,8 @@ sub getAssetAdderLinks {
|
|||
foreach my $class (@{$self->session->config->get($type)}) {
|
||||
next unless $class;
|
||||
my %properties = (
|
||||
className=>$class
|
||||
className=>$class,
|
||||
dummy=>1
|
||||
);
|
||||
my $newAsset = WebGUI::Asset->newByPropertyHashRef($self->session,\%properties);
|
||||
next unless $newAsset;
|
||||
|
|
@ -1416,7 +1417,7 @@ Returns "".
|
|||
|
||||
sub view {
|
||||
my $self = shift;
|
||||
$self->session->http->setRedirect($self->getDefault->getUrl) if ($self->getId eq "PBasset000000000000001");
|
||||
$self->session->http->setRedirect($self->getDefault($self->session)->getUrl) if ($self->getId eq "PBasset000000000000001");
|
||||
return $self->getToolbar if ($self->session->var->get("adminOn"));
|
||||
return undef;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ sub getFileIconUrl {
|
|||
sub getIcon {
|
||||
my $self = shift;
|
||||
my $small = shift;
|
||||
if ($small && ref($self) eq '') {
|
||||
if ($small && $self->get("dummy")) {
|
||||
return $self->session->config->get("extrasURL").'/assets/small/file.gif';
|
||||
} elsif ($small) {
|
||||
return $self->getFileIconUrl;
|
||||
|
|
@ -267,6 +267,7 @@ We override the update method from WebGUI::Asset in order to handle file system
|
|||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
use WebGUI; WebGUI::dumpSession("foo");
|
||||
my %before = (
|
||||
owner => $self->get("ownerUserId"),
|
||||
view => $self->get("groupIdView"),
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ Password entered by the user. This is only used in for sending the user a notif
|
|||
|
||||
=head3 profile
|
||||
|
||||
Hashref of profile values returned by the function WebGUI::Operation::Profile::validateProfileData()
|
||||
Hashref of profile values returned by the function WebGUI::Operation::Profile::validateProfileData($self->session)
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ sub createAccountSave {
|
|||
#Check that username is valid and not a duplicate in the system.
|
||||
$error .= $self->error if(!$self->validUsername($username));
|
||||
#Validate profile data.
|
||||
my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData();
|
||||
my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData($self->session);
|
||||
$error .= $temp;
|
||||
return $self->createAccount("<h1>".$i18n->get(70)."</h1>".$error) unless ($error eq "");
|
||||
#If Email address is not unique, a warning is displayed
|
||||
|
|
@ -312,7 +312,7 @@ sub displayAccount {
|
|||
$vars->{'account.form.karma'} = $self->session->user->profileField("karma");
|
||||
$vars->{'account.form.karma.label'} = $i18n->get(537);
|
||||
}
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions($self->session);
|
||||
return WebGUI::Asset::Template->new($self->session,$self->getAccountTemplateId)->process($vars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ sub toHtml {
|
|||
}
|
||||
$options{$type} = $class->getName($self->session);
|
||||
}
|
||||
$self->get('options') = \%options;
|
||||
$self->set('options',\%options);
|
||||
|
||||
return $self->SUPER::toHtml();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ sub www_addUsersToGroupSave {
|
|||
sub www_autoAddToGroup {
|
||||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return WebGUI::AdminConsole->new($session,"groups")->render($session->privilege->insufficient()) unless ($session->user->userId ne 1);
|
||||
my $group = WebGUI::Group->new($session->form->process("groupId"));
|
||||
my $group = WebGUI::Group->new($session,$session->form->process("groupId"));
|
||||
if ($group->autoAdd) {
|
||||
$group->addUsers([$session->user->userId],[$session->form->process("groupId")]);
|
||||
}
|
||||
|
|
@ -190,7 +190,7 @@ sub www_autoAddToGroup {
|
|||
sub www_autoDeleteFromGroup {
|
||||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return WebGUI::AdminConsole->new($session,"groups")->render($session->privilege->insufficient()) unless ($session->user->userId ne 1);
|
||||
my $group = WebGUI::Group->new($session->form->process("groupId"));
|
||||
my $group = WebGUI::Group->new($session,$session->form->process("groupId"));
|
||||
if ($group->autoDelete) {
|
||||
$group->deleteUsers([$session->user->userId],[$session->form->process("groupId")]);
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ sub www_deleteGroupConfirm {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3) || _hasSecondaryPrivilege($session,$session->form->process("gid")));
|
||||
return $session->privilege->vitalComponent() if (isIn($session->form->process("gid"), qw(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17)));
|
||||
my $g = WebGUI::Group->new($session->form->process("gid"));
|
||||
my $g = WebGUI::Group->new($session,$session->form->process("gid"));
|
||||
$g->delete;
|
||||
return www_listGroups();
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ sub www_editGroup {
|
|||
if ($session->form->process("gid") eq "new") {
|
||||
$g = WebGUI::Group->new($session,"");
|
||||
} else {
|
||||
$g = WebGUI::Group->new($session->form->process("gid"));
|
||||
$g = WebGUI::Group->new($session,$session->form->process("gid"));
|
||||
}
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
$f = WebGUI::HTMLForm->new($session);
|
||||
|
|
@ -450,8 +450,8 @@ sub www_editGrouping {
|
|||
-name => "gid",
|
||||
-value => $session->form->process("gid")
|
||||
);
|
||||
my $u = WebGUI::User->new($session->form->process("uid"));
|
||||
my $g = WebGUI::Group->new($session->form->process("gid"));
|
||||
my $u = WebGUI::User->new($session,$session->form->process("uid"));
|
||||
my $g = WebGUI::Group->new($session,$session->form->process("gid"));
|
||||
$f->readOnly(
|
||||
-value => $u->username,
|
||||
-label => $i18n->get(50),
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ sub _get {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
my $id = shift;
|
||||
my $namespace = shift;
|
||||
my $help = _load($namespace);
|
||||
my $help = _load($session,$namespace);
|
||||
if (keys %{ $help } ) {
|
||||
return $help->{$id};
|
||||
}
|
||||
|
|
@ -113,10 +113,10 @@ sub www_viewHelp {
|
|||
my $ac = WebGUI::AdminConsole->new($session,"help");
|
||||
my $namespace = $session->form->process("namespace") || "WebGUI";
|
||||
my $i18n = WebGUI::International->new($session, $namespace);
|
||||
my $help = _get($session->form->process("hid"),$namespace);
|
||||
my $help = _get($session,$session->form->process("hid"),$namespace);
|
||||
my @related = _related($session, $help->{related});
|
||||
foreach my $row (@related) {
|
||||
my $relatedHelp = _get($row->{tag},$row->{namespace});
|
||||
my $relatedHelp = _get($session,$row->{tag},$row->{namespace});
|
||||
$ac->addSubmenuItem(_link($row->{tag},$row->{namespace}),$i18n->get($relatedHelp->{title},$row->{namespace}));
|
||||
}
|
||||
my %vars;
|
||||
|
|
@ -143,10 +143,10 @@ sub www_viewHelpIndex {
|
|||
my $i18n = WebGUI::International->new($session);
|
||||
my @helpIndex;
|
||||
my $i;
|
||||
my @files = _getHelpFilesList();
|
||||
my @files = _getHelpFilesList($session,);
|
||||
foreach my $fileSet (@files) {
|
||||
my $namespace = $fileSet->[1];
|
||||
my $help = _load($namespace);
|
||||
my $help = _load($session,$namespace);
|
||||
foreach my $key (keys %{$help}) {
|
||||
push @helpIndex, [$namespace, $key,
|
||||
$i18n->get($help->{$key}{title},$namespace)];
|
||||
|
|
@ -177,12 +177,12 @@ sub www_viewHelpTOC {
|
|||
return $session->privilege->insufficient() unless ($session->user->isInGroup(7));
|
||||
my @helpIndex;
|
||||
my $i;
|
||||
my @files = _getHelpFilesList();
|
||||
my @files = _getHelpFilesList($session,);
|
||||
my $third = round(@files/3 + 0.50);
|
||||
my @entries;
|
||||
foreach my $fileSet (@files) {
|
||||
my $file = $fileSet->[1];
|
||||
push @entries, [_getHelpName($file), $file];
|
||||
push @entries, [_getHelpName($session,$file), $file];
|
||||
}
|
||||
$i = 0;
|
||||
my $output = '<table width="100%" class="content"><tr><td valign="top">';
|
||||
|
|
@ -207,7 +207,7 @@ sub www_viewHelpChapter {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->insufficient() unless ($session->user->isInGroup(7));
|
||||
my $namespace = $session->form->process("namespace");
|
||||
my $help = _load($namespace);
|
||||
my $help = _load($session,$namespace);
|
||||
my @entries = sort keys %{ $help };
|
||||
my $output = '';
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
|
|
@ -217,7 +217,7 @@ sub www_viewHelpChapter {
|
|||
my $ac = WebGUI::AdminConsole->new($session,"help");
|
||||
$ac->addSubmenuItem($session->url->page('op=viewHelpIndex'),$i18n->get(95));
|
||||
$ac->addSubmenuItem($session->url->page('op=viewHelpTOC'),$i18n->get('help contents'));
|
||||
return $ac->render($output, join ': ',$i18n->get(93), _getHelpName($namespace));
|
||||
return $ac->render($output, join ': ',$i18n->get(93), _getHelpName($session,$namespace));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ sub www_editLDAPLink {
|
|||
|
||||
$f->submit;
|
||||
$output .= $f->print;
|
||||
return _submenu($output,"LDAPLink_990","ldap connection add/edit");
|
||||
return _submenu($session,$output,"LDAPLink_990","ldap connection add/edit");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -246,7 +246,7 @@ sub www_listLDAPLinks {
|
|||
$output .= $p->getPage;
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional;
|
||||
return _submenu($output,"ldap connection links manage");
|
||||
return _submenu($session,$output,"ldap connection links manage");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ sub www_viewMessageLog {
|
|||
foreach my $message (@$messages) {
|
||||
my $hash;
|
||||
$hash->{'message.subject'} = '<a href="'.$session->url->page('op=viewMessageLogMessage;mlog='.$message->{messageLogId}).'">'.$message->{subject}.'</a>';
|
||||
my $status = _status->{$message->{status}};
|
||||
my $status = _status($session)->{$message->{status}};
|
||||
$status = '<a href="'.$session->url->append($message->{url},'mlog='.$message->{messageLogId}).'">'.$status.'</a>' if ($message->{url} ne "");
|
||||
$hash->{'message.status'} = $status;
|
||||
$hash->{'message.dateOfEntry'} =$session->datetime->epochToHuman($message->{dateOfEntry});
|
||||
|
|
@ -85,9 +85,9 @@ sub www_viewMessageLog {
|
|||
$vars->{'message.pageList'} = $p->getPageLinks;
|
||||
$vars->{'message.previousPage'} = $p->getPreviousPageLink;
|
||||
$vars->{'message.multiplePages'} = ($p->getNumberOfPages > 1);
|
||||
$vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions();
|
||||
$vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions($session);
|
||||
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000050")->process($vars));
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000050")->process($vars));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -110,7 +110,7 @@ sub www_viewMessageLogMessage {
|
|||
$vars->{'message.subject'} = $data->{subject};
|
||||
$vars->{'message.dateOfEntry'} =$session->datetime->epochToHuman($data->{dateOfEntry});
|
||||
|
||||
my $status = _status->{$data->{status}};
|
||||
my $status = _status($session)->{$data->{status}};
|
||||
if ($data->{url} ne "" && $data->{status} eq 'pending'){
|
||||
$status = '<a href="'.$session->url->append($data->{url},'mlog='.$data->{messageLogId}).'">'.$status.'</a>';
|
||||
$vars->{'message.takeAction'} = '<a href="'.$session->url->append($data->{url},'mlog='.$data->{messageLogId}).'">'.$i18n->get(554).'</a>'
|
||||
|
|
@ -122,8 +122,8 @@ sub www_viewMessageLogMessage {
|
|||
}
|
||||
|
||||
$vars->{'message.text'} = $data->{message};
|
||||
$vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000049")->process($vars));
|
||||
$vars->{'message.accountOptions'} = WebGUI::Operation::Shared::accountOptions($session);
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000049")->process($vars));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ sub www_editProduct {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit product', 'edit product', 'ProductManager');
|
||||
return _submenu($session,$f->print, 'edit product', 'edit product', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -222,7 +222,7 @@ sub www_editProductParameter {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit parameter', 'edit parameter', 'ProductManager');
|
||||
return _submenu($session,$f->print, 'edit parameter', 'edit parameter', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -325,7 +325,7 @@ sub www_editProductParameterOption {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit option', 'edit option', 'ProductManager');
|
||||
return _submenu($session,$f->print, 'edit option', 'edit option', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -406,7 +406,7 @@ sub www_editProductVariant {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit variant', 'edit variant', 'ProductManager');
|
||||
return _submenu($session,$f->print, 'edit variant', 'edit variant', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -458,7 +458,7 @@ sub www_editSkuTemplate {
|
|||
$f->submit;
|
||||
$output .= $f->print;
|
||||
|
||||
return _submenu($output, 'edit sku composition label', 'edit sku template', 'ProductManager');
|
||||
return _submenu($session,$output, 'edit sku composition label', 'edit sku template', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -500,7 +500,7 @@ sub www_listProducts {
|
|||
}
|
||||
$output .= '</table>';
|
||||
|
||||
return _submenu($output, 'list products', 'list products', 'ProductManager');
|
||||
return _submenu($session,$output, 'list products', 'list products', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -563,7 +563,7 @@ sub www_listProductVariants {
|
|||
$output .= WebGUI::Form::submit($session,);
|
||||
$output .= WebGUI::Form::formFooter($session,);
|
||||
|
||||
return _submenu($output, 'list variants label', 'list variants', 'ProductManager');
|
||||
return _submenu($session,$output, 'list variants label', 'list variants', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -629,7 +629,7 @@ sub www_manageProduct {
|
|||
$output .= '<br />';
|
||||
}
|
||||
|
||||
return _submenu($output, 'manage product', 'manage product', 'ProductManager');
|
||||
return _submenu($session,$output, 'manage product', 'manage product', 'ProductManager');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ sub www_editProfile {
|
|||
}
|
||||
$vars->{'profile.form.elements'} = \@array;
|
||||
$vars->{'profile.form.submit'} = WebGUI::Form::submit($session,{});
|
||||
$vars->{'profile.accountOptions'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000051")->process($vars));
|
||||
$vars->{'profile.accountOptions'} = WebGUI::Operation::Shared::accountOptions($session);
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000051")->process($vars));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -139,7 +139,7 @@ sub www_editProfileSave {
|
|||
|
||||
return www_editProfile('<ul>'.$error.'</ul>') if($error ne "");
|
||||
|
||||
$u = WebGUI::User->new($session->user->userId);
|
||||
$u = WebGUI::User->new($session,$session->user->userId);
|
||||
foreach $fieldName (keys %{$profile}) {
|
||||
$u->profileField($fieldName,$profile->{$fieldName});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ sub www_deleteProfileCategoryConfirm {
|
|||
my $category = WebGUI::ProfileCategory->new($session,$session->form->process("cid"));
|
||||
return WebGUI::AdminConsole->new($session,"userProfiling")->render($session->privilege->vitalComponent()) if ($category->isProtected);
|
||||
$category->delete;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -63,7 +63,7 @@ sub www_deleteProfileFieldConfirm {
|
|||
my $field = WebGUI::ProfileField->new($session,$session->form->process("fid"));
|
||||
return WebGUI::AdminConsole->new($session,"userProfiling")->render($session->privilege->vitalComponent()) if ($field->isProtected);
|
||||
$field->delete;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -84,6 +84,7 @@ sub www_editProfileCategory {
|
|||
);
|
||||
$f->readOnly(
|
||||
-name => $session->form->process("cid"),
|
||||
-value => $session->form->process("cid"),
|
||||
-label => $i18n->get(469),
|
||||
);
|
||||
$data = WebGUI::ProfileCategory->new($session,$session->form->process("cid"))->get;
|
||||
|
|
@ -112,7 +113,7 @@ sub www_editProfileCategory {
|
|||
-hoverHelp=>$i18n->get('897 description'),
|
||||
);
|
||||
$f->submit;
|
||||
return _submenu($f->print,'468','user profile category add/edit','WebGUIProfile');
|
||||
return _submenu($session,$f->print,'468','user profile category add/edit','WebGUIProfile');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -126,11 +127,10 @@ sub www_editProfileCategorySave {
|
|||
);
|
||||
if ($session->form->process("cid") eq "new") {
|
||||
my $category = WebGUI::ProfileCategory->create($session,\%data);
|
||||
$session->form->process("cid") = $category->getId;
|
||||
} else {
|
||||
WebGUI::ProfileCategory->new($session,$session->form->process("cid"))->set(\%data);
|
||||
}
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -198,15 +198,15 @@ sub www_editProfileField {
|
|||
-defaultValue=>"Text",
|
||||
);
|
||||
my @profileForms = ();
|
||||
foreach my $form ( sort @{ $fieldType->{types} }) {
|
||||
foreach my $form ( sort @{ $fieldType->get("types") }) {
|
||||
next if $form eq 'DynamicField';
|
||||
my $cmd = join '::', 'WebGUI::Form', $form;
|
||||
eval "use $cmd";
|
||||
my $w = eval "$cmd->new($session);";
|
||||
push @profileForms, $form if $w->{profileEnabled};
|
||||
my $w = eval {"$cmd"->new($session)};
|
||||
push @profileForms, $form if $w->get("profileEnabled");
|
||||
}
|
||||
|
||||
$fieldType->{types} = \@profileForms;
|
||||
$fieldType->set("types", \@profileForms);
|
||||
$f->raw($fieldType->toHtmlWithWrapper());
|
||||
$f->textarea(
|
||||
-name => "possibleValues",
|
||||
|
|
@ -232,7 +232,7 @@ sub www_editProfileField {
|
|||
-value=>$data->{profileCategoryId}
|
||||
);
|
||||
$f->submit;
|
||||
return _submenu($f->print,'471','profile settings edit',"WebGUIProfile");
|
||||
return _submenu($session,$f->print,'471','profile settings edit',"WebGUIProfile");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -251,13 +251,13 @@ sub www_editProfileFieldSave {
|
|||
my $categoryId = $session->form->selectBox("profileCategoryId");
|
||||
if ($session->form->process("new")) {
|
||||
my $field = WebGUI::ProfileField->create($session,$session->form->text("fid"), \%data, $categoryId);
|
||||
$session->form->process("fid") = $field->getId;
|
||||
$session->stow->set("editSavedFid",$field->getId);
|
||||
} else {
|
||||
my $field = WebGUI::ProfileField->new($session,$session->form->process("fid"));
|
||||
my $field = WebGUI::ProfileField->new($session,$session->stow->get("editSavedFid"));
|
||||
$field->set(\%data);
|
||||
$field->setCategory($categoryId);
|
||||
}
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -282,7 +282,7 @@ sub www_editProfileSettings {
|
|||
$output .= ' '.$field->getLabel.'<br />';
|
||||
}
|
||||
}
|
||||
return _submenu($output,undef,"profile settings edit",'WebGUIProfile');
|
||||
return _submenu($session,$output,undef,"profile settings edit",'WebGUIProfile');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -290,7 +290,7 @@ sub www_moveProfileCategoryDown {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
WebGUI::ProfileCategory->new($session,$session->form->process("cid"))->moveDown;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -298,7 +298,7 @@ sub www_moveProfileCategoryUp {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
WebGUI::ProfileCategory->new($session,$session->form->process("cid"))->moveUp;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -306,7 +306,7 @@ sub www_moveProfileFieldDown {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
WebGUI::ProfileField->new($session,$session->form->process("fid"))->moveDown;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -314,7 +314,7 @@ sub www_moveProfileFieldUp {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
WebGUI::ProfileField->new($session,$session->form->process("fid"))->moveUp;
|
||||
return www_editProfileSettings();
|
||||
return www_editProfileSettings($session);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ sub www_editReplacement {
|
|||
-value=>$data->{replaceWith}
|
||||
);
|
||||
$f->submit;
|
||||
return _submenu($f->print,"1052",'replacements edit');
|
||||
return _submenu($session,$f->print,"1052",'replacements edit');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -107,7 +107,7 @@ sub www_listReplacements {
|
|||
}
|
||||
$sth->finish;
|
||||
$output .= '</table>';
|
||||
return _submenu($output);
|
||||
return _submenu($session,$output);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ sub www_createSubscriptionCodeBatch {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($errorMessage.$f->print, 'create batch menu', 'create batch');
|
||||
return _submenu($session,$errorMessage.$f->print, 'create batch menu', 'create batch');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -131,8 +131,8 @@ sub www_createSubscriptionCodeBatchSave {
|
|||
$session->db->quote($batchId).", ".$session->db->quote($description).")");
|
||||
|
||||
for ($currentCode=0; $currentCode < $numberOfCodes; $currentCode++) {
|
||||
$code = _generateCode($session->form->process("codeLength"));
|
||||
$code = _generateCode($session->form->process("codeLength")) while ($session->db->quickArray("select code from subscriptionCode where code=".$session->db->quote($code)));
|
||||
$code = _generateCode($session,$session->form->process("codeLength"));
|
||||
$code = _generateCode($session,$session->form->process("codeLength")) while ($session->db->quickArray("select code from subscriptionCode where code=".$session->db->quote($code)));
|
||||
|
||||
$session->db->write("insert into subscriptionCode (batchId, code, status, dateCreated, dateUsed, expires, usedBy)".
|
||||
" values (".$session->db->quote($batchId).",".$session->db->quote($code).", 'Unused', ".$session->db->quote($creationEpoch).", 0, ".$session->db->quote($expires).", 0)");
|
||||
|
|
@ -256,7 +256,7 @@ sub www_editSubscription {
|
|||
}
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit subscription title', 'subscription add/edit');
|
||||
return _submenu($session,$f->print, 'edit subscription title', 'subscription add/edit');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -297,7 +297,7 @@ sub www_listSubscriptionCodeBatches {
|
|||
|
||||
$output = $i18n->get('no subscription code batches') unless (@{$batches});
|
||||
|
||||
return _submenu($output, 'manage batches', 'manage batch');
|
||||
return _submenu($session,$output, 'manage batches', 'manage batch');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -350,7 +350,7 @@ sub www_listSubscriptionCodes {
|
|||
$ops = ';bid='.$session->form->process("bid").';selection=b';
|
||||
$delete = '<a href="'.$session->url->page('op=deleteSubscriptionCodeBatch'.$ops).'">'.$i18n->get('delete codes').'</a>';
|
||||
} else {
|
||||
return _submenu($output, 'listSubscriptionCodes title', 'subscription codes manage');
|
||||
return _submenu($session,$output, 'listSubscriptionCodes title', 'subscription codes manage');
|
||||
}
|
||||
|
||||
$p = WebGUI::Paginator->new($session,$session->url->page('op=listSubscriptionCodes'.$ops));
|
||||
|
|
@ -379,7 +379,7 @@ sub www_listSubscriptionCodes {
|
|||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional($session->form->process("pn"));
|
||||
|
||||
return _submenu($output, 'listSubscriptionCodes title', 'subscription codes manage');
|
||||
return _submenu($session,$output, 'listSubscriptionCodes title', 'subscription codes manage');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -408,7 +408,7 @@ sub www_listSubscriptions {
|
|||
|
||||
$output = $i18n->get('no subscriptions') unless (@{$subscriptions});
|
||||
|
||||
return _submenu($output, 'manage subscriptions', 'subscription manage');
|
||||
return _submenu($session,$output, 'manage subscriptions', 'subscription manage');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -463,7 +463,7 @@ sub www_redeemSubscriptionCode {
|
|||
$f->submit;
|
||||
$var{codeForm} = $f->print;
|
||||
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000053")->process(\%var));
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000053")->process(\%var));
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ sub www_viewPurchaseHistory {
|
|||
|
||||
$var{purchaseHistoryLoop} = \@historyLoop;
|
||||
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000019")->process(\%var));
|
||||
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000019")->process(\%var));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ sub www_deleteUserConfirm {
|
|||
if ($session->form->process("uid") eq '1' || $session->form->process("uid") eq '3') {
|
||||
return WebGUI::AdminConsole->new($session,"users")->render($session->privilege->vitalComponent());
|
||||
} else {
|
||||
$u = WebGUI::User->new($session->form->process("uid"));
|
||||
$u = WebGUI::User->new($session,$session->form->process("uid"));
|
||||
$u->delete;
|
||||
return www_listUsers();
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ sub www_editUser {
|
|||
"groups"=> { label=>$i18n->get('89')},
|
||||
);
|
||||
my $tabform = WebGUI::TabForm->new($session,\%tabs);
|
||||
my $u = WebGUI::User->new(($session->form->process("uid") eq 'new') ? '' : $session->form->process("uid"));
|
||||
my $u = WebGUI::User->new($session,($session->form->process("uid") eq 'new') ? '' : $session->form->process("uid"));
|
||||
$session->style->setScript($session->config->get("extrasURL")."/swapLayers.js", {type=>"text/javascript"});
|
||||
$session->style->setRawHeadTags('<script type="text/javascript">var active="'.$u->authMethod.'";</script>');
|
||||
$tabform->hidden({name=>"op",value=>"editUserSave"});
|
||||
|
|
@ -400,7 +400,7 @@ sub www_editUserSave {
|
|||
my ($uid) = $session->db->quickArray("select userId from users where username=".$session->db->quote($session->form->process("username")));
|
||||
my $error;
|
||||
if (($uid eq $session->form->process("uid") || $uid eq "") && $session->form->process("username") ne '') {
|
||||
my $u = WebGUI::User->new($session->form->process("uid"));
|
||||
my $u = WebGUI::User->new($session,$session->form->process("uid"));
|
||||
$session->form->process("uid") = $u->userId unless ($isSecondary);
|
||||
$u->username($session->form->process("username"));
|
||||
$u->authMethod($session->form->process("authMethod"));
|
||||
|
|
@ -462,7 +462,7 @@ sub www_editUserKarmaSave {
|
|||
my $session = shift; use WebGUI; WebGUI::dumpSession($session);
|
||||
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
|
||||
my ($u);
|
||||
$u = WebGUI::User->new($session->form->process("uid"));
|
||||
$u = WebGUI::User->new($session,$session->form->process("uid"));
|
||||
$u->karma($session->form->process("amount"),$session->user->username." (".$session->user->userId.")",$session->form->process("description"));
|
||||
return www_editUser();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue