Commit 44bb30ab6e09318476ef839e8919a4f39efc41a8

Authored by Megan Watson
2 parents cf528ffa 2d7c8883

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

setup/wizard/installUtil.php
@@ -693,17 +693,17 @@ class InstallUtil { @@ -693,17 +693,17 @@ class InstallUtil {
693 } 693 }
694 694
695 /* function getOpenOffice() { 695 /* function getOpenOffice() {
696 - $cmd = "whereis soffice.bin"; 696 + $cmd = "whereis soffice";
697 $res = $this->getOpenOfficeHelper($cmd); 697 $res = $this->getOpenOfficeHelper($cmd);
698 - if($res != '' && preg_match('/soffice.bin/', $res)) { 698 + if($res != '' && preg_match('/soffice/', $res)) {
699 return $res; 699 return $res;
700 } 700 }
701 - $cmd = "which soffice.bin"; 701 + $cmd = "which soffice";
702 $res = $this->getOpenOfficeHelper($cmd); 702 $res = $this->getOpenOfficeHelper($cmd);
703 if($res != '') { 703 if($res != '') {
704 return $res; 704 return $res;
705 } 705 }
706 - $cmd = "locate soffice.bin"; 706 + $cmd = "locate soffice";
707 $res = $this->getOpenOfficeHelper($cmd); 707 $res = $this->getOpenOfficeHelper($cmd);
708 if($res != '') { 708 if($res != '') {
709 return $res; 709 return $res;
@@ -720,7 +720,7 @@ class InstallUtil { @@ -720,7 +720,7 @@ class InstallUtil {
720 foreach ($broke as $r) { 720 foreach ($broke as $r) {
721 $match = preg_match('/bin/', $r); 721 $match = preg_match('/bin/', $r);
722 if($match) { 722 if($match) {
723 - return preg_replace('/soffice.bin:/', '', $r); 723 + return preg_replace('/soffice:/', '', $r);
724 } 724 }
725 } 725 }
726 } 726 }
setup/wizard/lib/services/unixOpenOffice.php
@@ -67,11 +67,10 @@ class unixOpenOffice extends unixService { @@ -67,11 +67,10 @@ class unixOpenOffice extends unixService {
67 if(isset($options['binary'])) { 67 if(isset($options['binary'])) {
68 $this->setBin($options['binary']); 68 $this->setBin($options['binary']);
69 } else { 69 } else {
70 - $this->setBin("/usr/lib/openoffice/program/soffice.bin"); 70 + $this->setBin("/usr/bin//soffice");
71 } 71 }
72 $this->setPort("8100"); 72 $this->setPort("8100");
73 $this->setHost("localhost"); 73 $this->setHost("localhost");
74 -// $this->soffice = $this->util->getOpenOffice();  
75 } 74 }
76 75
77 private function setPort($port = "8100") { 76 private function setPort($port = "8100") {
@@ -144,11 +143,7 @@ class unixOpenOffice extends unixService { @@ -144,11 +143,7 @@ class unixOpenOffice extends unixService {
144 return ; 143 return ;
145 } 144 }
146 $response = $this->util->pexec($cmd); 145 $response = $this->util->pexec($cmd);
147 -// $state = $this->status();  
148 -// if($state != 'STARTED') {  
149 -// $cmd = "nohup ".$this->getBin()." -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\" &1> /dev/null &";  
150 -// $response = $this->util->pexec($cmd);  
151 -// } 146 +
152 return $response; 147 return $response;
153 } elseif ($state == '') { 148 } elseif ($state == '') {
154 // Start Service 149 // Start Service
setup/wizard/lib/system/openOffice.class
No preview for this file type
setup/wizard/lib/system/openOffice.java
@@ -8,7 +8,7 @@ public class openOffice { @@ -8,7 +8,7 @@ public class openOffice {
8 String openoffice = args[0]; 8 String openoffice = args[0];
9 try { 9 try {
10 // Execute a command without arguments 10 // Execute a command without arguments
11 - String command = "nohup "+openoffice+" -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\""; 11 + String command = ""+openoffice+" -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\"";
12 Process child = Runtime.getRuntime().exec(command); 12 Process child = Runtime.getRuntime().exec(command);
13 System.out.println(command); 13 System.out.println(command);
14 } catch (IOException e) { 14 } catch (IOException e) {
setup/wizard/lib/validation/openofficeValidation.php
@@ -61,7 +61,7 @@ class openofficeValidation extends serviceValidation { @@ -61,7 +61,7 @@ class openofficeValidation extends serviceValidation {
61 * @access private 61 * @access private
62 * @var mixed 62 * @var mixed
63 */ 63 */
64 - private $unixLocations = array("/usr/lib/openoffice/program"); 64 + private $unixLocations = array("/usr/bin/");
65 65
66 public function preset($options = null) { 66 public function preset($options = null) {
67 $this->specifyOpenOffice(); 67 $this->specifyOpenOffice();
@@ -98,7 +98,7 @@ class openofficeValidation extends serviceValidation { @@ -98,7 +98,7 @@ class openofficeValidation extends serviceValidation {
98 $auto = $this->detectOpenOffice(); 98 $auto = $this->detectOpenOffice();
99 if($auto) { 99 if($auto) {
100 $this->soffice = $auto; 100 $this->soffice = $auto;
101 - $this->openOfficeExeError = true; 101 + $this->openOfficeExeError = false;
102 return $this->soffice; 102 return $this->soffice;
103 } 103 }
104 return false; 104 return false;
@@ -111,10 +111,10 @@ class openofficeValidation extends serviceValidation { @@ -111,10 +111,10 @@ class openofficeValidation extends serviceValidation {
111 $bin = "soffice.exe"; 111 $bin = "soffice.exe";
112 } else { 112 } else {
113 $locations = $this->unixLocations; 113 $locations = $this->unixLocations;
114 - $bin = "soffice.bin"; 114 + $bin = "soffice";
115 } 115 }
116 foreach ($locations as $loc) { 116 foreach ($locations as $loc) {
117 - $pathToBinary = $loc.DS.$bin; 117 + $pathToBinary = $loc.$bin;
118 if(file_exists($pathToBinary)) { 118 if(file_exists($pathToBinary)) {
119 return $pathToBinary; 119 return $pathToBinary;
120 } 120 }
setup/wizard/steps/database.php
@@ -768,7 +768,10 @@ class database extends Step @@ -768,7 +768,10 @@ class database extends Step
768 $sqlFile = $dbMigrate['dumpLocation']; 768 $sqlFile = $dbMigrate['dumpLocation'];
769 $this->parse_mysql_dump($sqlFile); 769 $this->parse_mysql_dump($sqlFile);
770 $this->dbhandler->load($this->dhost, $this->duname, $this->dpassword, $this->dname); 770 $this->dbhandler->load($this->dhost, $this->duname, $this->dpassword, $this->dname);
771 - $this->dbhandler->query("TRUNCATE plugin_helper;"); 771 + $dropPluginHelper = "TRUNCATE plugin_helper;";
  772 + $this->dbhandler->query($dropPluginHelper);
  773 + $updateUrls = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "urls";';
  774 + $this->dbhandler->query($updateUrls);
772 return true; 775 return true;
773 } 776 }
774 /** 777 /**
setup/wizard/templates/database_confirm.tpl
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <tr> 33 <tr>
34 <td>Root Password: </td> 34 <td>Root Password: </td>
35 <td> <div id="tooltips" title="Root user password of the database">&nbsp;</div> </td> 35 <td> <div id="tooltips" title="Root user password of the database">&nbsp;</div> </td>
36 - <td><?php echo $dpassword; ?></td> 36 + <td><?php for($i=0; $i< strlen($dpassword); $i++) echo "*"; //echo $dpassword; ?></td>
37 </tr> 37 </tr>
38 <?php if($ddrop) { ?> 38 <?php if($ddrop) { ?>
39 <tr> 39 <tr>