diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php index b468cae..25452f5 100644 --- a/setup/wizard/installUtil.php +++ b/setup/wizard/installUtil.php @@ -693,17 +693,17 @@ class InstallUtil { } /* function getOpenOffice() { - $cmd = "whereis soffice.bin"; + $cmd = "whereis soffice"; $res = $this->getOpenOfficeHelper($cmd); - if($res != '' && preg_match('/soffice.bin/', $res)) { + if($res != '' && preg_match('/soffice/', $res)) { return $res; } - $cmd = "which soffice.bin"; + $cmd = "which soffice"; $res = $this->getOpenOfficeHelper($cmd); if($res != '') { return $res; } - $cmd = "locate soffice.bin"; + $cmd = "locate soffice"; $res = $this->getOpenOfficeHelper($cmd); if($res != '') { return $res; @@ -720,7 +720,7 @@ class InstallUtil { foreach ($broke as $r) { $match = preg_match('/bin/', $r); if($match) { - return preg_replace('/soffice.bin:/', '', $r); + return preg_replace('/soffice:/', '', $r); } } } diff --git a/setup/wizard/lib/services/unixOpenOffice.php b/setup/wizard/lib/services/unixOpenOffice.php index fa29e41..e2bcafc 100644 --- a/setup/wizard/lib/services/unixOpenOffice.php +++ b/setup/wizard/lib/services/unixOpenOffice.php @@ -67,11 +67,10 @@ class unixOpenOffice extends unixService { if(isset($options['binary'])) { $this->setBin($options['binary']); } else { - $this->setBin("/usr/lib/openoffice/program/soffice.bin"); + $this->setBin("/usr/bin//soffice"); } $this->setPort("8100"); $this->setHost("localhost"); -// $this->soffice = $this->util->getOpenOffice(); } private function setPort($port = "8100") { @@ -144,11 +143,7 @@ class unixOpenOffice extends unixService { return ; } $response = $this->util->pexec($cmd); -// $state = $this->status(); -// if($state != 'STARTED') { -// $cmd = "nohup ".$this->getBin()." -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\" &1> /dev/null &"; -// $response = $this->util->pexec($cmd); -// } + return $response; } elseif ($state == '') { // Start Service diff --git a/setup/wizard/lib/system/openOffice.class b/setup/wizard/lib/system/openOffice.class index d2f2115..e8bcf22 100644 --- a/setup/wizard/lib/system/openOffice.class +++ b/setup/wizard/lib/system/openOffice.class diff --git a/setup/wizard/lib/system/openOffice.java b/setup/wizard/lib/system/openOffice.java index 105430f..04bd38c 100644 --- a/setup/wizard/lib/system/openOffice.java +++ b/setup/wizard/lib/system/openOffice.java @@ -8,7 +8,7 @@ public class openOffice { String openoffice = args[0]; try { // Execute a command without arguments - String command = "nohup "+openoffice+" -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\""; + String command = ""+openoffice+" -nofirststartwizard -nologo -headless -accept=\"socket,host=localhost,port=8100;urp;StarOffice.ServiceManager\""; Process child = Runtime.getRuntime().exec(command); System.out.println(command); } catch (IOException e) { diff --git a/setup/wizard/lib/validation/openofficeValidation.php b/setup/wizard/lib/validation/openofficeValidation.php index 4562277..d193743 100644 --- a/setup/wizard/lib/validation/openofficeValidation.php +++ b/setup/wizard/lib/validation/openofficeValidation.php @@ -61,7 +61,7 @@ class openofficeValidation extends serviceValidation { * @access private * @var mixed */ - private $unixLocations = array("/usr/lib/openoffice/program"); + private $unixLocations = array("/usr/bin/"); public function preset($options = null) { $this->specifyOpenOffice(); @@ -98,7 +98,7 @@ class openofficeValidation extends serviceValidation { $auto = $this->detectOpenOffice(); if($auto) { $this->soffice = $auto; - $this->openOfficeExeError = true; + $this->openOfficeExeError = false; return $this->soffice; } return false; @@ -111,10 +111,10 @@ class openofficeValidation extends serviceValidation { $bin = "soffice.exe"; } else { $locations = $this->unixLocations; - $bin = "soffice.bin"; + $bin = "soffice"; } foreach ($locations as $loc) { - $pathToBinary = $loc.DS.$bin; + $pathToBinary = $loc.$bin; if(file_exists($pathToBinary)) { return $pathToBinary; } diff --git a/setup/wizard/steps/database.php b/setup/wizard/steps/database.php index 1b5187d..c829a8b 100644 --- a/setup/wizard/steps/database.php +++ b/setup/wizard/steps/database.php @@ -768,7 +768,10 @@ class database extends Step $sqlFile = $dbMigrate['dumpLocation']; $this->parse_mysql_dump($sqlFile); $this->dbhandler->load($this->dhost, $this->duname, $this->dpassword, $this->dname); - $this->dbhandler->query("TRUNCATE plugin_helper;"); + $dropPluginHelper = "TRUNCATE plugin_helper;"; + $this->dbhandler->query($dropPluginHelper); + $updateUrls = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "urls";'; + $this->dbhandler->query($updateUrls); return true; } /** diff --git a/setup/wizard/templates/database_confirm.tpl b/setup/wizard/templates/database_confirm.tpl index 3cd7975..d8456b2 100644 --- a/setup/wizard/templates/database_confirm.tpl +++ b/setup/wizard/templates/database_confirm.tpl @@ -33,7 +33,7 @@ Root Password:
 
- +