From 012aa17f67fdaff8bf688371c5da5276ef28387e Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 1 Mar 2009 08:02:07 +0000 Subject: [PATCH] Use new module --- mailboxes/boxes-lib.pl | 26 -------------------------- mailboxes/mailboxes-lib.pl | 4 ++-- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/mailboxes/boxes-lib.pl b/mailboxes/boxes-lib.pl index 6ddc386cf..24157ae27 100644 --- a/mailboxes/boxes-lib.pl +++ b/mailboxes/boxes-lib.pl @@ -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 diff --git a/mailboxes/mailboxes-lib.pl b/mailboxes/mailboxes-lib.pl index fdb16c626..7e4fe8161 100644 --- a/mailboxes/mailboxes-lib.pl +++ b/mailboxes/mailboxes-lib.pl @@ -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";