Commit 19dd2b6f1c498c11416fc381c2e8f5ce6df879b1

Authored by Jarrett Jordaan
1 parent 2ffd4aca

KTC-861: Updated auto detection of paths on windows.

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
setup/migrate/steps/migrateInstallation.php
@@ -128,7 +128,7 @@ class migrateInstallation extends step @@ -128,7 +128,7 @@ class migrateInstallation extends step
128 128
129 public function detectInstallation() { 129 public function detectInstallation() {
130 if(WINDOWS_OS) { 130 if(WINDOWS_OS) {
131 - $knownWindowsLocations = array("C:\Program Files\ktdms"=>"C:\Program Files\ktdms\knowledgeTree\config\config-path","C:\Program Files x86\ktdms"=>"C:\Program Files x86\ktdms\knowledgeTree\config\config-path","C:\ktdms"=>"C:\ktdms\knowledgeTree\config\config-path"); 131 + $knownWindowsLocations = array("C:\Program Files\ktdms"=>"C:\Program Files\ktdms\knowledgeTree\config\config-path","C:\Program Files x86\ktdms"=>"C:\Program Files (x86)\ktdms\knowledgeTree\config\config-path","C:\ktdms"=>"C:\ktdms\knowledgeTree\config\config-path");
132 foreach ($knownWindowsLocations as $loc=>$configPath) { 132 foreach ($knownWindowsLocations as $loc=>$configPath) {
133 if(file_exists($configPath)) 133 if(file_exists($configPath))
134 $this->location = $loc; 134 $this->location = $loc;
@@ -244,14 +244,8 @@ class migrateInstallation extends step @@ -244,14 +244,8 @@ class migrateInstallation extends step
244 $this->ktSettings = array('fileSystemRoot'=> $froot); 244 $this->ktSettings = array('fileSystemRoot'=> $froot);
245 $varDir = $froot.DS.'var'; 245 $varDir = $froot.DS.'var';
246 $this->urlPaths = array( 246 $this->urlPaths = array(
247 -// array('name'=> 'Var Directory', 'path'=> $varDir),  
248 -// array('name'=> 'Log Directory', 'path'=> $varDir.DS.'log'),  
249 array('name'=> 'Document Root', 'path'=> $froot.DS.'Documents'), 247 array('name'=> 'Document Root', 'path'=> $froot.DS.'Documents'),
250 -// array('name'=> 'Temporary Directory', 'path'=> $varDir.DS.'tmp'),  
251 -// array('name'=> 'Cache Directory', 'path'=> $varDir.DS.'cache'),  
252 -// array('name'=> 'Upload Directory', 'path'=> $varDir.DS.'uploads'),  
253 ); 248 );
254 -// $this->urlPaths = array();  
255 $this->dbSettings['dbPort'] = $this->util->getPort($this->location); // Add Port 249 $this->dbSettings['dbPort'] = $this->util->getPort($this->location); // Add Port
256 $this->temp_variables['urlPaths'] = $this->urlPaths; 250 $this->temp_variables['urlPaths'] = $this->urlPaths;
257 $this->temp_variables['ktSettings'] = $this->ktSettings; 251 $this->temp_variables['ktSettings'] = $this->ktSettings;