Commit 2ccb1399e0afc0c69a0377c05ab69e1515a2a1c9
1 parent
d91f5444
Reverted Webservices to version 2 for compatibility with Tools.
Committed by: Megan Watson
Showing
2 changed files
with
13 additions
and
13 deletions
config/dmsDefaults.php
ktwebservice/webservice.php
| ... | ... | @@ -95,22 +95,22 @@ define('KTWS_ERR_DB_PROBLEM', 99); |
| 95 | 95 | |
| 96 | 96 | if (!defined('LATEST_WEBSERVICE_VERSION')) |
| 97 | 97 | { |
| 98 | - define('LATEST_WEBSERVICE_VERSION', 3); | |
| 98 | + define('LATEST_WEBSERVICE_VERSION', 2); | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - function bool2str($bool) | |
| 101 | +function bool2str($bool) | |
| 102 | +{ | |
| 103 | + if (is_bool($bool)) | |
| 102 | 104 | { |
| 103 | - if (is_bool($bool)) | |
| 104 | - { | |
| 105 | - return $bool?'true':'false'; | |
| 106 | - } | |
| 107 | - if (is_numeric($bool)) | |
| 108 | - { | |
| 109 | - return ($bool+0)?'true':'false'; | |
| 110 | - } | |
| 111 | - // assume str | |
| 112 | - return (strtolower($bool) == 'true')?'true':'false'; | |
| 105 | + return $bool?'true':'false'; | |
| 106 | + } | |
| 107 | + if (is_numeric($bool)) | |
| 108 | + { | |
| 109 | + return ($bool+0)?'true':'false'; | |
| 113 | 110 | } |
| 111 | + // assume str | |
| 112 | + return (strtolower($bool) == 'true')?'true':'false'; | |
| 113 | +} | |
| 114 | 114 | |
| 115 | 115 | class KTWebService |
| 116 | 116 | { | ... | ... |