Commit 35156bbaf44c10d0953fbb0429236c4214e74d6d
1 parent
79cb4380
KTS-2512
"Search result object must return more fields to be used in templating and web services" Updated. Added a status to string Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7405 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
19 additions
and
0 deletions
lib/documentmanagement/Document.inc
| @@ -640,6 +640,25 @@ class Document { | @@ -640,6 +640,25 @@ class Document { | ||
| 640 | return trim($aComment[1]); | 640 | return trim($aComment[1]); |
| 641 | } | 641 | } |
| 642 | 642 | ||
| 643 | + static function getStatusString($statusid) | ||
| 644 | + { | ||
| 645 | + $statuses = array( | ||
| 646 | + 1=>_kt('Live'), | ||
| 647 | + 2=>_kt('Published'), | ||
| 648 | + 3=>_kt('Deleted'), | ||
| 649 | + 4=>_kt('Archived'), | ||
| 650 | + 5=>_kt('Incomplete'), | ||
| 651 | + 6=>_kt('Version Deleted') | ||
| 652 | + ); | ||
| 653 | + | ||
| 654 | + if (array_key_exists($statusid, $statuses)) | ||
| 655 | + { | ||
| 656 | + return $statuses[$statusid]; | ||
| 657 | + } | ||
| 658 | + | ||
| 659 | + return _kt('Unknown State'); | ||
| 660 | + } | ||
| 661 | + | ||
| 643 | 662 | ||
| 644 | 663 | ||
| 645 | 664 |