diff --git a/config/config.ini b/config/config.ini index d844715..1792063 100644 --- a/config/config.ini +++ b/config/config.ini @@ -290,3 +290,9 @@ safemode = on ; Identify the location of the mysql.exe and mysqldump.exe ;mysqlDirectory=c:/program files/ktdms/mysql/bin + +[KTtoolsSettings] +;These two settings control whether or not the client is prompted for metadata when a +;document is added to knowledgetree via KTtools. They default to true. +explorerMetadataCapture = true +officeMetadataCapture = true diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index f10811a..c23246f 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -450,6 +450,10 @@ class KTInit { $oKTConfig->setdefaultns('webservice', 'uploadExpiry', '30'); $oKTConfig->setdefaultns('webservice', 'downloadExpiry', '30'); $oKTConfig->setdefaultns('webservice', 'randomKeyText', 'bkdfjhg23yskjdhf2iu'); + + $oKTConfig->setdefaultns('KTtoolsSettings', 'explorerMetadataCapture', true); + $oKTConfig->setdefaultns('KTtoolsSettings', 'officeMetadataCapture', true); + $res = $this->readConfig(); if (PEAR::isError($res)) { return $res; } diff --git a/ktapi/ktapi.inc.php b/ktapi/ktapi.inc.php index 1ebac59..5e45189 100644 --- a/ktapi/ktapi.inc.php +++ b/ktapi/ktapi.inc.php @@ -1,4 +1,4 @@ - \ No newline at end of file +?> diff --git a/ktwebservice/webservice.php b/ktwebservice/webservice.php index 5283cb9..7860508 100644 --- a/ktwebservice/webservice.php +++ b/ktwebservice/webservice.php @@ -1,4 +1,4 @@ - "{urn:$this->namespace}kt_document_types_array" ); + $this->__typedef["{urn:$this->namespace}kt_server_settings"] = + array( + 'explorer_metadata_capture' => 'boolean', + 'office_metadata_capture' => 'boolean' + ); + + $this->__typedef["{urn:$this->namespace}kt_server_settings_response"] = + array( + 'status_code' => 'int', + 'message' => 'string', + 'settings' => "{urn:$this->namespace}kt_server_settings" + ); + /* methods */ // login @@ -420,19 +433,19 @@ class KTWebService // checkin_document $this->__dispatch_map['checkin_document'] = array('in' => array('session_id'=>'string','document_id'=>'int','filename'=>'string','reason' =>'string','tempfilename' =>'string', 'major_update'=>'boolean' ), - 'out' => array( 'return' => "{urn:$this->namespace}kt_response" ), + 'out' => array( 'return' => "{urn:$this->namespace}kt_document_detail" ), ); // checkin_small_document $this->__dispatch_map['checkin_small_document'] = array('in' => array('session_id'=>'string','document_id'=>'int','filename'=>'string','reason' =>'string','base64' =>'string', 'major_update'=>'boolean' ), - 'out' => array( 'return' => "{urn:$this->namespace}kt_response" ), + 'out' => array( 'return' => "{urn:$this->namespace}kt_document_detail" ), ); // checkin_base64_document $this->__dispatch_map['checkin_base64_document'] = array('in' => array('session_id'=>'string','document_id'=>'int','filename'=>'string','reason' =>'string','base64' =>'string', 'major_update'=>'boolean' ), - 'out' => array( 'return' => "{urn:$this->namespace}kt_response" ), + 'out' => array( 'return' => "{urn:$this->namespace}kt_document_detail" ), 'alias' => 'checkin_small_document' ); @@ -615,12 +628,19 @@ class KTWebService array('in' => array('session_id'=>'string' ), 'out' => array( 'return' => "{urn:$this->namespace}kt_document_types_response" ), ); + // get_document_link_types $this->__dispatch_map['get_document_link_types'] = array('in' => array('session_id'=>'string' ), 'out' => array( 'return' => "{urn:$this->namespace}kt_document_types_response" ), ); + // get_server_settings + $this->__dispatch_map['get_server_settings'] = + array('in' => array('session_id'=>'string' ), + 'out' => array( 'return' => "{urn:$this->namespace}kt_server_settings_response" ), + ); + } @@ -2954,6 +2974,31 @@ class KTWebService return $response; } + /** + * Retrieves the server settings for this server + * + * @param string $session_id + * @return kt_server_settings_response + */ + function get_server_settings($session_id) + { + $kt = &$this->get_ktapi($session_id ); + if (is_array($kt)) + { + return new SOAP_Value('return',"{urn:$this->namespace}kt_response", $kt); + } + + $dms_defaults = $kt->get_dms_defaults(); + $response['settings'] = array( + 'explorer_metadata_capture' => $dms_defaults->explorerMetadataCapture, + 'office_metadata_capture' => $dms_defaults->officeMetadataCapture + ); + $response['message'] = 'Knowledgetree server settings retrieval succeeded.'; + $response['status_code'] = KTWS_SUCCESS; + + return $response; + } + /** * This runs the web service *