From 36a5c750a88f76b3a4ee275b396c2ad36710bef8 Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Wed, 11 Dec 2013 11:11:25 -0500
Subject: [PATCH] Bug 6427 [Part 11] - Add new utility functions

---
 Koha/DateUtils.pm            |    7 ++++++-
 Koha/Template/Plugin/Koha.pm |    5 +++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm
index ea57778..c039fbb 100644
--- a/Koha/DateUtils.pm
+++ b/Koha/DateUtils.pm
@@ -21,13 +21,14 @@ use warnings;
 use 5.010;
 use DateTime;
 use DateTime::Format::DateParse;
+use DateTime::Format::MySQL;
 use C4::Context;
 
 use base 'Exporter';
 use version; our $VERSION = qv('1.0.0');
 
 our @EXPORT = (
-    qw( dt_from_string output_pref format_sqldatetime output_pref_due format_sqlduedatetime)
+    qw( dt_from_string output_pref format_sqldatetime output_pref_due format_sqlduedatetime get_timestamp )
 );
 
 =head1 DateUtils
@@ -236,4 +237,8 @@ sub format_sqlduedatetime {
     return q{};
 }
 
+sub get_timestamp {
+    return DateTime::Format::MySQL->format_datetime( dt_from_string() );
+}
+
 1;
diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm
index 2eff9f1..1212455 100644
--- a/Koha/Template/Plugin/Koha.pm
+++ b/Koha/Template/Plugin/Koha.pm
@@ -44,4 +44,9 @@ sub Preference {
     return C4::Context->preference( $pref );
 }
 
+sub Get {
+    my ( $self, $category, $selected, $opac ) = @_;
+    return GetAuthorisedValues( $category, $selected, $opac );
+}
+
 1;
-- 
1.7.2.5