Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Tidied.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Hecht committed Apr 13, 2018
1 parent ff2a0b0 commit 7697dd6
Show file tree
Hide file tree
Showing 223 changed files with 582 additions and 576 deletions.
2 changes: 1 addition & 1 deletion Kernel/GenericInterface/ErrorHandling/RequestRetry.pm
Expand Up @@ -85,7 +85,7 @@ sub Run {
return $ModuleConfigCheck if !$ModuleConfigCheck->{Success};

# Set basic information including possibly existing past execution data.
my $RetryCount = $Param{PastExecutionData}->{RetryCount} // 0;
my $RetryCount = $Param{PastExecutionData}->{RetryCount} // 0;
my $CurrentDateTime = $Kernel::OM->Create('Kernel::System::DateTime');

# Get date-time of last (=this) request. If we are not in a retry, use current date-time.
Expand Down
2 changes: 1 addition & 1 deletion Kernel/GenericInterface/Event/Handler.pm
Expand Up @@ -844,7 +844,7 @@ sub _ConditionCheck {
for my $ArrayField (@ArrayFields) {
next ARRAYFIELD if ref $Param{Data}->{$ArrayField} ne '';
if ( $Param{Data}->{$ArrayField} !~ $ActualCondition->{Fields}->{$FieldName}->{Match} ) {
next ARRAYFIELD
next ARRAYFIELD;
}

$FieldSuccess++;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/GenericInterface/Mapping/Simple.pm
Expand Up @@ -239,7 +239,7 @@ sub Map {
# check if we have a value mapping for the specific key
my $ValueMap;
if ( $Config->{ValueMap} && $Config->{ValueMap}->{$NewKey} ) {
$ValueMap = $Config->{ValueMap}->{$NewKey}
$ValueMap = $Config->{ValueMap}->{$NewKey};
}

if ($ValueMap) {
Expand Down
8 changes: 4 additions & 4 deletions Kernel/GenericInterface/Operation/Ticket/Common.pm
Expand Up @@ -301,7 +301,7 @@ sub ValidateCustomer {

# if customer is not registered in the database, check if email is valid
if ( !IsHashRefWithData( \%CustomerData ) ) {
return $Self->ValidateFrom( From => $Param{CustomerUser} )
return $Self->ValidateFrom( From => $Param{CustomerUser} );
}

# if ValidID is present, check if it is valid!
Expand Down Expand Up @@ -742,7 +742,7 @@ sub ValidatePendingTime {
# check that no time attribute is empty or negative
for my $TimeAttribute ( sort keys %{ $Param{PendingTime} } ) {
return if $Param{PendingTime}->{$TimeAttribute} eq '';
return if int $Param{PendingTime}->{$TimeAttribute} < 0,
return if int $Param{PendingTime}->{$TimeAttribute} < 0;
}

# try to convert pending time to a DateTime object
Expand Down Expand Up @@ -783,7 +783,7 @@ sub ValidateAutoResponseType {
return if !%AutoResponseType;

for my $AutoResponseType ( values %AutoResponseType ) {
return 1 if $AutoResponseType eq $Param{AutoResponseType}
return 1 if $AutoResponseType eq $Param{AutoResponseType};
}
return;
}
Expand Down Expand Up @@ -1273,7 +1273,7 @@ sub SetDynamicFieldValue {

return {
Success => $Success,
}
};
}

=head2 CreateAttachment()
Expand Down
14 changes: 7 additions & 7 deletions Kernel/GenericInterface/Operation/Ticket/TicketCreate.pm
Expand Up @@ -349,7 +349,7 @@ sub Run {

my $PermissionUserID = $UserID;
if ( $UserType eq 'Customer' ) {
$UserID = $Kernel::OM->Get('Kernel::Config')->Get('CustomerPanelUserID')
$UserID = $Kernel::OM->Get('Kernel::Config')->Get('CustomerPanelUserID');
}

# check needed hashes
Expand Down Expand Up @@ -774,7 +774,7 @@ sub _CheckTicket {
# if everything is OK then return Success
return {
Success => 1,
}
};
}

=head2 _CheckArticle()
Expand Down Expand Up @@ -1444,10 +1444,10 @@ sub _TicketCreate {

# Create article.
my $ArticleID = $ArticleBackendObject->ArticleCreate(
NoAgentNotify => $Article->{NoAgentNotify} || 0,
TicketID => $TicketID,
SenderTypeID => $Article->{SenderTypeID} || '',
SenderType => $Article->{SenderType} || '',
NoAgentNotify => $Article->{NoAgentNotify} || 0,
TicketID => $TicketID,
SenderTypeID => $Article->{SenderTypeID} || '',
SenderType => $Article->{SenderType} || '',
IsVisibleForCustomer => $Article->{IsVisibleForCustomer},
From => $From,
To => $To,
Expand Down Expand Up @@ -1590,7 +1590,7 @@ sub _TicketCreate {
Success => 0,
ErrorMessage => 'Could not get new ticket information, please contact the system'
. ' administrator',
}
};
}

# get web service configuration
Expand Down
2 changes: 1 addition & 1 deletion Kernel/GenericInterface/Operation/Ticket/TicketGet.pm
Expand Up @@ -326,7 +326,7 @@ sub Run {
$ArticleSenderType = $Param{Data}->{ArticleSenderType};
}
elsif ( IsStringWithData( $Param{Data}->{ArticleSenderType} ) ) {
$ArticleSenderType = [ $Param{Data}->{ArticleSenderType} ]
$ArticleSenderType = [ $Param{Data}->{ArticleSenderType} ];
}

# By default, do not include HTML body as attachment, unless it is explicitly requested.
Expand Down
44 changes: 22 additions & 22 deletions Kernel/GenericInterface/Operation/Ticket/TicketUpdate.pm
Expand Up @@ -363,7 +363,7 @@ sub Run {
my $PermissionUserID = $UserID;

if ( $UserType eq 'Customer' ) {
$UserID = $Kernel::OM->Get('Kernel::Config')->Get('CustomerPanelUserID')
$UserID = $Kernel::OM->Get('Kernel::Config')->Get('CustomerPanelUserID');
}

# get ticket object
Expand Down Expand Up @@ -548,7 +548,7 @@ sub Run {
return {
Success => 0,
%{$ArticleCheck},
}
};
}
return $Self->ReturnError( %{$ArticleCheck} );
}
Expand Down Expand Up @@ -1474,7 +1474,7 @@ sub _CheckUpdatePermissions {

return {
Success => 1,
}
};
}

=head2 _TicketUpdate()
Expand Down Expand Up @@ -1562,7 +1562,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket title could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1594,7 +1594,7 @@ sub _TicketUpdate {
Success => 0,
ErrorMessage =>
'Ticket queue could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1626,7 +1626,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket lock could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1659,7 +1659,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket type could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1715,14 +1715,14 @@ sub _TicketUpdate {
Errormessage =>
'Ticket pendig time could not be updated, please contact system'
. ' administrator!',
}
};
}
}
else {
return $Self->ReturnError(
ErrorCode => 'TicketUpdate.MissingParameter',
ErrorMessage => 'Can\'t set a ticket on a pending state without pendig time!'
)
);
}
}

Expand Down Expand Up @@ -1753,7 +1753,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket state could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1819,7 +1819,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket service could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1861,7 +1861,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket SLA could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1905,7 +1905,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket customer user could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1938,7 +1938,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket priority could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -1975,7 +1975,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket owner could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -2015,7 +2015,7 @@ sub _TicketUpdate {
Success => 0,
Errormessage =>
'Ticket responsible could not be updated, please contact system administrator!',
}
};
}
}

Expand Down Expand Up @@ -2075,10 +2075,10 @@ sub _TicketUpdate {

# Create article.
$ArticleID = $ArticleBackendObject->ArticleCreate(
NoAgentNotify => $Article->{NoAgentNotify} || 0,
TicketID => $TicketID,
SenderTypeID => $Article->{SenderTypeID} || '',
SenderType => $Article->{SenderType} || '',
NoAgentNotify => $Article->{NoAgentNotify} || 0,
TicketID => $TicketID,
SenderTypeID => $Article->{SenderTypeID} || '',
SenderType => $Article->{SenderType} || '',
IsVisibleForCustomer => $Article->{IsVisibleForCustomer},
From => $From,
To => $To,
Expand All @@ -2105,7 +2105,7 @@ sub _TicketUpdate {
Success => 0,
ErrorMessage =>
'Article could not be created, please contact the system administrator'
}
};
}

# time accounting
Expand Down Expand Up @@ -2249,7 +2249,7 @@ sub _TicketUpdate {

# get Article and ArticleAttachement
my %ArticleData = $ArticleBackendObject->ArticleGet(
ArticleID => $ArticleID || $LastArticleID,
ArticleID => $ArticleID || $LastArticleID,
DynamicFields => 1,
TicketID => $TicketID,
);
Expand Down
8 changes: 4 additions & 4 deletions Kernel/GenericInterface/Requester.pm
Expand Up @@ -315,7 +315,7 @@ sub Run {

if ( !$FunctionResult->{Success} ) {

my $Summary = $FunctionResult->{ErrorMessage} // 'TransportObject returned an error, cancelling Request';
my $Summary = $FunctionResult->{ErrorMessage} // 'TransportObject returned an error, cancelling Request';
my $ErrorReturn = $Self->_HandleError(
%HandleErrorData,
DataInclude => \%DataInclude,
Expand All @@ -340,7 +340,7 @@ sub Run {
next RESPONSEKEY if $ResponseKey eq 'ErrorMessage';

# Add any other key from the invoker HandleResponse() in Data.
$ErrorReturn->{$ResponseKey} = $Response->{$ResponseKey}
$ErrorReturn->{$ResponseKey} = $Response->{$ResponseKey};
}
}

Expand Down Expand Up @@ -441,7 +441,7 @@ sub Run {

if ( !$FunctionResult->{Success} ) {

my $Summary = $FunctionResult->{ErrorMessage} // 'InvokerObject returned an error, cancelling Request';
my $Summary = $FunctionResult->{ErrorMessage} // 'InvokerObject returned an error, cancelling Request';
my $ErrorReturn = $Self->_HandleError(
%HandleErrorData,
DataInclude => \%DataInclude,
Expand All @@ -460,7 +460,7 @@ sub Run {
next RESPONSEKEY if $ResponseKey eq 'ErrorMessage';

# Add any other key from the invoker HandleResponse() in Data.
$ErrorReturn->{$ResponseKey} = $FunctionResult->{$ResponseKey}
$ErrorReturn->{$ResponseKey} = $FunctionResult->{$ResponseKey};
}
}

Expand Down
4 changes: 2 additions & 2 deletions Kernel/Modules/AdminAppointmentCalendarManage.pm
Expand Up @@ -872,8 +872,8 @@ sub _TicketAppointments {
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

$TicketAppointments{QueueIDStrg} = $LayoutObject->AgentQueueListOption(
Class => 'Validate_Required Modernize ' . ( $Param{Error}->{QueueIDInvalid} // '' ),
Data => \%AvailableQueues,
Class => 'Validate_Required Modernize ' . ( $Param{Error}->{QueueIDInvalid} // '' ),
Data => \%AvailableQueues,
Multiple => 1,
Size => 0,
Name => 'QueueID' . $FieldID,
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminAppointmentNotificationEvent.pm
Expand Up @@ -1101,7 +1101,7 @@ sub _Edit {

# set Email transport selected on add screen
if ( $Transport eq 'Email' && !$Param{ID} ) {
$TransportChecked = 'checked="checked"'
$TransportChecked = 'checked="checked"';
}

# get transport settings string from transport object
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminAutoResponse.pm
Expand Up @@ -269,7 +269,7 @@ sub _Edit {
Name => 'AddressID',
SelectedID => $Param{AddressID},
Translation => 0,
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'AddressIDInvalid'} || '' ),
Class => 'Modernize Validate_Required ' . ( $Param{Errors}->{'AddressIDInvalid'} || '' ),
);

my $HTMLUtilsObject = $Kernel::OM->Get('Kernel::System::HTMLUtils');
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminCloudServices.pm
Expand Up @@ -55,7 +55,7 @@ sub _ShowOverview {
Data => \%Param
);
$Output .= $LayoutObject->Footer();
return $Output
return $Output;
}

my $Output = $LayoutObject->Header();
Expand Down
4 changes: 2 additions & 2 deletions Kernel/Modules/AdminCustomerGroup.pm
Expand Up @@ -440,7 +440,7 @@ sub _Change {
Name => 'Change',
Data => {
%Param,
ActionHome => 'Admin' . ( $Type eq 'Customer' ? 'CustomerCompany' : $Type ),
ActionHome => 'Admin' . ( $Type eq 'Customer' ? 'CustomerCompany' : $Type ),
VisibleNeType => $VisibleType{$NeType},
VisibleType => $VisibleType{$Type},
},
Expand Down Expand Up @@ -725,7 +725,7 @@ sub _Overview {
Data => {
Name => $CustomerAlwaysGroups[ $ID - 1 ],
},
)
);
}

# return output
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/AdminCustomerUser.pm
Expand Up @@ -963,7 +963,7 @@ sub _Overview {
$LayoutObject->Block(
Name => 'OverviewResultRow',
Data => {
Valid => $ValidList{ $UserData{ValidID} || '' } || '-',
Valid => $ValidList{ $UserData{ValidID} || '' } || '-',
Search => $Param{Search},
CustomerKey => $ListKey,
%UserData,
Expand Down

0 comments on commit 7697dd6

Please sign in to comment.