Commit 73a3d01ce5b378c705a37865ab60bf74ae20ae9b

Authored by conradverm
1 parent 37158fcb

WSA-93

"Add integration/oem no so that integrators may associate a custom document reference"
Implemented.

Committed By: Conrad Vermeulen
Reviewed By: Megan Watson

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7871 c91229c3-7414-0410-bfa2-8a42b809f60b
search2/indexing/indexerCore.inc.php
@@ -74,6 +74,7 @@ class QueryResultItem @@ -74,6 +74,7 @@ class QueryResultItem
74 protected $documentType; 74 protected $documentType;
75 protected $mimeIconPath; 75 protected $mimeIconPath;
76 protected $mimeDisplay; 76 protected $mimeDisplay;
  77 + protected $oemDocumentNo;
77 78
78 public function __construct($document_id, $rank=null, $title=null, $text=null) 79 public function __construct($document_id, $rank=null, $title=null, $text=null)
79 { 80 {
@@ -108,7 +109,7 @@ class QueryResultItem @@ -108,7 +109,7 @@ class QueryResultItem
108 dcv.minor_version, dcv.filename, cou.name as checkoutuser, w.human_name as workflow, ws.human_name as workflowstate, 109 dcv.minor_version, dcv.filename, cou.name as checkoutuser, w.human_name as workflow, ws.human_name as workflowstate,
109 mt.mimetypes as mimetype, md.mime_doc as mimedoc, d.checkedout, mbu.name as modifiedbyuser, d.modified, 110 mt.mimetypes as mimetype, md.mime_doc as mimedoc, d.checkedout, mbu.name as modifiedbyuser, d.modified,
110 cbu.name as createdbyuser, ou.name as owneruser, d.immutable, d.status_id, d.created,dcv.storage_path, dtl.name as document_type, 111 cbu.name as createdbyuser, ou.name as owneruser, d.immutable, d.status_id, d.created,dcv.storage_path, dtl.name as document_type,
111 - mt.icon_path as mime_icon_path, mt.friendly_name as mime_display 112 + mt.icon_path as mime_icon_path, mt.friendly_name as mime_display, d.oem_no
112 FROM 113 FROM
113 documents d 114 documents d
114 INNER JOIN document_metadata_version dmv ON d.metadata_version_id = dmv.id 115 INNER JOIN document_metadata_version dmv ON d.metadata_version_id = dmv.id
@@ -168,6 +169,9 @@ class QueryResultItem @@ -168,6 +169,9 @@ class QueryResultItem
168 $this->workflow = $result['workflow']; 169 $this->workflow = $result['workflow'];
169 $this->workflowState = $result['workflowstate']; 170 $this->workflowState = $result['workflowstate'];
170 171
  172 + $this->oemDocumentNo = $result['oem_no'];
  173 + if (empty($this->oemDocumentNo)) $this->oemDocumentNo = 'n/a';
  174 +
171 if (is_null($result['name'])) 175 if (is_null($result['name']))
172 { 176 {
173 $this->fullpath = '(orphaned)'; 177 $this->fullpath = '(orphaned)';
@@ -202,6 +206,7 @@ class QueryResultItem @@ -202,6 +206,7 @@ class QueryResultItem
202 case 'Version': return (string) $this->version; 206 case 'Version': return (string) $this->version;
203 case 'Filename': return (string)$this->filename; 207 case 'Filename': return (string)$this->filename;
204 case 'FolderId': return (int)$this->folderId; 208 case 'FolderId': return (int)$this->folderId;
  209 + case 'OemDocumentNo': return (string) $this->oemDocumentNo;
205 case 'Document': 210 case 'Document':
206 if (is_null($this->document)) 211 if (is_null($this->document))
207 { 212 {