Commit a2de260d62f6d61e772a2e0f59349fbbbf58e9f3

Authored by Prince Mbekwa
2 parents 3b6b9eab 581a27ca

Merge branch 'edge' of github.com:ktgit/knowledgetree into edge

dmsctl.vbs
1 -' This script should only be invoked for Vista and Windows 7 1 +'
  2 +' KnowledgeTree
  3 +'
  4 +'
  5 +'
  6 +
  7 +' Service Name Consts
  8 +Const KTOFFICE = "KTOpenOffice"
  9 +Const KTSCHEDULER = "KTScheduler"
  10 +Const KTLUCENE = "KTLucene"
  11 +
  12 +' Service Control Manager Error Code Consts
  13 +Const SVC_SUCCESS = 0 ' Success
  14 +Const SVC_NOT_SUPPORTED = 1 ' Not Supported
  15 +Const SVC_ACCESS_DENIED = 2 ' Access Denied
  16 +Const SVC_DEPENDENT_SERVICES_RUNNING = 3 ' Dependent Services Running
  17 +Const SVC_INVALID_SERVICE_CONTROL = 4 ' Invalid Service Control
  18 +Const SVC_SERVICE_CANNOT_ACCEPT_CONTROL = 5 ' Service Cannot Accept Control
  19 +Const SVC_SERVICE_NOT_ACTIVE = 6 ' Service Not Active
  20 +Const SVC_SERVICE_REQUEST_TIMEOUT = 7 ' Service Request Timeout
  21 +Const SVC_UNKNOWN_FAILURE = 8 ' Unknown Failure
  22 +Const SVC_PATH_NOT_FOUND = 9 ' Path Not Found
  23 +Const SVC_SERVICE_ALREADY_RUNNING = 10 ' Service Already Running
  24 +Const SVC_SERVICE_DATABASE_LOCKED = 11 ' Service Database Locked
  25 +Const SVC_SERVICE_DEPENDENCY_DELETED = 12 ' Service Dependency Deleted
  26 +Const SVC_SERVICE_DEPENDENCY_FAILURE = 13 ' Service Dependency Failure
  27 +Const SVC_SERVICE_DISABLED = 14 ' Service Disabled
  28 +Const SVC_SERVICE_LOGON_FAILURE = 15 ' Service Logon Failure
  29 +Const SVC_SERVICE_MARKED_FOR_DELETION = 16 ' Service Marked For Deletion
  30 +Const SVC_SERVICES_NO_THREAD = 17 ' Service No Thread
  31 +Const SVC_STATUS_CIRCULAR_DEPENDENCY = 18 ' Status Circular Dependency
  32 +Const SVC_STATUS_DUPLICATE_NAME = 19 ' Status Duplicate Name
  33 +Const SVC_INVALID_NAME = 20 ' Status Invalid Name
  34 +Const SVC_STATUS_INVALID_PARAMETER = 21 ' Status Invalid Parameter
  35 +Const SVC_INVALID_SERVICES_ACCOUNT = 22 ' Status Invalid Service Account
  36 +Const SVC_STATUS_SERVICE_EXISTS = 23 ' Status Service Exists
  37 +Const SVC_SERVICE_ALREADY_PAUSED = 24 ' Service Already Paused
2 38
3 'Detecting current OS 39 'Detecting current OS
4 -strComputer = "." 40 +Dim strComputer, currOS, doRunAs
  41 +
  42 +strComputer = "."
5 currOS = "" 43 currOS = ""
6 doRunAs = false 44 doRunAs = false
7 45
8 Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 46 Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
9 Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") 47 Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
10 48
11 -For Each objOperatingSystem in colOperatingSystems  
12 - currOS = objOperatingSystem.Caption & " " & objOperatingSystem.Version  
13 - currOS = trim(currOS) 49 +For Each objOperatingSystem in colOperatingSystems
  50 + currOS = objOperatingSystem.Caption & " " & objOperatingSystem.Version
  51 + currOS = trim(currOS)
14 Next 52 Next
15 53
16 -If left(currOS, 19) = "Microsoft Windows 7" Then  
17 - doRunAs = true  
18 -End If 54 +Public Function isWindowsVista()
  55 + isWindows7 = false
  56 + If left(currOS, 19) = "Microsoft Windows Vista" Then
  57 + isWindows7 = true
  58 + End If
  59 +End Function
  60 +
  61 +Public Function isWindows7()
  62 + isWindows7 = false
  63 + If left(currOS, 19) = "Microsoft Windows 7" Then
  64 + isWindows7 = true
  65 + End If
  66 +End Function
  67 +
  68 +Public Function isWindows2008()
  69 + isWindows7 = false
  70 + If left(currOS, 19) = "Microsoft Windows 2008" Then
  71 + isWindows7 = true
  72 + End If
  73 +End Function
19 74
  75 +' Will call this further down when the individual services need starting
20 If doRunAs = true Then 76 If doRunAs = true Then
21 - Set objShell = CreateObject("Shell.Application")  
22 - Set objFolder = objShell.Namespace("C:\Program Files (x86)\Zend\ktdms\knowledgetree")  
23 - Set objFolderItem = objFolder.ParseName("dmsctl_install.bat")  
24 - objFolderItem.InvokeVerb "runas"  
25 -End If  
26 \ No newline at end of file 77 \ No newline at end of file
  78 + 'runAs "C:\Program Files (x86)\Zend\ktdms\knowledgetree", "dmsctl_install.bat"
  79 +End If
  80 +
  81 +Public Sub runAs(ByVal strFolder, ByVal strFile)
  82 + Set objShell = CreateObject("Shell.Application")
  83 + Set objFolder = objShell.Namespace(strFolder)
  84 + Set objFolderItem = objFolder.ParseName(strFile)
  85 + objFolderItem.InvokeVerb "runas"
  86 +End Sub
  87 +
  88 +dim objArgs, errMsg, result, strUsage, isSuccess
  89 +
  90 +strUsage = "USAGE:" &_
  91 +"dmsctl.bat <start|stop|restart|install|uninstall> [servicename]" & vbNewLine &_
  92 +vbNewLine &_
  93 +"help - this screen " & vbNewLine &_
  94 +"start - start the services" & vbNewLine &_
  95 +"stop - stop the services" & vbNewLine &_
  96 +"restart - restart the services" & vbNewLine &_
  97 +"install - install the services" & vbNewLine &_
  98 +"uninstall - uninstall the services" & vbNewLine &_
  99 +vbNewLine &_
  100 +"servicename - optional service name to start/stop only that service." & vbNewLine &_
  101 +" only mysql is supported for individual control at this time."
  102 +
  103 +Set objArgs = WScript.Arguments
  104 +If objArgs.count < 1 Then
  105 + Wscript.Echo strUsage
  106 +Else
  107 + Select Case objArgs.Item(0)
  108 + Case "install"
  109 + isSuccess = true ' Track if anything went wrong
  110 +
  111 + ' Installing KTOffice
  112 + result = exec("C:\Program Files\Zend\ktdms\knowledgetree\var\bin\officeinstall.bat")
  113 +
  114 + 'Install Failed
  115 + If result = 0 Then
  116 + isSuccess = false
  117 + logEvent "The KnowledgeTree KTOffice service could not be installed"
  118 + End If
  119 +
  120 + ' Installing KTScheduler
  121 + result = exec("C:\Program Files\Zend\ktdms\knowledgetree\var\bin\schedulerinstall.bat")
  122 +
  123 + 'Install Failed
  124 + If result = 0 Then
  125 + isSuccess = false
  126 + logEvent "The KnowledgeTree KTScheduler service could not be installed"
  127 + End If
  128 +
  129 + ' Installing KTLucene
  130 + result = exec("C:\Program Files\Zend\ktdms\knowledgetree\var\bin\luceneinstall.bat")
  131 +
  132 + 'Install Failed
  133 + If result = 0 Then
  134 + isSuccess = false
  135 + logEvent "The KnowledgeTree KTLucene service could not be installed"
  136 + End If
  137 +
  138 + If (isSuccess) Then
  139 + Wscript.Echo "The KnowledgeTree services were successfully installed"
  140 + Else
  141 + Wscript.Echo "There were errors installing the KnowledgeTree services please see the log for details ('knowledgetree/var/log/dmsctl.log')"
  142 + End If
  143 +
  144 + Case "start"
  145 + isSuccess = true
  146 +
  147 + svcName = KTOFFICE
  148 + If (NOT isServiceStarted(svcName)) Then
  149 + If (NOT startService(svcName)) Then
  150 + isSuccess = false
  151 + End If
  152 + End If
  153 +
  154 + svcName = KTSCHEDULER
  155 + If (NOT isServiceStarted(svcName)) Then
  156 + If (NOT startService(svcName)) Then
  157 + isSuccess = false
  158 + End If
  159 + End If
  160 +
  161 + svcName = KTLUCENE
  162 + If (NOT isServiceStarted(svcName)) Then
  163 + If (NOT startService(svcName)) Then
  164 + isSuccess = false
  165 + End If
  166 + End If
  167 +
  168 + If (isSuccess) Then
  169 + Wscript.Echo "The KnowledgeTree services were successfully started"
  170 + Else
  171 + Wscript.Echo "There were errors starting the KnowledgeTree services please see the log for details ('knowledgetree/var/log/dmsctl.log')"
  172 + End If
  173 +
  174 + Case "stop"
  175 + isSuccess = true
  176 +
  177 + svcName = KTOFFICE
  178 + If (isServiceStarted(svcName)) Then
  179 + If (NOT stopService(svcName)) Then
  180 + isSuccess = false
  181 + End If
  182 + End If
  183 +
  184 + svcName = KTSCHEDULER
  185 + If (isServiceStarted(svcName)) Then
  186 + If (NOT stopService(svcName)) Then
  187 + isSuccess = false
  188 + End If
  189 + End If
  190 +
  191 + svcName = KTLUCENE
  192 + If (isServiceStarted(svcName)) Then
  193 + If (NOT stopService(svcName)) Then
  194 + isSuccess = false
  195 + End If
  196 + End If
  197 +
  198 + If (isSuccess) Then
  199 + Wscript.Echo "The KnowledgeTree services were successfully stopped"
  200 + Else
  201 + Wscript.Echo "There were errors sopping the KnowledgeTree services please see the log for details ('knowledgetree/var/log/dmsctl.log')"
  202 + End If
  203 +
  204 + Case "uninstall"
  205 + isSuccess = true ' Track if anything went wrong
  206 +
  207 + ' Stopping Then Uninstalling
  208 + 'svcName = KTOFFICE
  209 + 'If (isServiceStarted(svcName)) Then
  210 + ' If (NOT stopService(svcName)) Then
  211 + ' isSuccess = false
  212 + ' End If
  213 + 'End If
  214 +
  215 + ' Uninstalling KTOffice
  216 + result = exec("sc delete " & KTOFFICE)
  217 +
  218 + 'Uninstall Failed
  219 + If result = 0 Then
  220 + isSuccess = false
  221 + logEvent "The KnowledgeTree KTOffice service could not be uninstalled"
  222 + End If
  223 +
  224 + ' Stopping Then Uninstalling
  225 + 'svcName = KTSCHEDULER
  226 + 'If (isServiceStarted(svcName)) Then
  227 + ' If (NOT stopService(svcName)) Then
  228 + ' isSuccess = false
  229 + ' End If
  230 + 'End If
  231 +
  232 + ' Uninstalling KTScheduler
  233 + result = exec("sc delete " & KTSCHEDULER)
  234 +
  235 + 'Uninstall Failed
  236 + If result = 0 Then
  237 + isSuccess = false
  238 + logEvent "The KnowledgeTree KTScheduler service could not be uninstalled"
  239 + End If
  240 +
  241 +
  242 +
  243 + ' Stopping Then Uninstalling
  244 + 'svcName = KTLUCENE
  245 + 'If (isServiceStarted(svcName)) Then
  246 + ' If (NOT stopService(svcName)) Then
  247 + ' isSuccess = false
  248 + ' End If
  249 + 'End If
  250 +
  251 + ' Uninstalling KTLucene
  252 + result = exec("sc delete " & KTLUCENE)
  253 +
  254 + 'Uninstall Failed
  255 + If result = 0 Then
  256 + isSuccess = false
  257 + logEvent "The KnowledgeTree KTLucene service could not be uninstalled"
  258 + End If
  259 +
  260 + If (isSuccess) Then
  261 + Wscript.Echo "The KnowledgeTree services were uninstalled"
  262 + Else
  263 + Wscript.Echo "There were errors uninstalling the KnowledgeTree services please see the log for details ('knowledgetree/var/log/dmsctl.log')"
  264 + End If
  265 +
  266 + Case Else
  267 + Wscript.Echo strUsage
  268 + End Select
  269 +
  270 +End If
  271 +
  272 +' Method to interrogate a service
  273 +Public Function isServiceStarted(ByVal svcName)
  274 + strComputer = "."
  275 + Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
  276 + ' Obtain an instance of the the class
  277 + ' using a key property value.
  278 + Set objShare = objWMIService.Get("Win32_Service.Name='" & svcName & "'")
  279 +
  280 + ' no InParameters to define
  281 +
  282 + ' Execute the method and obtain the return status.
  283 + ' The OutParameters object in objOutParams
  284 + ' is created by the provider.
  285 + Set objOutParams = objWMIService.ExecMethod("Win32_Service.Name='" & svcName & "'", "InterrogateService")
  286 +
  287 + If (objOutParams.ReturnValue = SVC_SERVICE_NOT_ACTIVE) Then
  288 + isServiceStarted = FALSE
  289 + Else
  290 + isServiceStarted = TRUE
  291 + End If
  292 +
  293 +end Function
  294 +
  295 +' Method to start a service
  296 +Public Function startService(ByVal svcName)
  297 + strComputer = "."
  298 + Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
  299 + ' Obtain an instance of the the class
  300 + ' using a key property value.
  301 + Set objShare = objWMIService.Get("Win32_Service.Name='" & svcName &"'")
  302 +
  303 + ' no InParameters to define
  304 +
  305 + ' Execute the method and obtain the return status.
  306 + ' The OutParameters object in objOutParams
  307 + ' is created by the provider.
  308 + Set objOutParams = objWMIService.ExecMethod("Win32_Service.Name='" & svcName & "'", "StartService")
  309 +
  310 + If (objOutParams.ReturnValue = SVC_SUCCESS) Then
  311 + startService = TRUE
  312 + Else
  313 + startService = FALSE
  314 + End If
  315 +
  316 +End Function
  317 +
  318 +' Method to stop a service
  319 +Public Function stopService(ByVal svcName)
  320 + strComputer = "."
  321 + Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
  322 + ' Obtain an instance of the the class
  323 + ' using a key property value.
  324 + Set objShare = objWMIService.Get("Win32_Service.Name='" & svcName &"'")
  325 +
  326 + ' no InParameters to define
  327 +
  328 + ' Execute the method and obtain the return status.
  329 + ' The OutParameters object in objOutParams
  330 + ' is created by the provider.
  331 + Set objOutParams = objWMIService.ExecMethod("Win32_Service.Name='" & svcName & "'", "StopService")
  332 +
  333 + If (objOutParams.ReturnValue = SVC_SUCCESS) Then
  334 + stopService = TRUE
  335 + Else
  336 + stopService = FALSE
  337 + End If
  338 +
  339 +End Function
  340 +
  341 +' Execute a command
  342 +Public Function exec(ByVal cmd)
  343 +
  344 + Dim WshShell, oExec
  345 + Set WshShell = CreateObject("WScript.Shell")
  346 +
  347 + Set oExec = WshShell.Exec(cmd)
  348 +
  349 + Do While oExec.Status = 0
  350 + WScript.Sleep 100
  351 + Loop
  352 +
  353 + exec = oExec.Status
  354 +
  355 +End Function
  356 +
  357 +Public Sub createCustomEventLog(ByVal strName)
  358 + Const NO_VALUE = Empty
  359 +
  360 + Set WshShell = WScript.CreateObject("WScript.Shell")
  361 + WshShell.RegWrite _
  362 + "HKLM\System\CurrentControlSet\Services\EventLog\" & strName & "\", NO_VALUE
  363 +End Sub
  364 +
  365 +' Event logging only works on Server 2003, 2000 and XP
  366 +Public Sub logEvent(ByVal strMessage)
  367 +
  368 + If (NOT isWindowsVista() AND NOT isWindows7 AND NOT isWindows2008) Then
  369 + Const EVENT_SUCCESS = 0
  370 + Set objShell = Wscript.CreateObject("Wscript.Shell")
  371 + objShell.LogEvent EVENT_SUCCESS, strMessage
  372 + End If
  373 +
  374 +End Sub
setup/migrate/steps/migrateInstallation.php
@@ -160,7 +160,7 @@ class migrateInstallation extends step @@ -160,7 +160,7 @@ class migrateInstallation extends step
160 public function checkVersion() { 160 public function checkVersion() {
161 if($this->foundVersion < $this->supportedVersion) { 161 if($this->foundVersion < $this->supportedVersion) {
162 $this->versionError = true; 162 $this->versionError = true;
163 - $this->error[] = "KT installation needs to be 3.6.1 or higher"; 163 + $this->error[] = "KnowledgeTree installation needs to be 3.6.1 or higher";
164 return false; 164 return false;
165 } 165 }
166 166
@@ -173,7 +173,7 @@ class migrateInstallation extends step @@ -173,7 +173,7 @@ class migrateInstallation extends step
173 $foundVersion = file_get_contents($verFile); 173 $foundVersion = file_get_contents($verFile);
174 return $foundVersion; 174 return $foundVersion;
175 } else { 175 } else {
176 - $this->error[] = "KT installation version not found"; 176 + $this->error[] = "KnowledgeTree installation version not found";
177 } 177 }
178 178
179 return false; 179 return false;
@@ -214,10 +214,10 @@ class migrateInstallation extends step @@ -214,10 +214,10 @@ class migrateInstallation extends step
214 214
215 return true; 215 return true;
216 } 216 }
217 - $this->error[] = "KT installation configuration file empty"; 217 + $this->error[] = "KnowledgeTree installation configuration file empty";
218 } 218 }
219 } else { 219 } else {
220 - $this->error[] = "KT installation configuration file not found"; 220 + $this->error[] = "KnowledgeTree installation configuration file not found";
221 } 221 }
222 } else { 222 } else {
223 $this->error[] = "Please Enter a Location"; 223 $this->error[] = "Please Enter a Location";
setup/upgrade/step.php
@@ -467,7 +467,7 @@ class Step @@ -467,7 +467,7 @@ class Step
467 $foundVersion = file_get_contents($verFile); 467 $foundVersion = file_get_contents($verFile);
468 return $foundVersion; 468 return $foundVersion;
469 } else { 469 } else {
470 - $this->error[] = "KT installation version not found"; 470 + $this->error[] = "KnowledgeTree installation version not found";
471 } 471 }
472 472
473 return false; 473 return false;
setup/upgrade/steps/upgradeDatabase.php
@@ -202,7 +202,7 @@ class upgradeDatabase extends Step @@ -202,7 +202,7 @@ class upgradeDatabase extends Step
202 $foundVersion = file_get_contents($verFile); 202 $foundVersion = file_get_contents($verFile);
203 return $foundVersion; 203 return $foundVersion;
204 } else { 204 } else {
205 - $this->error[] = "KT installation version not found"; 205 + $this->error[] = "KnowledgeTree installation version not found";
206 } 206 }
207 207
208 return false; 208 return false;
setup/upgrade/templates/installation.tpl
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 You will not be able to log into KnowledgeTree until your the database upgrade process is completed. 8 You will not be able to log into KnowledgeTree until your the database upgrade process is completed.
9 </p> 9 </p>
10 <p class="empty_space"> 10 <p class="empty_space">
11 - <font color="#ffa500">!!NB!! You are advised to backup the database before attempting the upgrade. !!NB!!</font> 11 + <font color="red">You are advised to backup the database before attempting the upgrade.</font>
12 </p> 12 </p>
13 <p class="empty_space"></p> 13 <p class="empty_space"></p>
14 If you have already done this, you may skip this step and can continue directly to the upgrade. 14 If you have already done this, you may skip this step and can continue directly to the upgrade.
setup/upgrade/upgradeWizard.php
@@ -146,18 +146,6 @@ class UpgradeWizard { @@ -146,18 +146,6 @@ class UpgradeWizard {
146 } 146 }
147 147
148 /** 148 /**
149 - * Create upgrade file  
150 - *  
151 - * @author KnowledgeTree Team  
152 - * @access private  
153 - * @param none  
154 - * @return void  
155 - */  
156 - private function createUpgradeFile() {  
157 - touch(SYSTEM_DIR.'var'.DS.'bin'.DS."upgrade.lock");  
158 - }  
159 -  
160 - /**  
161 * Remove upgrade file 149 * Remove upgrade file
162 * 150 *
163 * @author KnowledgeTree Team 151 * @author KnowledgeTree Team
@@ -222,8 +210,6 @@ class UpgradeWizard { @@ -222,8 +210,6 @@ class UpgradeWizard {
222 */ 210 */
223 public function dispatch() { 211 public function dispatch() {
224 $this->load(); 212 $this->load();
225 - // is this necessary?  
226 - $this->createUpgradeFile();  
227 $response = $this->systemChecks(); 213 $response = $this->systemChecks();
228 if($this->util->installationSpecified()) { // Check if the migrator needs to be accessed 214 if($this->util->installationSpecified()) { // Check if the migrator needs to be accessed
229 $this->util->redirect('../wizard/index.php?step_name=install_type'); 215 $this->util->redirect('../wizard/index.php?step_name=install_type');
setup/upgrade/upgrader.php
@@ -400,20 +400,6 @@ class Upgrader { @@ -400,20 +400,6 @@ class Upgrader {
400 for ($i=1; $i< count($steps)+1; $i++) { 400 for ($i=1; $i< count($steps)+1; $i++) {
401 $this->_upgradeHelper($steps[$i]); 401 $this->_upgradeHelper($steps[$i]);
402 } 402 }
403 -  
404 - $this->_completeUpgrade();  
405 - }  
406 -  
407 - /**  
408 - * Complete upgrade cleanup process  
409 - *  
410 - * @author KnowledgeTree Team  
411 - * @param none  
412 - * @access private  
413 - * @return void  
414 - */  
415 - private function _completeUpgrade() {  
416 - touch("upgrade");  
417 } 403 }
418 404
419 /** 405 /**
setup/wizard/installUtil.php
@@ -878,7 +878,7 @@ class InstallUtil { @@ -878,7 +878,7 @@ class InstallUtil {
878 return $type; 878 return $type;
879 } 879 }
880 880
881 - return false; 881 + return "community";
882 } 882 }
883 883
884 /** 884 /**
setup/wizard/lib/services/windowsLucene.php
@@ -424,7 +424,7 @@ class windowsLucene extends windowsService { @@ -424,7 +424,7 @@ class windowsLucene extends windowsService {
424 $luceneExe = $this->getLuceneExe(); 424 $luceneExe = $this->getLuceneExe();
425 $luceneSource = $this->getLuceneSource(); 425 $luceneSource = $this->getLuceneSource();
426 $luceneDir = $this->getluceneDir(); 426 $luceneDir = $this->getluceneDir();
427 - $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" -description "."\"".$this->description."\""." \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto"; 427 + $cmd = "\"{$luceneExe}\""." -install \"".$this->getName()."\" \"".$this->getJavaJVM(). "\" -Djava.class.path=\"".$luceneSource."\"". " -start ".$this->getLuceneServer(). " -out \"".$this->getLuceneOut()."\" -err \"".$this->getLuceneError()."\" -current \"".$luceneDir."\" -auto";
428 if(DEBUG) { 428 if(DEBUG) {
429 echo "$cmd<br/>"; 429 echo "$cmd<br/>";
430 return false; 430 return false;
setup/wizard/steps/database.php
@@ -638,6 +638,9 @@ class database extends Step @@ -638,6 +638,9 @@ class database extends Step
638 $this->error['con'] = "Could not populate schema "; 638 $this->error['con'] = "Could not populate schema ";
639 } 639 }
640 $this->writeBinaries(); 640 $this->writeBinaries();
  641 + $port = $conf['server']['port'];
  642 + $iserverPorts = 'UPDATE config_settings SET value = "'.$port.'" where group_name = "server" and item IN("internal_server_port", "server_port");'; // Update internal server port
  643 + $this->util->dbUtilities->query($iserverPorts);
641 // ensure a guid was generated and is stored 644 // ensure a guid was generated and is stored
642 $this->util->getSystemIdentifier(); 645 $this->util->getSystemIdentifier();
643 $this->reBuildPaths(); 646 $this->reBuildPaths();
@@ -767,10 +770,13 @@ class database extends Step @@ -767,10 +770,13 @@ class database extends Step
767 $this->parse_mysql_dump($sqlFile); 770 $this->parse_mysql_dump($sqlFile);
768 $dropPluginHelper = "TRUNCATE plugin_helper;"; // Remove plugin helper table 771 $dropPluginHelper = "TRUNCATE plugin_helper;"; // Remove plugin helper table
769 $this->util->dbUtilities->query($dropPluginHelper); 772 $this->util->dbUtilities->query($dropPluginHelper);
770 - $this->reBuildPaths();  
771 - 773 + $conf = $this->util->getDataFromSession('configuration');
  774 + $port = $conf['server']['port'];
  775 + $iserverPorts = 'UPDATE config_settings SET value = "'.$port.'" where group_name = "server" and item IN("internal_server_port", "server_port");'; // Update internal server port
  776 + $this->util->dbUtilities->query($iserverPorts);
772 $updateExternalBinaries = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "externalBinary";'; // Remove references to old paths 777 $updateExternalBinaries = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "externalBinary";'; // Remove references to old paths
773 $this->util->dbUtilities->query($updateExternalBinaries); 778 $this->util->dbUtilities->query($updateExternalBinaries);
  779 + $this->reBuildPaths();
774 $this->writeBinaries(); // Rebuild some of the binaries 780 $this->writeBinaries(); // Rebuild some of the binaries
775 $this->util->getSystemIdentifier(); // ensure a guid was generated and is stored 781 $this->util->getSystemIdentifier(); // ensure a guid was generated and is stored
776 782
setup/wizard/templates/database.tpl
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <div id="database" class="step1" style="display:block;"> 11 <div id="database" class="step1" style="display:block;">
12 <div class="description"> 12 <div class="description">
13 This step configures the connection to the database server and installs the database. The details for an administrative <br/> 13 This step configures the connection to the database server and installs the database. The details for an administrative <br/>
14 - user on the database server are required in order to be able to configure and install the installation database. 14 + user on the database server are required in order to be able to configure and install the KnowledgeTree database.
15 </div> 15 </div>
16 <div id="step_content_<?php echo $step_name; ?>" class="step"> 16 <div id="step_content_<?php echo $step_name; ?>" class="step">
17 <!-- Check For immediate Errors --> 17 <!-- Check For immediate Errors -->
templates/ktcore/principals/about.smarty
@@ -5,8 +5,6 @@ @@ -5,8 +5,6 @@
5 {if ($smallVersion !== 'Community Edition')} 5 {if ($smallVersion !== 'Community Edition')}
6 {i18n}All rights reserved.{/i18n}<br> 6 {i18n}All rights reserved.{/i18n}<br>
7 {/if} 7 {/if}
8 -  
9 -{i18n}.{/i18n}  
10 <br> 8 <br>
11 {if ($smallVersion == 'Community Edition')} 9 {if ($smallVersion == 'Community Edition')}
12 {i18n}This program is free software and published under the <a href=" http://www.gnu.org/licenses/">GNU General Public License version 3</a>{/i18n}<br><br> 10 {i18n}This program is free software and published under the <a href=" http://www.gnu.org/licenses/">GNU General Public License version 3</a>{/i18n}<br><br>
@@ -31,143 +29,55 @@ @@ -31,143 +29,55 @@
31 <li><a href="http://people.knowledgetree.com/">Blogs</a>: See what the KnowledgeTree team have to say</li> 29 <li><a href="http://people.knowledgetree.com/">Blogs</a>: See what the KnowledgeTree team have to say</li>
32 </ul> 30 </ul>
33 </p> 31 </p>
  32 +<br/>
34 <p> 33 <p>
35 <strong>Thanks to the following contributors for helping us with code contributions and testing...</strong></p> 34 <strong>Thanks to the following contributors for helping us with code contributions and testing...</strong></p>
36 -<ul>  
37 - <li>  
38 - Fu Bin  
39 - </li>  
40 - <li>  
41 - Blackhold  
42 - </li>  
43 - <li>  
44 - Chris Buechler  
45 - </li>  
46 - <li>  
47 - Guillaume Dufloux  
48 - </li>  
49 - <li>  
50 - David Alfonso Faspar  
51 - </li>  
52 - <li>  
53 - Ruud Feringa  
54 - </li>  
55 - <li>  
56 - Hil&aacute;rio Fernandes  
57 - </li>  
58 - <li>  
59 - William Hawkins  
60 - </li>  
61 - <li>  
62 - Lody Hoekstra  
63 - </li>  
64 - <li>  
65 - Kenny Horan  
66 - </li>  
67 - <li>  
68 - Artur Kiwa  
69 - </li>  
70 - <li>  
71 - Michael Knight  
72 - </li>  
73 - <li>  
74 - Jeongkyu Kim  
75 - </li>  
76 - <li>  
77 - Rogerio Kohler  
78 - </li>  
79 - <li>  
80 - Piotr Krawiecki  
81 - </li>  
82 - <li>  
83 - Ola Larsson  
84 - </li>  
85 - <li>  
86 - Pavel Lastovicka  
87 - </li>  
88 - <li>  
89 - Michel Loiseleur  
90 - </li>  
91 - <li>  
92 - Renat Lumpau  
93 - </li>  
94 - <li>  
95 - Marco Lusini  
96 - </li>  
97 - <li>  
98 - Michael Malone  
99 - </li>  
100 - <li>  
101 - Jochem Meijers  
102 - </li>  
103 - <li>  
104 - John Miles  
105 - </li>  
106 - <li>  
107 - Ismail Mogal  
108 - </li>  
109 - <li>  
110 - David Nalley  
111 - </li>  
112 - <li>  
113 - Marco Napetti  
114 - </li>  
115 - <li>  
116 - Manuela Patrono  
117 - </li>  
118 - <li>  
119 - Antti Poro  
120 - </li>  
121 - <li>  
122 - Nicolas Quienot  
123 - </li>  
124 - <li>  
125 - Ken Rainsforth  
126 - </li>  
127 - <li>  
128 - Antonio Rizzelli  
129 - </li>  
130 - <li>  
131 - Greg Rundlett  
132 - </li>  
133 - <li>  
134 - Leonardo Russo  
135 - </li>  
136 - <li>  
137 - Ricardo Silva  
138 - </li>  
139 - <li>  
140 - Mario Steinhoff  
141 - </li>  
142 - <li>  
143 - Phillip Steinbachs  
144 - </li>  
145 - <li>  
146 - Tahir Tahang  
147 - </li>  
148 - <li>  
149 - Paul Trgina  
150 - </li>  
151 - <li>  
152 - Harry Tsio  
153 - </li>  
154 - <li>  
155 - Bjarte Kalstveit Vebj&oslash;rnsen  
156 - </li>  
157 - <li>  
158 - Zakariah  
159 - </li>  
160 - <li>  
161 - Jaime Zarate  
162 - </li>  
163 - <li>  
164 - And all the KnowledgeTree staff that <a href="http://en.wikipedia.org/wiki/Eat_one's_own_dog_food">"dogfood"</a> KnowledgeTree every day.  
165 - </li>  
166 -  
167 -</ul> 35 + Fu Bin,
  36 + Blackhold,
  37 + Chris Buechler,
  38 + Guillaume Dufloux,
  39 + David Alfonso Faspar,
  40 + Ruud Feringa,
  41 + Hil&aacute;rio Fernandes,
  42 + William Hawkins,
  43 + Lody Hoekstra,
  44 + Kenny Horan,
  45 + Artur Kiwa,
  46 + Michael Knight,
  47 + Jeongkyu Kim,
  48 + Rogerio Kohler,
  49 + Piotr Krawiecki ,
  50 + Ola Larsson,
  51 + Pavel Lastovicka,
  52 + Michel Loiseleur ,
  53 + Renat Lumpau,
  54 + Marco Lusini,
  55 + Michael Malone,
  56 + Jochem Meijers,
  57 + John Miles,
  58 + Ismail Mogal,
  59 + David Nalley,
  60 + Marco Napetti,
  61 + Manuela Patrono,
  62 + Antti Poro,
  63 + Nicolas Quienot,
  64 + Ken Rainsforth,
  65 + Antonio Rizzelli,
  66 + Greg Rundlett,
  67 + Leonardo Russo,
  68 + Ricardo Silva,
  69 + Mario Steinhoff,
  70 + Phillip Steinbachs,
  71 + Tahir Tahang,
  72 + Paul Trgina,
  73 + Harry Tsio,
  74 + Bjarte Kalstveit Vebj&oslash;rnsen,
  75 + Zakariah,
  76 + Jaime Zarate, <br><br/>
  77 + And the KnowledgeTree team who <a href="http://en.wikipedia.org/wiki/Eat_one's_own_dog_food">"dogfood"</a> KnowledgeTree every day.
168 78
169 <p><small>[If you feel you should be here too, please let us know at <a href="mailto:contributions@knowledgetree.com">contributions@knowledgetree.com</a>]</small></p> 79 <p><small>[If you feel you should be here too, please let us know at <a href="mailto:contributions@knowledgetree.com">contributions@knowledgetree.com</a>]</small></p>
170 80
171 - 81 +<br/>
172 <p>This software utilizes third-party software from <a set="yes" linkindex="11" href="http://pear.php.net/">Pear</a>, <a set="yes" linkindex="12" href="http://phpmailer.sourceforge.net/">PHPMailer</a>, <a set="yes" linkindex="13" href="http://smarty.php.net/">Smarty Template Engine</a>, <a set="yes" linkindex="14" href="http://sourceforge.net/projects/jscalendar">JSCalendar</a>, <a set="yes" linkindex="15" href="http://mochikit.com/">Mochikit</a>, <a set="yes" linkindex="16" href="http://tinymce.moxiecode.com/">Moxiecode Systems</a>, <a set="yes" linkindex="17" href="http://developer.yahoo.com/yui/">Yahoo Developer Network</a>.</p> 82 <p>This software utilizes third-party software from <a set="yes" linkindex="11" href="http://pear.php.net/">Pear</a>, <a set="yes" linkindex="12" href="http://phpmailer.sourceforge.net/">PHPMailer</a>, <a set="yes" linkindex="13" href="http://smarty.php.net/">Smarty Template Engine</a>, <a set="yes" linkindex="14" href="http://sourceforge.net/projects/jscalendar">JSCalendar</a>, <a set="yes" linkindex="15" href="http://mochikit.com/">Mochikit</a>, <a set="yes" linkindex="16" href="http://tinymce.moxiecode.com/">Moxiecode Systems</a>, <a set="yes" linkindex="17" href="http://developer.yahoo.com/yui/">Yahoo Developer Network</a>.</p>
173 83