From 540b36d25e82ed2f2643250f254c6fc9e4a62ad2 Mon Sep 17 00:00:00 2001 From: matteo Date: Wed, 2 Jul 2014 00:36:16 +0300 Subject: use English to improve readability --- lib/AdminPanel/Module/LogViewer.pm | 4 ++-- lib/AdminPanel/Module/Users.pm | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/AdminPanel/Module') diff --git a/lib/AdminPanel/Module/LogViewer.pm b/lib/AdminPanel/Module/LogViewer.pm index ec6025dc..28c0d67a 100644 --- a/lib/AdminPanel/Module/LogViewer.pm +++ b/lib/AdminPanel/Module/LogViewer.pm @@ -61,6 +61,7 @@ use AdminPanel::Shared::JournalCtl; use POSIX qw/strftime floor/; +use English; use Date::Simple (); use File::HomeDir qw(home); @@ -476,8 +477,7 @@ sub _warn_about_user_mode { "You will not be able to read system logs which you do not have rights to,\n". "but you may still browse all the others."); - # $EUID: effective user identifier - if(($> != 0) and (!$self->sh_gui->ask_OkCancel({title => $title, text => $msg}))) { + if(($EUID != 0) and (!$self->sh_gui->ask_OkCancel({title => $title, text => $msg}))) { # TODO add Privileges? return 0; } diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm index 4e710b30..dbf69620 100644 --- a/lib/AdminPanel/Module/Users.pm +++ b/lib/AdminPanel/Module/Users.pm @@ -77,6 +77,7 @@ use USER; use utf8; use Sys::Syslog; use Glib; +use English; use yui; use AdminPanel::Shared::GUI; use AdminPanel::Shared::Locales; @@ -141,7 +142,7 @@ sub _USERInitialize { my $self = shift; # $EUID: effective user identifier - if ($> == 0) { + if ($EUID == 0) { return USER::ADMIN->new; } @@ -851,7 +852,7 @@ sub addUserDialog { my $self = shift; my $standalone = shift; - if ($> != 0) { + if ($EUID != 0) { $self->sh_gui->warningMsgBox({ title => $self->name, text => $self->loc->N("root privileges required"), @@ -2486,7 +2487,7 @@ sub _refreshActions { sub _manageUsersDialog { my $self = shift; - if ($> != 0) { + if ($EUID != 0) { $self->sh_gui->warningMsgBox({ title => $self->name, text => $self->loc->N("root privileges required"), -- cgit v1.2.1