diff --git a/dmsctl.vbs b/dmsctl.vbs index 4ce0202..e32f011 100644 --- a/dmsctl.vbs +++ b/dmsctl.vbs @@ -159,20 +159,20 @@ Else If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = FALSE - writeLog "The " & KTOFFICE & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + writeLog "The " & KTOFFICE & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTOFFICE & " KnowledgeTree service was successfully started" End If writeLog "Successfully started " & KTOFFICE Else - writeLog KTOFFICE & " already started. Result Code: " & lastErrorCode + writeLog KTOFFICE & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service was successfully started" Else - Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If Case "scheduler" @@ -181,20 +181,20 @@ Else If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = FALSE - writeLog "The " & KTSCHEDULER & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + writeLog "The " & KTSCHEDULER & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTSCHEDULER & " KnowledgeTree service was successfully started" End If writeLog "Successfully started " & KTSCHEDULER Else - writeLog KTSCHEDULER & " already started. Result Code: " & lastErrorCode + writeLog KTSCHEDULER & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service was successfully started" Else - Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If Case "lucene" @@ -203,20 +203,20 @@ Else If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = false - writeLog "The " & KTLUCENE & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + writeLog "The " & KTLUCENE & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTLUCENE & " KnowledgeTree service was successfully started" End If writeLog "Successfully started " & KTLUCENE Else - writeLog KTLUCENE & " already started. Result Code: " & lastErrorCode + writeLog KTLUCENE & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service was successfully started" Else - Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service could not be started. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service could not be started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If End Select Else @@ -226,30 +226,36 @@ Else If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = false - End If - writeLog "Successfully started " & KTOFFICE + writeLog "Couldn't start. " & KTOFFICE & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTOFFICE & " already started. Result Code: " & lastErrorCode + writeLog "Successfully started " & KTOFFICE + End If + Else + writeLog KTOFFICE & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If svcName = KTSCHEDULER If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = false - End If - writeLog "Successfully started " & KTSCHEDULER + writeLog "Couldn't start " & KTSCHEDULER & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTSCHEDULER & " already started. Result Code: " & lastErrorCode + writeLog "Successfully started " & KTSCHEDULER + End If + Else + writeLog KTSCHEDULER & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If svcName = KTLUCENE If (NOT isServiceStarted(svcName)) Then If (NOT startService(svcName)) Then isSuccess = false - End If - writeLog "Successfully started " & KTLUCENE + writeLog "Couldn't start " & KTLUCENE & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTLUCENE & " already started. Result Code: " & lastErrorCode + writeLog "Successfully started " & KTLUCENE + End If + Else + writeLog KTLUCENE & " already started. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then @@ -267,20 +273,20 @@ Else If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - writeLog "The " & KTOFFICE & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + writeLog "The " & KTOFFICE & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTOFFICE & " KnowledgeTree service was successfully stopped" End If writeLog "Successfully stopped " & KTOFFICE Else - writeLog KTOFFICE & " already stopped. Result Code: " & lastErrorCode + writeLog KTOFFICE & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service was successfully stopped" Else - Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTOFFICE & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If Case "scheduler" @@ -289,20 +295,20 @@ Else If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - writeLog "The " & KTSCHEDULER & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + writeLog "The " & KTSCHEDULER & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTSCHEDULER & " KnowledgeTree service was successfully stopped" End If writeLog "Successfully stopped " & KTSCHEDULER Else - writeLog KTSCHEDULER & " already stopped. Result Code: " & lastErrorCode + writeLog KTSCHEDULER & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service was successfully stopped" Else - Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTSCHEDULER & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If Case "lucene" @@ -311,20 +317,20 @@ Else If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - writeLog "The " & KTLUCENE & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + writeLog "The " & KTLUCENE & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) Else writeLog "The " & KTLUCENE & " KnowledgeTree service was successfully stopped" End If writeLog "Successfully stopped " & KTLUCENE Else - writeLog KTLUCENE & " already stopped. Result Code: " & lastErrorCode + writeLog KTLUCENE & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service was successfully stopped" Else - Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service could not be stopped. Result Code: " & lastErrorCode + Wscript.Echo "The " & KTLUCENE & " KnowledgeTree service could not be stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If End Select Else @@ -335,30 +341,36 @@ Else If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - End If - writeLog "Successfully stopped " & KTOFFICE + writeLog "Couldn't stop." & KTOFFICE & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTOFFICE & " already stopped. Result Code: " & lastErrorCode + writeLog "Successfully stopped " & KTOFFICE + End If + Else + writeLog KTOFFICE & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If svcName = KTSCHEDULER If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - End If - writeLog "Successfully stopped " & KTSCHEDULER + writeLog "Couldn't stop." & KTSCHEDULER & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTSCHEDULER & " already stopped. Result Code: " & lastErrorCode + writeLog "Successfully stopped " & KTSCHEDULER + End If + Else + writeLog KTSCHEDULER & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If svcName = KTLUCENE If (isServiceStarted(svcName)) Then If (NOT stopService(svcName)) Then isSuccess = false - End If - writeLog "Successfully stopped " & KTLUCENE + writeLog "Couldn't stop." & KTLUCENE & " Result Code: " & getServiceErrorMessage(lastErrorCode) Else - writeLog KTLUCENE & " already stopped. Result Code: " & lastErrorCode + writeLog "Successfully stopped " & KTLUCENE + End If + Else + writeLog KTLUCENE & " already stopped. Result Code: " & getServiceErrorMessage(lastErrorCode) End If If (isSuccess) Then @@ -669,3 +681,59 @@ Public Sub writeLog(ByVal strMessage) objTextFile.Close End Sub +Public Function getServiceErrorMessage(ByVal errCode) + Select Case errCode + Case SVC_SUCCESS + getServiceErrorMessage = "Success" + Case SVC_NOT_SUPPORTED + getServiceErrorMessage = "Not Supported" + Case SVC_ACCESS_DENIED + getServiceErrorMessage = "Access Denied" + Case SVC_DEPENDENT_SERVICES_RUNNING + getServiceErrorMessage = "Dependent Services Running" + Case SVC_INVALID_SERVICE_CONTROL + getServiceErrorMessage = "Invalid Service Control" + Case SVC_SERVICE_CANNOT_ACCEPT_CONTROL + getServiceErrorMessage = "Service Cannot Accept Control" + Case SVC_SERVICE_NOT_ACTIVE + getServiceErrorMessage = "Service Not Active" + Case SVC_SERVICE_REQUEST_TIMEOUT + getServiceErrorMessage = "Service Request Timeout" + Case SVC_UNKNOWN_FAILURE + getServiceErrorMessage = "Unknown Failure" + Case SVC_PATH_NOT_FOUND + getServiceErrorMessage = "Path Not Found" + Case SVC_SERVICE_ALREADY_RUNNING + getServiceErrorMessage = "Service Already Running" + Case SVC_SERVICE_DATABASE_LOCKED + getServiceErrorMessage = "Service Database Locked" + Case SVC_SERVICE_DEPENDENCY_DELETED + getServiceErrorMessage = "Service Dependency Deleted" + Case SVC_SERVICE_DEPENDENCY_FAILURE + getServiceErrorMessage = "Service Dependency Failure" + Case SVC_SERVICE_DISABLED + getServiceErrorMessage = "Service Disabled" + Case SVC_SERVICE_LOGON_FAILURE + getServiceErrorMessage = "Service Logon Failure" + Case SVC_SERVICE_MARKED_FOR_DELETION + getServiceErrorMessage = "Service Marked For Deletion" + Case SVC_SERVICES_NO_THREAD + getServiceErrorMessage = "Service No Thread" + Case SVC_STATUS_CIRCULAR_DEPENDENCY + getServiceErrorMessage = "Status Circular Dependency" + Case SVC_STATUS_DUPLICATE_NAME + getServiceErrorMessage = "Status Duplicate Name" + Case SVC_INVALID_NAME + getServiceErrorMessage = "Status Invalid Name" + Case SVC_STATUS_INVALID_PARAMETER + getServiceErrorMessage = "Status Invalid Parameter" + Case SVC_INVALID_SERVICES_ACCOUNT + getServiceErrorMessage = "Status Invalid Service Account" + Case SVC_STATUS_SERVICE_EXISTS + getServiceErrorMessage = "Status Service Exists" + Case SVC_SERVICE_ALREADY_PAUSED + getServiceErrorMessage = "Service Already Paused" + Case Else + getServiceErrorMessage = "Unknown Failure" + End Select +End Function diff --git a/plugins/ktstandard/documentpreview/documentPreview.php b/plugins/ktstandard/documentpreview/documentPreview.php index 8c2ef1f..7ace091 100755 --- a/plugins/ktstandard/documentpreview/documentPreview.php +++ b/plugins/ktstandard/documentpreview/documentPreview.php @@ -176,7 +176,11 @@ class DocumentPreview { $sInfo = $this->getMetadata(); - return '
'.$sInfo.'
'; + $sInfo = '
'.$sInfo.'
'; + + $sInfo .= $this->getThumbnail(); + + return $sInfo; } /** @@ -280,8 +284,6 @@ class DocumentPreview { $sInfo .= "{$sIdLb}{$sId}"; $sInfo .= " "; - $sInfo .= $this->getThumbnail(); - return $sInfo; } diff --git a/setup/migrate/steps/migrateDatabase.php b/setup/migrate/steps/migrateDatabase.php index d304329..ca4fbdc 100644 --- a/setup/migrate/steps/migrateDatabase.php +++ b/setup/migrate/steps/migrateDatabase.php @@ -171,7 +171,7 @@ class migrateDatabase extends Step $cmd = $exe.' -u"'.$dbAdminUser.'" -p"'.$dbAdminPass.'" --port="'.$port.'" '.$dbName.' > '.$sqlFile; if($noFile) { $this->error[]['error'] = "The KnowledgeTree Setup Wizard was unable to connect to your KnowledgeTree 3.6.1 database."; - $this->error[]['msg'] = "Please ensure that all KnowledgeTree Services are running."; + $this->error[]['msg'] = "Please ensure that your KnowledgeTree Mysql service is running."; $this->error[]['cmd'] = "Click Next after resolving the above errors."; $this->temp_variables['manual_export'] = ""; } else { diff --git a/setup/upgrade/steps/upgradeBackup.php b/setup/upgrade/steps/upgradeBackup.php index cdbd553..757ca22 100644 --- a/setup/upgrade/steps/upgradeBackup.php +++ b/setup/upgrade/steps/upgradeBackup.php @@ -208,7 +208,7 @@ class upgradeBackup extends Step { $prefix = ''; if (!WINDOWS_OS) { - $prefix .= "./"; + $prefix .= "";//$prefix .= "./"; } if (@stat($dbSocket) !== false) diff --git a/setup/upgrade/templates/complete.tpl b/setup/upgrade/templates/complete.tpl index 0099c84..93b26ee 100644 --- a/setup/upgrade/templates/complete.tpl +++ b/setup/upgrade/templates/complete.tpl @@ -20,7 +20,8 @@

- To start the services, execute the dmsctl.bat batch file in the KnowledgeTree directory from a command prompt, run as administrator. + To start the services, using the instructions below: +

@@ -30,11 +31,11 @@
[START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [services]
- Click [Install Services] + Right-Click and run [Install Services] as administrator
[START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [services]
- Click [Start Services] + Right-Click and run [Start Services] as administrator

Alternatively: diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php index 400bd7f..d127fdc 100644 --- a/setup/wizard/installUtil.php +++ b/setup/wizard/installUtil.php @@ -1061,9 +1061,6 @@ class InstallUtil { // {{{ copyDirectory function copyDirectory($sSrc, $sDst, $bMove = false) { - if (file_exists($sDst)) { - return false; //PEAR::raiseError(_kt("Destination directory already exists.")); - } if (!WINDOWS_OS) { if ($bMove && file_exists('/bin/mv')) { $this->pexec(array('/bin/mv', $sSrc, $sDst)); @@ -1081,15 +1078,13 @@ class InstallUtil { if ($hSrc === false) { return false; //PEAR::raiseError(sprintf(_kt("Could not open source directory: %s"), $sSrc)); } - if (@mkdir($sDst, 0777) === false) { - return false; //PEAR::raiseError(sprintf(_kt("Could not create destination directory: %s"), $sDst)); - } + @mkdir($sDst, 0777); while (($sFilename = readdir($hSrc)) !== false) { if (in_array($sFilename, array('.', '..'))) { continue; } - $sOldFile = sprintf("%s/%s", $sSrc, $sFilename); - $sNewFile = sprintf("%s/%s", $sDst, $sFilename); + $sOldFile = sprintf("%s" . DS . "%s", $sSrc, $sFilename); + $sNewFile = sprintf("%s" . DS . "%s", $sDst, $sFilename); if (is_dir($sOldFile)) { $this->copyDirectory($sOldFile, $sNewFile, $bMove); continue; diff --git a/setup/wizard/resources/css/wizard.css b/setup/wizard/resources/css/wizard.css index 929bbc0..6dc3779 100644 --- a/setup/wizard/resources/css/wizard.css +++ b/setup/wizard/resources/css/wizard.css @@ -64,7 +64,7 @@ select { /* *** Layout Styles *** */ #wrapper { - background: white; min-height:410px; + background: white; min-height:500px; } #outer-wrapper { @@ -87,12 +87,12 @@ select { #container { background: white url("../graphics/left.png") repeat-y left; overflow:auto; - /*min-height:630px;height:410px;*/min-height:410px; + /*min-height:630px;height:410px;*/min-height:500px; } #content { margin-left: 220px; - /*height:515px;*/height:400px; + /*height:515px;*/height:500px; } #content_container { diff --git a/setup/wizard/steps/install.php b/setup/wizard/steps/install.php index 0e4b78b..6659137 100644 --- a/setup/wizard/steps/install.php +++ b/setup/wizard/steps/install.php @@ -104,6 +104,14 @@ class install extends step public function installStep() { $this->callHome(); + // copy indexing directory if this is a migration + $this->setDataFromSession(); + if ($this->util->isMigration()) { + $migrateSessionData = $this->getDataFromPackage('migrate', 'installation'); + $src = $migrateSessionData['location'] . DS . 'var' . DS . 'indexes'; + $dst = SYSTEM_DIR . 'var' . DS . 'indexes'; + $this->util->copyDirectory($src, $dst); + } } /** diff --git a/setup/wizard/templates/complete.tpl b/setup/wizard/templates/complete.tpl index 1f57252..4bc2b1e 100644 --- a/setup/wizard/templates/complete.tpl +++ b/setup/wizard/templates/complete.tpl @@ -23,7 +23,8 @@

- To start the services, execute the dmsctl.bat batch file in the KnowledgeTree directory from a command prompt, run as administrator. + To start the services, using the instructions below: +

@@ -33,11 +34,11 @@
[START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [services]
- Click [Install Services] + Right-Click and run [Install Services] as administrator
[START MENU] => [Programs] => [KnowledgeTree 3.7.x] => [services]
- Click [Start Services] + Right-Click and run [Start Services] as administrator

Alternatively: