minor bug fix
[openemr.git] / library / freeb / Utility.class.php
blob718dd7d1c521775f2fb47d5e4bce5928870d662b
1 <?php
2 require_once("DataObjectBase.class.php");
3 require_once("xmlrpc.inc");
5 class Utility Extends DataObjectBase {
7 function Utility() {
8 $this->_addFunc("currentdate", array( "name" => "FreeB.FBGlobal.CurrentDate",
9 "sig" => array(XMLRPCSTRING,XMLRPCSTRING),
10 "doc" => ""));
14 function currentdate($m) {
16 $err="";
18 $pkey = $this->_isodate(date("Y-m-d"));
20 // if we generated an error, create an error return response
21 if ($err) {
22 return $this->_handleError($err);
24 else {
25 // otherwise, we create the right response
26 // with the state name
27 return new xmlrpcresp(new xmlrpcval($pkey,XMLRPCDATETIME));
32 //'FreeB.FBGlobal.CurrentDate' => \&FreeB_FBGlobal_CurrentDate,