我在 Windows 2008 服务器上使用 OTRS 3.2.11。我对 Kernel/Output/HTML/NotificationUIDCheck.pm 文件进行了一些修改,以消除显示“不要使用超级用户帐户...”的红色警告消息。现在该消息不再出现,但日志文件不断显示此消息:
[Sun May 18 07:59:54 2014][Error][Kernel::Output::HTML::Layout::NavigationBar][2932] Module Kernel/Output/HTML/NotificationUIDCheck.pm not found/could not be loaded!
这是正在运行的 NotificationUIDCheck.pm:
package Kernel::Output::HTML::NotificationUIDCheck;
use strict;
use warnings;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# get needed objects
for (qw(ConfigObject LogObject DBObject LayoutObject UserID)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
return $Self;
}
原始文件是这样的:
package Kernel::Output::HTML::NotificationUIDCheck;
use strict;
use warnings;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
# get needed objects
for (qw(ConfigObject LogObject DBObject LayoutObject UserID)) {
$Self->{$_} = $Param{$_} || die "Got no $_!";
}
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
# return if it's not root@localhost
return '' if $Self->{UserID} != 1;
# show error notfy, don't work with user id 1
return $Self->{LayoutObject}->Notify(
Priority => 'Error',
Link => '$Env{"Baselink"}Action=AdminUser',
Data =>
'$Text{"Don\'t use the Superuser account to work with OTRS! Create new Agents and work with these accounts instead."}',
);
}
1;
我想有些东西不见了,你能帮助人们找出如何解决它吗!!!