From 2ccb1399e0afc0c69a0377c05ab69e1515a2a1c9 Mon Sep 17 00:00:00 2001 From: Megan Watson Date: Thu, 25 Feb 2010 14:52:16 +0200 Subject: [PATCH] Reverted Webservices to version 2 for compatibility with Tools. --- config/dmsDefaults.php | 2 +- ktwebservice/webservice.php | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index d0c13e5..e0033d7 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -47,7 +47,7 @@ if (defined('DMS_DEFAULTS_INCLUDED')) } define('DMS_DEFAULTS_INCLUDED',1); -define('LATEST_WEBSERVICE_VERSION',3); +define('LATEST_WEBSERVICE_VERSION',2); if (function_exists('apd_set_pprof_trace')) { diff --git a/ktwebservice/webservice.php b/ktwebservice/webservice.php index 5445c04..bfaafbc 100644 --- a/ktwebservice/webservice.php +++ b/ktwebservice/webservice.php @@ -95,22 +95,22 @@ define('KTWS_ERR_DB_PROBLEM', 99); if (!defined('LATEST_WEBSERVICE_VERSION')) { - define('LATEST_WEBSERVICE_VERSION', 3); + define('LATEST_WEBSERVICE_VERSION', 2); } - function bool2str($bool) +function bool2str($bool) +{ + if (is_bool($bool)) { - if (is_bool($bool)) - { - return $bool?'true':'false'; - } - if (is_numeric($bool)) - { - return ($bool+0)?'true':'false'; - } - // assume str - return (strtolower($bool) == 'true')?'true':'false'; + return $bool?'true':'false'; + } + if (is_numeric($bool)) + { + return ($bool+0)?'true':'false'; } + // assume str + return (strtolower($bool) == 'true')?'true':'false'; +} class KTWebService { -- libgit2 0.21.4