Merge commit 'bfe9780ce0' into WebGUI8. Merged up to 7.10.3
This commit is contained in:
commit
a90eadda7c
37 changed files with 537 additions and 92 deletions
|
|
@ -857,25 +857,6 @@ sub canStartThread {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 canView ( [ $userId ] )
|
||||
|
||||
Extends the base method to also allow users who canPost to the CS.
|
||||
|
||||
=head3 $userId
|
||||
|
||||
A userId to check for edit permissions. If $userId is false, then it checks
|
||||
the current session user.
|
||||
|
||||
=cut
|
||||
|
||||
sub canView {
|
||||
my $self = shift;
|
||||
my $userId = shift || $self->session->user->userId;
|
||||
return $self->next::method( $userId ) || $self->canPost( $userId );
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 commit
|
||||
|
|
|
|||
|
|
@ -2463,7 +2463,8 @@ Method to move an event down one position in display order
|
|||
sub www_moveEventMetaFieldDown {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient unless ($self->canEdit);
|
||||
$self->moveCollateralDown('EMSEventMetaField', 'fieldId', $self->session->form->get("fieldId"));
|
||||
my $fieldId = $self->session->form->get("fieldId");
|
||||
$self->moveCollateralDown('EMSEventMetaField', 'fieldId', $fieldId);
|
||||
return $self->www_manageEventMetaFields;
|
||||
}
|
||||
|
||||
|
|
@ -2478,7 +2479,8 @@ Method to move an event metdata field up one position in display order
|
|||
sub www_moveEventMetaFieldUp {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient unless ($self->canEdit);
|
||||
$self->moveCollateralUp('EMSEventMetaField', 'fieldId', $self->session->form->get("fieldId"));
|
||||
my $fieldId = $self->session->form->get("fieldId");
|
||||
$self->moveCollateralUp('EMSEventMetaField', 'fieldId', $fieldId);
|
||||
return $self->www_manageEventMetaFields;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -424,8 +424,6 @@ sub copyThingData {
|
|||
return undef unless $self->canEditThingData($thingId, $thingDataId);
|
||||
|
||||
my $origCollateral = $self->getCollateral("Thingy_".$thingId, "thingDataId", $thingDataId);
|
||||
use Data::Dumper;
|
||||
$session->log->warn(Dumper $origCollateral);
|
||||
$origCollateral->{thingDataId} = "new";
|
||||
##Get all fields
|
||||
my $fields = $db->buildArrayRefOfHashRefs('select * from Thingy_fields where assetId=? and thingId=?'
|
||||
|
|
@ -2147,7 +2145,7 @@ sub www_editThingSave {
|
|||
my $displayInSearch = $self->session->form->process("displayInSearch_".$field->{fieldId}) || 0;
|
||||
my $searchIn = $self->session->form->process("searchIn_".$field->{fieldId}) || 0;
|
||||
|
||||
$self->session->db->write("update Thingy_fields set display = ".$display.", viewScreenTitle = ".$viewScreenTitle.", displayinSearch = ".$displayInSearch.", searchIn = ".$searchIn." where fieldId = ".$self->session->db->quote($field->{fieldId})." and thingId = ".$self->session->db->quote($thingId));
|
||||
$self->session->db->write("update Thingy_fields set display = ?, viewScreenTitle = ?, displayinSearch = ?, searchIn = ? where fieldId = ? and thingId = ?",[$display, $viewScreenTitle, $displayInSearch, $searchIn, $field->{fieldId}, $thingId]);
|
||||
}
|
||||
return $self->www_manage;
|
||||
}
|
||||
|
|
@ -2588,9 +2586,6 @@ sub www_editThingDataSaveViaAjax {
|
|||
}
|
||||
|
||||
my $thingProperties = $self->getThing($thingId);
|
||||
use Data::Dumper;
|
||||
warn $thingId;
|
||||
warn Dumper $thingProperties;
|
||||
if ($thingProperties->{thingId}){
|
||||
return $session->privilege->insufficient() unless $self->canEditThingData($thingId, $thingDataId
|
||||
,$thingProperties);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue