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 693 }
694 694  
695 695 /* function getOpenOffice() {
696   - $cmd = "whereis soffice.bin";
  696 + $cmd = "whereis soffice";
697 697 $res = $this->getOpenOfficeHelper($cmd);
698   - if($res != '' && preg_match('/soffice.bin/', $res)) {
  698 + if($res != '' && preg_match('/soffice/', $res)) {
699 699 return $res;
700 700 }
701   - $cmd = "which soffice.bin";
  701 + $cmd = "which soffice";
702 702 $res = $this->getOpenOfficeHelper($cmd);
703 703 if($res != '') {
704 704 return $res;
705 705 }
706   - $cmd = "locate soffice.bin";
  706 + $cmd = "locate soffice";
707 707 $res = $this->getOpenOfficeHelper($cmd);
708 708 if($res != '') {
709 709 return $res;
... ... @@ -720,7 +720,7 @@ class InstallUtil {
720 720 foreach ($broke as $r) {
721 721 $match = preg_match('/bin/', $r);
722 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 67 if(isset($options['binary'])) {
68 68 $this->setBin($options['binary']);
69 69 } else {
70   - $this->setBin("/usr/lib/openoffice/program/soffice.bin");
  70 + $this->setBin("/usr/bin//soffice");
71 71 }
72 72 $this->setPort("8100");
73 73 $this->setHost("localhost");
74   -// $this->soffice = $this->util->getOpenOffice();
75 74 }
76 75  
77 76 private function setPort($port = "8100") {
... ... @@ -144,11 +143,7 @@ class unixOpenOffice extends unixService {
144 143 return ;
145 144 }
146 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 147 return $response;
153 148 } elseif ($state == '') {
154 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 8 String openoffice = args[0];
9 9 try {
10 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 12 Process child = Runtime.getRuntime().exec(command);
13 13 System.out.println(command);
14 14 } catch (IOException e) {
... ...
setup/wizard/lib/validation/openofficeValidation.php
... ... @@ -61,7 +61,7 @@ class openofficeValidation extends serviceValidation {
61 61 * @access private
62 62 * @var mixed
63 63 */
64   - private $unixLocations = array("/usr/lib/openoffice/program");
  64 + private $unixLocations = array("/usr/bin/");
65 65  
66 66 public function preset($options = null) {
67 67 $this->specifyOpenOffice();
... ... @@ -98,7 +98,7 @@ class openofficeValidation extends serviceValidation {
98 98 $auto = $this->detectOpenOffice();
99 99 if($auto) {
100 100 $this->soffice = $auto;
101   - $this->openOfficeExeError = true;
  101 + $this->openOfficeExeError = false;
102 102 return $this->soffice;
103 103 }
104 104 return false;
... ... @@ -111,10 +111,10 @@ class openofficeValidation extends serviceValidation {
111 111 $bin = "soffice.exe";
112 112 } else {
113 113 $locations = $this->unixLocations;
114   - $bin = "soffice.bin";
  114 + $bin = "soffice";
115 115 }
116 116 foreach ($locations as $loc) {
117   - $pathToBinary = $loc.DS.$bin;
  117 + $pathToBinary = $loc.$bin;
118 118 if(file_exists($pathToBinary)) {
119 119 return $pathToBinary;
120 120 }
... ...
setup/wizard/steps/database.php
... ... @@ -768,7 +768,10 @@ class database extends Step
768 768 $sqlFile = $dbMigrate['dumpLocation'];
769 769 $this->parse_mysql_dump($sqlFile);
770 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 775 return true;
773 776 }
774 777 /**
... ...
setup/wizard/templates/database_confirm.tpl
... ... @@ -33,7 +33,7 @@
33 33 <tr>
34 34 <td>Root Password: </td>
35 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 37 </tr>
38 38 <?php if($ddrop) { ?>
39 39 <tr>
... ...