mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Use new module
This commit is contained in:
@@ -2535,32 +2535,6 @@ local $mail = { 'headers' =>
|
||||
return &send_mail($mail, undef, 1, 0, $smtp);
|
||||
}
|
||||
|
||||
# clear_time_locale()
|
||||
# Temporarily force the locale to C, until reset_time_locale is called
|
||||
sub clear_time_locale
|
||||
{
|
||||
if ($main::clear_time_locale_count == 0) {
|
||||
eval {
|
||||
$main::clear_time_locale_old = POSIX::setlocale(POSIX::LC_TIME);
|
||||
POSIX::setlocale(POSIX::LC_TIME, "C");
|
||||
};
|
||||
}
|
||||
$main::clear_time_locale_count++;
|
||||
}
|
||||
|
||||
# reset_time_locale()
|
||||
# Revert the locale to whatever it was before clear_time_locale was called
|
||||
sub reset_time_locale
|
||||
{
|
||||
if ($main::clear_time_locale_count == 1) {
|
||||
eval {
|
||||
POSIX::setlocale(POSIX::LC_TIME, $main::clear_time_locale_old);
|
||||
$main::clear_time_locale_old = undef;
|
||||
};
|
||||
}
|
||||
$main::clear_time_locale_count--;
|
||||
}
|
||||
|
||||
# make_from_line(address, [time])
|
||||
# Returns a From line for mbox emails, based on the current time
|
||||
sub make_from_line
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# mailboxes-lib.pl
|
||||
# Common functions for reading user mailboxes
|
||||
|
||||
do '../web-lib.pl';
|
||||
do '../ui-lib.pl';
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
do "$module_root_directory/boxes-lib.pl";
|
||||
do "$module_root_directory/folders-lib.pl";
|
||||
|
||||
Reference in New Issue
Block a user