Commit 1ed560c5c2d419be02556b89a21bc0f9ff01aad5
1 parent
450d20e4
Implemented Tohir's fix for n/a values in client tools.
Committed By: Kevin Fourie Reviewed By: Tohir Solomons git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/branches/RB_3.5.4a@9659 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
3 deletions
ktapi/KTAPIDocument.inc.php
| @@ -979,7 +979,7 @@ class KTAPI_Document extends KTAPI_FolderItem | @@ -979,7 +979,7 @@ class KTAPI_Document extends KTAPI_FolderItem | ||
| 979 | 979 | ||
| 980 | foreach ($fields as $field) | 980 | foreach ($fields as $field) |
| 981 | { | 981 | { |
| 982 | - $value = 'n/a'; | 982 | + $value = ''; |
| 983 | 983 | ||
| 984 | $fieldvalue = DocumentFieldLink::getByDocumentAndField($this->document, $field); | 984 | $fieldvalue = DocumentFieldLink::getByDocumentAndField($this->document, $field); |
| 985 | if (!is_null($fieldvalue) && (!PEAR::isError($fieldvalue))) | 985 | if (!is_null($fieldvalue) && (!PEAR::isError($fieldvalue))) |
| @@ -1013,7 +1013,8 @@ class KTAPI_Document extends KTAPI_FolderItem | @@ -1013,7 +1013,8 @@ class KTAPI_Document extends KTAPI_FolderItem | ||
| 1013 | $fieldsresult[] = array( | 1013 | $fieldsresult[] = array( |
| 1014 | 'name' => $field->getName(), | 1014 | 'name' => $field->getName(), |
| 1015 | 'required' => $field->getIsMandatory(), | 1015 | 'required' => $field->getIsMandatory(), |
| 1016 | - 'value' => $value, | 1016 | + 'value' => $value == '' ? 'n/a' : $value, |
| 1017 | + 'blankvalue' => $value=='' ? '1' : '0', | ||
| 1017 | 'description' => $field->getDescription(), | 1018 | 'description' => $field->getDescription(), |
| 1018 | 'control_type' => $controltype, | 1019 | 'control_type' => $controltype, |
| 1019 | 'selection' => $selection | 1020 | 'selection' => $selection |
| @@ -1878,4 +1879,4 @@ class KTAPI_Document extends KTAPI_FolderItem | @@ -1878,4 +1879,4 @@ class KTAPI_Document extends KTAPI_FolderItem | ||
| 1878 | } | 1879 | } |
| 1879 | } | 1880 | } |
| 1880 | 1881 | ||
| 1881 | -?> | ||
| 1882 | \ No newline at end of file | 1882 | \ No newline at end of file |
| 1883 | +?> |