From 674c150697525fcd9325d470081fe823704be68e Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 1 Apr 2003 12:26:02 +0000 Subject: [PATCH] small improvment --- C4/Date.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/C4/Date.pm b/C4/Date.pm index 5e3a6cfdd6..69bf744209 100644 --- a/C4/Date.pm +++ b/C4/Date.pm @@ -25,21 +25,13 @@ sub get_date_format { #Get the database handle my $dbh = C4::Context->dbh; - - #Query the database to get the dateformat - my $sth = $dbh->prepare("SELECT value FROM systempreferences WHERE variable='dateformat'"); - - $sth->execute(); - - my ($dateformat) = $sth->fetchrow; - - return $dateformat + return C4::Context->preference('dateformat'); } sub display_date_format { my $dateformat = get_date_format(); - + if ( $dateformat eq "us" ) { return "mm/dd/yyyy"; -- 2.39.5