[ 1457777 ] 6.99: Can't modify non-lvalue subroutine call
This commit is contained in:
parent
89e1d83d0f
commit
7921c7a708
8 changed files with 36 additions and 60 deletions
|
|
@ -296,9 +296,6 @@ sub getListTemplateVars {
|
|||
my @fieldLoop;
|
||||
$var->{"back.url"} = $self->getFormUrl;
|
||||
$var->{"back.label"} = $i18n->get('go to form');
|
||||
#$var->{"entryId"} = $self->getId;
|
||||
#$var->{"delete.url"} = $self->getUrl.";func=deleteAllEntries";
|
||||
#$var->{"delete.label"} = $i18n->get(91);
|
||||
my $fields = $self->session->db->read("select DataForm_fieldId,name,label,isMailField,type from DataForm_field
|
||||
where assetId=".$self->session->db->quote($self->getId)." order by sequenceNumber");
|
||||
while (my $field = $fields->hashRef) {
|
||||
|
|
@ -385,7 +382,6 @@ sub getRecordTemplateVars {
|
|||
my $i18n = WebGUI::International->new($self->session,"Asset_DataForm");
|
||||
$var->{error_loop} = [] unless (exists $var->{error_loop});
|
||||
$var->{canEdit} = ($self->canEdit);
|
||||
#$var->{"entryList.url"} = $self->getUrl('func=view;entryId=list');
|
||||
$var->{"entryList.url"} = $self->getListUrl;
|
||||
$var->{"entryList.label"} = $i18n->get(86);
|
||||
$var->{"export.tab.url"} = $self->getUrl('func=exportTab');
|
||||
|
|
@ -530,9 +526,10 @@ sub prepareView {
|
|||
# this one is so nutz that we don't even bother preparing, we just execute the whole thing
|
||||
my $passedVars = shift;
|
||||
##Priority encoding
|
||||
if ( $self->session->form->process("mode") eq "form") {
|
||||
my $mode = $self->session->stow->get("mode") || $self->session->form->param("mode");
|
||||
if ( $mode eq "form") {
|
||||
$self->{_view} = $self->viewForm($passedVars);
|
||||
} elsif ( $self->session->form->process("mode") eq "list") {
|
||||
} elsif ( $mode eq "list") {
|
||||
$self->{_view} = $self->viewList;
|
||||
} elsif( $self->defaultViewForm ) {
|
||||
$self->{_view} = $self->viewForm($passedVars);
|
||||
|
|
@ -717,8 +714,7 @@ sub www_deleteAllEntries {
|
|||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $assetId = $self->session->form->process("entryId");
|
||||
$self->deleteCollateral("DataForm_entry","assetId",$assetId);
|
||||
$self->session->form->process("entryId") = 'list';
|
||||
return "";
|
||||
$self->session->stow->set("mode","list");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -736,8 +732,7 @@ sub www_deleteEntry {
|
|||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
my $entryId = $self->session->form->process("entryId");
|
||||
$self->deleteCollateral("DataForm_entry","DataForm_entryId",$entryId);
|
||||
$self->session->form->process("entryId") = 'list';
|
||||
return "";
|
||||
$self->session->stow->set("mode","list");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -520,9 +520,10 @@ sub processPropertiesFromFormPost {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editBenefit {
|
||||
my $self = shift;
|
||||
my $bid = shift || $self->session->form->process("bid");
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $benefits);
|
||||
$data = $self->getCollateral("Product_benefit","Product_benefitId",$self->session->form->process("bid"));
|
||||
$data = $self->getCollateral("Product_benefit","Product_benefitId",$bid);
|
||||
my $i18n = WebGUI::International->new($self->session,'Asset_Product');
|
||||
$f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
|
|
@ -554,23 +555,22 @@ sub www_editBenefit {
|
|||
sub www_editBenefitSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("benefit") = $self->session->form->process("benefit_new") if ($self->session->form->process("benefit_new") ne "");
|
||||
$self->setCollateral("Product_benefit", "Product_benefitId", {
|
||||
Product_benefitId => $self->session->form->process("bid"),
|
||||
benefit => $self->session->form->process("benefit")
|
||||
benefit => $self->session->form->process("benefit","combo")
|
||||
});
|
||||
|
||||
return "" unless($self->session->form->process("proceed"));
|
||||
$self->session->form->process("bid") = "new";
|
||||
return $self->www_editBenefit();
|
||||
return $self->www_editBenefit("new");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editFeature {
|
||||
my $self = shift;
|
||||
my $fid = shift || $self->session->form->process("fid");
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $features);
|
||||
$data = $self->getCollateral("Product_feature","Product_featureId",$self->session->form->process("fid"));
|
||||
$data = $self->getCollateral("Product_feature","Product_featureId",$fid);
|
||||
my $i18n = WebGUI::International->new($self->session,'Asset_Product');
|
||||
$f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
|
|
@ -602,23 +602,22 @@ sub www_editFeature {
|
|||
sub www_editFeatureSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("feature") = $self->session->form->process("feature_new") if ($self->session->form->process("feature_new") ne "");
|
||||
$self->setCollateral("Product_feature", "Product_featureId", {
|
||||
Product_featureId => $self->session->form->process("fid"),
|
||||
feature => $self->session->form->process("feature")
|
||||
feature => $self->session->form->process("feature","combo")
|
||||
});
|
||||
return "" unless($self->session->form->process("proceed"));
|
||||
$self->session->form->process("fid") = "new";
|
||||
return $self->www_editFeature();
|
||||
return $self->www_editFeature("new");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editSpecification {
|
||||
my $self = shift;
|
||||
my $sid = shift || $self->session->form->process("sid");
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
my ($data, $f, $hashRef);
|
||||
my $i18n = WebGUI::International->new($self->session,'Asset_Product');
|
||||
$data = $self->getCollateral("Product_specification","Product_specificationId",$self->session->form->process("sid"));
|
||||
$data = $self->getCollateral("Product_specification","Product_specificationId",$sid);
|
||||
$f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl);
|
||||
$f->hidden(
|
||||
-name => "sid",
|
||||
|
|
@ -663,18 +662,15 @@ sub www_editSpecification {
|
|||
sub www_editSpecificationSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient() unless ($self->canEdit);
|
||||
$self->session->form->process("name") = $self->session->form->process("name_new") if ($self->session->form->process("name_new") ne "");
|
||||
$self->session->form->process("units") = $self->session->form->process("units_new") if ($self->session->form->process("units_new") ne "");
|
||||
$self->setCollateral("Product_specification", "Product_specificationId", {
|
||||
Product_specificationId => $self->session->form->process("sid"),
|
||||
name => $self->session->form->process("name"),
|
||||
value => $self->session->form->process("value"),
|
||||
units => $self->session->form->process("units")
|
||||
value => $self->session->form->process("value","combo"),
|
||||
units => $self->session->form->process("units","combo")
|
||||
});
|
||||
|
||||
return "" unless($self->session->form->process("proceed"));
|
||||
$self->session->form->process("sid") = "new";
|
||||
return $self->www_editSpecification();
|
||||
return $self->www_editSpecification("new");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -129,19 +129,6 @@ sub _appendZero {
|
|||
return $num;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 _clearStockEditSession ( )
|
||||
|
||||
Clears the session variables from session used by the stock list edit form
|
||||
|
||||
=cut
|
||||
|
||||
sub _clearStockEditSession {
|
||||
my $self = shift;
|
||||
$self->session->form->process("symbol") = "";
|
||||
$self->session->form->process("stockId") = "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 _convertToEpoch (date,time)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue